View Full Version : Discussion PIC programmer and Programming
sajeev
Mar 30, 2009, 12:50 PM
What is the best way to start out on PIC programming ? Looking to start out simple and get into more bigger stuff. What programmer do you recommend ? what can be used to program atmel PICs?
thanks,
Almaz
Mar 30, 2009, 03:20 PM
For microchip Programmer PicKit, JDM or any other cheap one should work as well. If you are a beginner I would suggest starting with Basic language. Compilers are melabs PBP, Proton PicBasic and mikroBasic.
Alison F
Mar 30, 2009, 03:42 PM
Yep. What he said.
The MicroChip 'Pickit 2' are the ones to go for, mainly as it gives you an equal playing field when you run into problems, then you know that it isn't the programmer. MC support is good too.
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805
This is their forum; http://www.microchip.com/forums/Default.aspx?
The Pickit 2 is pretty cheap too. What it doesn't do is to program some of the high end dsPICs, ..which you won't be using anyway. Then you'd need either an ICD2 or ICD3 (just released).
Trouble with the 'clones' is that while they work 90% of the time, it's that unknown where you're always left wondering if it's your 'copied' kit. Also.. Most of the cheap ones require a proper hardware serial port, not a USB one. This is mainly to generate the HVP (High Voltage Programming) voltage using a charge pump, laptop serial ports cause problems too as they don't swing to the full RS232 standard. You can use LVP, but you lose I/O ports, and if you accidently put it into HVP by setting the config string then you're stuck with a useless chip until you use an HVP programmer to reset it.
Just buy the proper commercial kit. It's quite cheap. :)
podavis
Mar 30, 2009, 03:46 PM
I found it easier to learn the 37 OP codes and just use MicroChip's free MPLab with the PICKit2. I think this was because I know C and have quite a bit of experience with basic small scale digital electronics. C was designed to act like a high level assembler language. It was a very rewarding project to do this way but it depends on what you already know. MPLab is a polished product so it's a nice environment to work in.
slipstick
Mar 30, 2009, 03:55 PM
what can be used to program atmel PICs?
All that above applies to Microchip PICs.
Atmel don't make PICs, they make AVRs (and others). They need different programming kit and languages.
It's worth deciding up front which you are going for, PICs or Atmel AVRs. They're not compatible.
Steve
Alison F
Mar 30, 2009, 04:02 PM
AVRs are slower bang for the buck than PICs. PICs also tend to be easier to select and carry quite a bit of hardware on port. PICs run at /4 the frequency, with most instructions except jumps taking 1 cycle.
The lower PICs (which you'll be using) also have built in RC/crystals so they don't need external components.
Downside of the PICs for a beginner is that the bank switching and memory map can be a bit confusing, but it's quite easy once you get the hang of it.
The 16F84 is where it jumped over to the hobbyist. There's ALOT of code and project examples all over the net. The 16F628A is the rough modern replacement, with only minor changes required to code. F84 needs a crystal. F628/627/648 doesn't. Most of the modern ones just need power, and away they go. The little ones 12F made their fame as the mod-chips in the original Sony Playstations.
Some of that may be right/wrong, I'm not 100% sure. It's just bits I've picked up on my travels. PIC v AVR is quite an ongoing hot topic on Usenet. Just search Google Groups to see the flame wars. ;)
Personally I support MicroChip, as they've been good to us over the years. They actually encourage the smaller people. Their dev tools are free, they offer genuine samples, and overall they're an honest company just doing their thing. The ICD2 and ICD3 come with lifetime warranties.
Almaz
Mar 30, 2009, 04:04 PM
hmmm I always thought AVR's are faster compared to Pic.
Alison F
Mar 30, 2009, 04:10 PM
hmmm I always thought AVR's are faster compared to Pic.
Oh I don't know. :p
It's all Mhz, instructions per cycle, in-built hardware, and all of that. I just know that I get on OK with the dsPICs and that they wipe the floor with the equivalent AVRs.
Maybe we ought not to go down this route of which is better. :o
OP. AVR or PIC. Your choice. Just do some searching to find which you feel more comfortable with/what code examples are out there which fit your requirements. :)
Malc C
Mar 30, 2009, 04:20 PM
What is the best way to start out on PIC programming ?
Depends on your budget, and how serious about the hobby you want to get. You can get started for less than $20 by purchasing a programmer such as the JDM type (The cost of making one is about the same). Compilers and programmers are freely available on the web.
At the other end of the scale are professional programmers costing hundreds of pounds / dollars. There are also some excellent development boards that allow you to program and test the code without removing the PIC. A good basic all round programmer is the Microchip PicKIT2, however having gone through buying loads of different programmers and breadboards etc, I would recommend the EasyPIC (http://www.mikroe.com/en/) range of boards, it makes life so much easier, and although the initial investment is typically £100, it will save you a lot of time and money in the long run.
http://www.mikroe.com/en/tools/easypic5/gallery/easypic5_550_3.jpg
The Basic language is easy to pick up, the free compiler will allow 2K of code which should be ample for most RC projects, and the active forum provides fantastic support.
It's also worth using the search function in this forum as this question has been asked before :rolleyes:
EDIT: Oh and they also do AVR boards as well (plus others)
rich smith
Mar 30, 2009, 07:51 PM
Sparkfun has the best deal on PIC and AVR programming dongles for less than $10. I just got a couple and they work great with free software. Or you can build one for a buck or so if you got more time than money.
What is the best way to start out on PIC programming ? Looking to start out simple and get into more bigger stuff. What programmer do you recommend ? what can be used to program atmel PICs?
thanks,
rich smith
Mar 30, 2009, 08:02 PM
I just know that I get on OK with the dsPICs and that they wipe the floor with the equivalent AVRs.
Yeah... right! And pigs fly. :)
Alison F
Mar 30, 2009, 09:02 PM
Yeah... right! And pigs fly. :)
Ahhh. So you're an AVR fan then!!?? :D ;) :p
dsPICs. Lots of dedicated on chip hardware. None of this AVR bit banging stuff. :rolleyes:
Almaz
Mar 30, 2009, 09:05 PM
Comparing dsPic33 is not fair because it is power house. I've been using Pic16 and Pic18 and they are more than enough for hobby projects. I might be wrong but the same AVR in the same class are faster per clock than Pic16/Pic18. By the way what do you use dsPic33 for? Anyway Pic Rocks :)
Alison F
Mar 30, 2009, 09:17 PM
No, I'm not getting involved in this. :)
SPI / 8-bit bus interfacing btw.
soft2
Mar 31, 2009, 11:00 PM
If you go with PIC, you want to get an ICD2 or ICD3 programmer/debugger. This allows you to program the chip without taking it out of the circuit board where it's being used. It also allows you to debug the app in-circuit. Both of these things are infinitely handy. Another good C compiler is BoostC from www.SourceBoost.com. It has many pros and cons. Compatible with MPLAB. Good luck.
JohnMuchow
Apr 01, 2009, 04:07 AM
For sheer bang-for-the-buck, get a PICKit2 or PICKit3 Starter Kit. I have three PICKit programmers and use them constantly for in-circuit programming, serial port monitoring and digital I/O port monitoring, all at the same time.
Easy to use, good support, widely available, small, and affordable (buy two!).
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.