Showing posts with label pic. Show all posts
Showing posts with label pic. Show all posts

Sunday, June 9, 2013

Which MCU and Which compiler?

Hi again.

Lets start with a simple program with PIC MCU.

I choose PIC16F690 because  it's very use full and have lots of functionality like TIMER, PWM, ADC and so on. It also has 18 pin General Purpose Input/Output (GPIO).

What is GPIO and what is the difference?

When a MCU has GPIO, it means each pin on the mcu has different configuration, as you can see in picture blow:


figure from PIC16F690 datasheet


for example pin 14 in this chip has 3 functionality, it is PIN3 of POTR C , also it's Analog PIN6  moreover it's PWM PIN1D.

As you already know I don't want to go to detailes. Let's see some real action ;)

For working with PIC MCU you need to download a programing software named MPLAB.

It's free and easy to download from this link:

link to download MPLABX IDE


Download latest version.

Download latest version. With this software you can program all Microchip products with assembly language. But, it’s hard to understand assembly language for beginners.

 
It's easier to use a high level programming language like C/C++. Therefore, we must use a C/C++ compiler such as hi-tech C or XC8/XC16/XC32 compiler.

You can download hi-tech C from here.
 


Link to download CX compiler is here. This link is same as MPLAB IDE at the end of the page or at the left side you can see the links for direct download.

Both of these software have free version both during installation don't forget to choose free version.

Now we have enough tools to start our first code in the next post.




 









Friday, June 7, 2013

What is MCU?

What is MCU? And how does it works.

  MCU or Micro Controller Unit is the brain of any embedded systems.

  There are many MCUs in the market and all of them clam that their MCU is the best, but really it depends on application.

 Some of the well known MCUs are:


 Microchip PIC family like PIC16 and PIC18 series.

Texas Instruments MPS430
 




When you chose a MCU for your project, you need to consider what you want to do. There is no multipurpose MCU also, there is no good and bad MCU. It all depends on applications.
 
 All MCUs contain three main part.
  1. ALU
  2. Memory
  3. I/O
These are the essential part that any MCU has.
 
I don't want to continue on this technical issue. It's really boring to know about all these staff :D . there fore I leave it and in the next post will tell you how to start your very first code and simulate it in a simulator.