Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I've been looking into doing some PIC Programming, but unlike some of the other microcontrollers available the sheer number of different chips available has caused me some confusion. It also appears that some of the chips suggested on some sites as good choices for people starting out with PIC programming may have been superseded (or I may just be getting even more confused).

So my question boils down to three parts:

  • What would be a good PIC chip to start out with?

  • I'm quite happy doing either assembler or some other language, so what IDEs/languages would you suggest for Linux?

  • What would you recommend in terms of getting the code onto the chip, over a USB connection from a Linux laptop (PicKit 2? was one possibility) and what circuit/board configuration will I need to do this?

Edit: After a long discussion with Kortuk (see comments below) on the merits of various bits of kit, I've decided to start with the PicKit2 Starter Kit. This comes with a PIC16F690 chip installed.

share|improve this question
add comment

6 Answers 6

up vote 7 down vote accepted

I agree with PIC18s but for someone just starting they may be a bit intense. I currently teach senior level electrical engineers PIC development and even within the same classes their range of backgrounds can be astounding.

I currently teach people with the CCS PIC-C compiler but it costs money. It is unbelievable simple and was chosen as most of our students have only worked in a lab setting with basic assembly or x86 programming.

I have a feeling a very simple PIC16 may be a better fit, but it will depend on your background. The PIC16F688 is a very simple PIC that we use for our first project to warm people up.

share|improve this answer
1  
I have a First Class Honours Degree in Computing which included lots of programming (C++ mainly, a bit of VB6, some assembler). I also have a degree in Maths and teach Maths to Secondary School kids. I can and do program in a variety of languages (not C though) and am looking into various new things including playing with Microcontrollers. –  Amos Nov 15 '09 at 14:27
1  
The 16F88 is a perfect choice. There are a million different PICs out there, and I think about 50,000 of them are good for starting. Programming Microcontrollers very often posses problems to people I have helped with a CS background because they did not take many classes about electricity, something I wish they would add to degree programs. I do not think the programming will be challenging at all though, but it would probably not be a bad choice to get your a development board. This would be affected by your price range. microchipdirect.com/ProductSearch.aspx?Keywords=DV164120 –  Kortuk Nov 15 '09 at 21:58
1  
I think that last link I posted might be a good choice, it will give you a board already wired up to work with for 50 dollars(-25% if you have a .edu email) and then you have a programmer you can use for any other chips you get. I look forward to hearing how your projects go. –  Kortuk Nov 15 '09 at 21:59
1  
If you get the DM164120-1, I would suggest you use the PIC that comes with it. I am right in the middle of helping someone with a project that they need to teach class tomorrow or I would look more, but every place I find your board I cannot find it's schematic. I can tell you based on the pin-out of the PIC16F631 it is not compatible with a PIC16F88. The power and programming pins will not line up. If you buy a dev board, just use the PIC that comes with it, you will be significantly happier. –  Kortuk Nov 17 '09 at 2:00
2  
Yes, you have done your research well. My help may have been a little misguided. If you want to get your feet wet, a development board is a way to avoid dealing with the hardware of building a PIC before you are ready. If you go this path, I would suggest using the PIC that comes with the board and determine your next choice of PIC after you are ready to build your own boards. If you want your own pic from the beginning, buy a programmer, the pic and anything you need to run the pic from the start. You can save money and use a breadboard. –  Kortuk Nov 18 '09 at 4:31
show 12 more comments

For the PIC, there is an open source compiler called JAL (Just Another Language)

Like other programming languages it allows the possibility to use hardware libraries to greatly simplify the process of attaching your chosen PIC to other hardware. The software also will allow you to compile and upload programs via your PIC2 (or a clone of this programmer)

JAL is a Pascal based language and is free software (always nice if your just starting out)

JAL Wiki Entry

As for books, "PIC Microcontrollers, 50 projects for beginners and experts" By Bert Van Dam is worth a look at as an introduction to JAL

So far I have used just the 16F877A chip from PIC, a good beginners chip apparently. Pretty cheap and lots of ports available.

share|improve this answer
    
Cheers, I'll have a look. Does JAL use a specific IDE, there one available for Linux? –  Amos Nov 18 '09 at 22:03
1  
Yes it has one called JAL Edit, it will keep you right on the coding side and has a the typical tools that you tend to find on IDE's jal.sunish.net/jaledit –  Justblair Nov 18 '09 at 23:09
    
Unfortunately that's Windows only, there does appear to be one for Linux called PicShell, current Beta is at: linux.softpedia.com/get/Text-Editing-Processing/IDEs/… –  Amos Nov 19 '09 at 9:54
add comment

For chip look at the 18F series, allmost as cheap as the 16F a lot more guts. 18F2550 is a nice chip and includes USB, there are others in the same series. Take a look at microchips selection charts on their website.

Free IDE from microchip including C which you should use over assembler IMHO. Not sure if microchip IDE runs on Linux but it may.

PicKit may be good for programming, may want to burn a bootloader the first time then bootload over usb. The Bitwacker ( google it ) is a nice setup to use or copy.

There are a ton of forums and other sites, just google. One problem with the PIC is that there are so many languages and none are quite the same ( even within c compilers ) If you can write a good question ask on piclist.com, but do your homework first. Forums are not the best place for learning, look for tutorial sites for that ( again the bitwacher site is good, also google "Embedded Adventures" the guy has done a lot in C ( but not the microchip one )

share|improve this answer
    
I've bookmarked Embedded Adventures for when I've got an hour or two to kill, and had a look at the Bitwacker for future reference. Cheers. –  Amos Nov 17 '09 at 21:59
add comment

The Dwengo board is based on the PIC18F4550, they also have a low-cost PICkit2 clone and some very good tutorials to get you started: http://www.dwengo.org/tutorials

share|improve this answer
    
Interesting. You wouldn't be the same Wim who's also one of the Dwengo Team would you? –  Amos Dec 9 '09 at 11:16
    
Yep, same one ;-) –  Wim Dec 9 '09 at 18:09
add comment

For references to some stuff, I have done a little programming with the PIC using Pik Kit 2 Pickit 1, I would recommend the 100 microcontroller projects for the evil genius, I also have some blog posts that are dealing with such things

http://blog.onaclovtech.com/2010/01/interrupts.html

http://blog.onaclovtech.com/2010/01/analog-inputs.html

http://blog.onaclovtech.com/2010/02/pic-16f913-quick-reference-guide.html

http://blog.onaclovtech.com/2010/02/pic-16f913.html

I plan to post a SPI update as well as when I figure out how to deal with CAN bus traffic using some microchip chips, I'll have updates then too.

Thank you,

onaclov

share|improve this answer
    
Looks interesting, I'll have a closer look at your stuff when I get a minute. –  Amos Jul 20 '10 at 6:55
    
I maybe just don't know where to look all the time, but feel like compared to avr and arduino there are practically no tutorials on PIC's and I would really like to change that.... –  onaclov2000 Jul 20 '10 at 13:20
add comment

If you want to use PICs I would seriously consider the PIC24 series of 16 bit pics or the very similar dsPIC33. They are faster, more powerful, in many ways easier to program, and don't cost any more than the most basic 8 bit ones. The lower end ones are available in breadboard friendly DIP socket packages too.

It's a lot harder to find examples on the internet though, but as far as i can see that's the main disadvantage.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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