| PIC Micro's For Beginners |
|
|
| Monday, 09 March 2009 11:53 | ||||||||||
Page 1 of 7 If you run into issues with this guide or others on the site, please check out the digital-diy.com forums and feel free to post or help others!
PIC's are small programmable IC's that have many pins which can be turned into inputs and outputs for any range of tasks. With this incredible feature, coupled with many other 'built-in' peripherals, PIC micro's have infinite uses for projects and applications. There are many ways to program a PIC, wether it be the type of programmer or the compiler (software used to develop programs), the first couple of stepping stones entailing programming your first PIC are usually where people give up. This basic guide is designed to get you off your feet, and program your first PIC, by not using dodgy programmers or software, just explaining the raw real truth of what are the best tools to use for PIC development. Before I get much further, I would like to clear one fact up, there are different families of PIC's, in particular, the 16Fxxx range and 18Fxxxx range. There are others, but these two are the most popular and supported. Briefly said, Microchip never discontinues a product range. They offer continual support from the date of release, until the present day. With this in mind, there are many types of PIC's out and about, some are very old. The 16F range is old, and while they have no errors, they do have flaws in regards to the way memory is handled in particular. This is why I really recommend using 18F PIC's, they are newer, operate faster, and have a lot more features ready to go. To start off with, I bet your wondering how we control the state of pins on a PIC, first of all, lets have a look at the pin-out of a PIC micro, in this case the 18F1320. Here's what one looks like in real life;
And this is the pin-out of the PIC (pin 1 can be identified as the one to the left of the indent on top of the IC)
It looks like jargon if you haven't played with PIC's before I know... The next learning curve is the PIC's pins are grouped into ports. As you can see, pin 1 is RA0, this means PORTA pin 0. Pin 2 would be PORTA pin 2. As you work your way around the PIC, you will notice that the pins for each port are not necessarily sequential according to their physical location, and you will also see pins labelled MCLR (pin 4), Vss (pin 5) and Vdd (pin 14), amongst others. These newly discovered pins are the "vitals" for the PIC to operate. Vdd is the positive supply, Vss is earth and MCLR is a hardware reset pin, and must remain high or else the PIC's program will reset. The supply voltage for PIC's is typically 5 volts, some can go lower then that, but for all tutorials besides those that specify different, Vdd refers to 5 volts. Your power supply should be your first project, and it utilises a 7805 IC which has three pins, input, ground and output. Put simply, it turns any voltage above 6.5 volts and up to 12v into a steady and very stable 5 volts. More can be found on the how to build a voltage regulator tutorial.
Comments (3)
Joomla components by Compojoom
|
||||||||||
| Last Updated ( Saturday, 09 January 2010 01:57 ) | ||||||||||
Whos Online
- Graham
- andyo
- Jon Chandler
Forum Activity
Marching LEDs - mrdeb Saturday, 13 March 2010 22:54 - [7 replies]
Credit Where Credit's Due - jon chandler Saturday, 13 March 2010 18:51 - [4 replies]
USB 8 Channel Servo Controller - andyo Saturday, 13 March 2010 01:19 - [2 replies]
Dedicated Servo Controller - graham Friday, 12 March 2010 17:58 - [0 replies]
Must have....delta temperature glowies! - graham Friday, 12 March 2010 17:31 - [3 replies]
A 'throw-away" PIC board - jon chandler Friday, 12 March 2010 13:41 - [31 replies]
iHID - graham Friday, 12 March 2010 02:04 - [5 replies]
Recent Comments
- 2010-03-13 16:36:21 andyo
Very nice - 900,000 packets and 0 errors - can't ask for better tha...
- 2010-03-13 11:59:14 Anony...
proton
- 2010-03-12 19:44:17 Jon C...
Here is a spreadsheet of compatible parts: [url]http://digital-diy...
- 2010-03-12 14:26:02 Anony...
What program do you use to capture the simulation to a videofile?
- 2010-03-12 13:15:58 Jon C...
Here's a tip for tying out SD cards. An SD card will fit the flopp...
- 2010-03-11 21:03:32 Jon C...
If this wasn't a class project that had to be done on a PIC16F690 u...
- 2010-03-11 15:30:06 uuu
I am going to send two data from ADC to USART(async mode) to serial...
- 2010-03-05 13:24:23 mrpse...
I was thinking of battery with powered routers or powered for every...





:woohoo:
Excellent explanation of the basics. it took me a LONG time to self learn what you exlained in an easy to follow and systematic way.
I am looking forward to reading and "Seeing" more.
:)