What's the best PIC to start learning with? I want a PIC with 8 pins and with analog inputs.
I have an 16F628A, but I think that the 16F684 could be better. What is the difference between PIC16F648 and 684A?
Which would be best?
What's the best PIC to start learning with? I want a PIC with 8 pins and with analog inputs.
I have an 16F628A, but I think that the 16F684 could be better. What is the difference between PIC16F648 and 684A?
Which would be best?
Might as well put my 2 cents in.
Microchip has a part selector here: http://www.microchip.com/maps/microcontroller.aspx You can input all of the required items that you have and it will show you what will meet your requirements.
If you are wanting a PIC that is easier to learn with you shouldn't be worried about low pin count. Instead you should be looking at things like what compiler you will be using and what the package type is of the chip. If you are wanting to bread board, you should get a PIC in a through hole version. You can also get a development board with all of the required hardware built in.
I brought up considering you compiler because not all PIC series have good free or cheap C compilers. The PIC16F series has a very different architecture then the PIC18F. Because of this, several of the C compilers do not support the 16F series, leaving you to program in assembly or forking over some money. Also, since the architecture is different, it is harder to do something in assembly on them.
So, long story short, I would recommend going with a PIC18F series unless you have some strict requirements for 8 pins. The class that I help instruct has switched over to using 18F series only because of the reasons I listed.
If you are after 8-pin I'd give the PIC12F683 a go. It has the same pinout as the PIC12F675 and PIC12F629 but double the memory and all the features of the lesser models.
8-pin PICs are a great way to start as they are simple enough that you can quickly use them them without having to keep too much new information in your head. Just remember that lots of tutorials will expect you to be using PORTA
or PORTB
which are 8-pin binary inputs or outputs. As these chips only have 6 input/output pins you'll be using GPIO
.
Read the datasheet before you use it.
Following these, I would just move on to a PIC18F or PIC24F (select one that matches the features and memory you want - you'll be able to better judge this after fiddling with a PIC12F).
Eight pins and analogue inputs means something like the PIC12F675. It has a 10-bit ADC with four channels.
I'd forget about the 16F628A unless you can't find anything else, it's obsolete. The modern equivalent is the 16F88. The latter has on-chip debug hardware that you don't get with many of the smaller devices (they need a special debug header).
The A after a part denotes that it's a newer, improved version.
I'd recommend the PIC16F690.
It's a great starter chip: it's got 256 bytes EEPROM, 7K program memory, 256 bytes RAM, 3 timers (1 x 16-bit), MSSP, UART, 8ch 10-bit ADC, comparators - everything you should need. Microchip used ship the chip with their PICkit 2 demo boards. They now ship the PIC16F887, which is also a very powerful chip (similar to the PIC16F690.)
I'd strongly second Mr. Hedgehog's suggestion of going with the PIC12f683 and using SourceBoost's compiler free version. It's great chip with lots of features and plenty of program space/ram for such a tiny part. Not to blow my own trumpet but here are some things I've done with it.
If you want something bigger I suggest going direct to the 24f series. They cost the same or often less than the 18f series with better features. The compiler is free, they are 16bit, can run very fast (16mips) and best of all the majority have Peripheral Pin Select (PPS) which allows you to assign just about all the peripherals (SPI,USART,CCP etc) to pretty much any GPIO pin you like. This make routing of your circuit boards so much easier.
My favourites would be the PIC24FJ64GB002 and PIC24FJ64GA102. They're both available in DIP package (28pin) have tons of program memory and ram (64kb,8kb) and have lots of peripherals. They are pretty much identical except that GB002 has built in USB hardware at the cost of a couple of GPIOs.
IMHO As a beginner it's not worth bothering with the 16f or 18f series unless you have a very specific need to.
And finally, get yourself the USB based PicKit 2 or 3 In circuit Serial Programmer (ISCP). They're not expensive at around 30USD. It's just not worth bothering with older/cheaper/knockoff/homebuilt programmers, too much hassle. Sure, you can use a bootloader later if you like, but as a beginner with a new project you want to be sure that any problems you are having are with your circuit and not some random problem with your programmer. It was the best thing I did to make my life easier...
I'd recommend PIC16F877A.
This has 5 ports for I/O operations. With this, you can learn PIC programming step by step, starting with LED's, switches, 7segment displays, external interrupts, hardware interrupts (timer0,1,2), USART, CCP, EEPROM and so on...
This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC® architecture into an 40- or 44-pin package and is upwards compatible with the PIC16C5X, PIC12CXXX and PIC16C7X devices. The PIC16F877A features 256 bytes of EEPROM data memory, self programming, an ICD, 2 Comparators, 8 channels of 10-bit Analog-to-Digital (A/D) converter, 2 capture/compare/PWM functions, the synchronous serial port can be configured as either 3-wire Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and a Universal Asynchronous Receiver Transmitter (USART). All of these features make it ideal for more advanced level A/D applications in automotive, industrial, appliances and consumer applications.
It can be programmed over a serial link.
In terms of C compilers and related software, Microchip gives away their standard MPLAB IDE for free. With that, you can always program in assembly language. However, if you want C, they also have a version of their Hi_Tech C compiler free of charge. They offer it for the 18F series and then a different one for the 10/12/16F series.
I started with MPLAB and the CC5X C compiler (bknd.com) and have also used HI-Tech C.