9
\$\begingroup\$

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?

\$\endgroup\$
2
  • 4
    \$\begingroup\$ If you're just learning, why select such a minimal 8-pin part? I'd rather start with something that has more capabilities/features, then scale down (often very easy if you stick within the same family) when you have a particular application in mind. \$\endgroup\$
    – Nick T
    Nov 1, 2010 at 21:50
  • 1
    \$\begingroup\$ For a general PIC to do some hobby projects with and start learning, don't bother with the 16 family. Think of those as being for special requirements, like low cost for high volume products, extra low power consumption, and small physical size. None of these matter for your case. Get the biggest bestest in a 28 pin package, like a 18F2620. That has a lot more stuff you can ignore for starters, but then learn to use over time. \$\endgroup\$ Jun 1, 2013 at 13:45

7 Answers 7

14
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ thanks! But... there is no 8-pin pic that i can use with an easy-free c compiler? [must have analogical input]???? thanks ps.: this page you sent is too complicated for me [an beginner] \$\endgroup\$
    – Andrew
    Nov 1, 2010 at 15:48
  • \$\begingroup\$ The PIC18F1330 comes in an 18-pin DIP package and has a UART, 4 channel 10-bit ADC, 3 comparators with a programmable reference, 6 PWM channels and two 16-bit timers: ww1.microchip.com/downloads/en/DeviceDoc/39758D.pdf \$\endgroup\$
    – tcrosley
    Nov 1, 2010 at 22:01
  • \$\begingroup\$ @Andrew, if you want 8-pin check my answer. You can download SourceBoost which has a free code-size limited C compiler (the 8-pin chips have less memory than you'll be allowed to compile using BoostC anyway.) \$\endgroup\$ Nov 2, 2010 at 14:08
7
\$\begingroup\$

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).

\$\endgroup\$
6
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ +1 for not using 628A. A lot of books go for this and it's out of date. A lot of books use absolute assembly and that's out of date too (about 10+ years). I'm using assembly (relocatable of course) on 16F series. I was using the 16F88 but I found the PIC16F1825 which is faster, with lower voltage, enhanced mid-range, linear memory and it was much cheaper to boot. I've started using that in preference to everything else, cheaper being a good motivator. \$\endgroup\$
    – carveone
    Sep 8, 2014 at 9:21
5
\$\begingroup\$

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.)

\$\endgroup\$
1
  • \$\begingroup\$ There's quite a bit of example programs on the net involving the 16f690 too (probably because it used to be shipped with the pickit2). That's always a good thing for beginning. \$\endgroup\$ Jan 30, 2011 at 3:14
4
\$\begingroup\$

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.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ does it haves analog inputs? \$\endgroup\$
    – Andrew
    Oct 30, 2010 at 13:28
  • 2
    \$\begingroup\$ What does "It has got UART support which is the most economic one that makes burning code into it absolutely cool" mean? \$\endgroup\$
    – XTL
    Oct 30, 2010 at 16:53
  • \$\begingroup\$ You fail to account for the cost of a $15 USB to 232 converter, as computers with RS232 ports haven't been manufactured for a long time. \$\endgroup\$
    – Nick T
    Nov 1, 2010 at 21:47
  • \$\begingroup\$ 16F877A was the culmination of the 14-bit core, but it is now superseded by the 16F887 (14-bit core) and the enchanced 14-bit core chips (16F1xxx). But as said, if the OP does not have a strict requirement for an 8-pin chip (the chips he mentions are not 8-pin, so I guess he ahs not), I'd recommend selecting an 18F chip. \$\endgroup\$ Jul 3, 2011 at 11:10
4
\$\begingroup\$

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...

\$\endgroup\$
3
  • 2
    \$\begingroup\$ +1 You made some very good points. Welcome to the site! I love the PPS, I have used it on the dsPIC and have almost got to the point of favoring it even for simple projects. I do want people to be aware that if they ever do want to market their product every penny counts and in large quantities the lower end PICs will be cheaper. It can be difficult to switch PIC lines down the road, so if you do start trying to make products, try to start with an 18f or lower unless you need something in the higher line. But 24f and dsPICs are still great for learning. \$\endgroup\$
    – Kellenjb
    Mar 18, 2011 at 12:47
  • \$\begingroup\$ Thanks Kellenjb. I totally right with you about production scales. For "real" products you'd take the time to find a the cheapest pic that meets just the requirements you need. There are some many of them! \$\endgroup\$
    – Matt Casey
    Mar 18, 2011 at 13:19
  • \$\begingroup\$ Sorry. This was meant to be 1 comment. I wasn't aware of the edit time limit which explains the bad spelling! For hobby use I think ease of use outweighs a cost variance of a dollor or two. It's also nice to start with a "big" chip to gain experience from without having to worry too much about capabilities. Once you have more confidence you can make moves in other directions. For me that's the 24f family. Nothing I have attempted has really stretched it's capabilities. Mind you it is a bit sad to think of the 24f sitting there twiddling it's thumbs whilst I ask it to blink a few LEDs. \$\endgroup\$
    – Matt Casey
    Mar 18, 2011 at 13:37
2
\$\begingroup\$

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.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.