13
\$\begingroup\$

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.

\$\endgroup\$

6 Answers 6

7
\$\begingroup\$

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.

\$\endgroup\$
17
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Amos
    Nov 15, 2009 at 14:27
  • 1
    \$\begingroup\$ 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 \$\endgroup\$
    – Kortuk
    Nov 15, 2009 at 21:58
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Kortuk
    Nov 15, 2009 at 21:59
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Kortuk
    Nov 17, 2009 at 2:00
  • 2
    \$\begingroup\$ 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. \$\endgroup\$
    – Kortuk
    Nov 18, 2009 at 4:31
4
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ Cheers, I'll have a look. Does JAL use a specific IDE, there one available for Linux? \$\endgroup\$
    – Amos
    Nov 18, 2009 at 22:03
  • 1
    \$\begingroup\$ 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 \$\endgroup\$
    – Justblair
    Nov 18, 2009 at 23:09
  • \$\begingroup\$ 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/… \$\endgroup\$
    – Amos
    Nov 19, 2009 at 9:54
2
\$\begingroup\$

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 )

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$
    – Amos
    Nov 17, 2009 at 21:59
1
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ Interesting. You wouldn't be the same Wim who's also one of the Dwengo Team would you? \$\endgroup\$
    – Amos
    Dec 9, 2009 at 11:16
  • \$\begingroup\$ Yep, same one ;-) \$\endgroup\$
    – Wim
    Dec 9, 2009 at 18:09
1
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ Looks interesting, I'll have a closer look at your stuff when I get a minute. \$\endgroup\$
    – Amos
    Jul 20, 2010 at 6:55
  • \$\begingroup\$ 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.... \$\endgroup\$ Jul 20, 2010 at 13:20
1
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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