On Wed, Jul 19, 2006 at 06:46:08PM -0700, Thomas Lockney wrote: > I'm new to the world of PICs (aside from having read about how great > they are for years, anyway :) and am looking for some advice on the > best way to get started. I've tried reading the FAQ, but I'm it's not > exactly clear on some things. Well welcome aboard! > First, let me state that I run Linux primarily, though I do have > access to Windows (through VMware -- and, yes, this does give me > direct access to the serial and parallel ports). My preference is > towards having options to work in both environments. You'll most likely have two different toolchains then. Microchips MPLAB is the gold standard for Windows. gputils is just about the equivalent for Linux. You can get MLPAB from Microchip for the cost of the download. gputils is located at http://gputils.sf.net > So, that said, I have a handful of PICs (18F458, 16LF84A and 16LF870) > and I'm trying to figure out the simplest, barebones (if necessary) > way to get started programming them without having to buy a premade > programmer. You just come aboard and now you've started an argument! ;-) Most developers in these environs believe that a programmer is a worthy investment to get started. I still reside in the "bootstrap it cheap" camp. However, the challenge can be in getting your bootstrapped system going. > It seems to me that I should be able to throw together > some components on a breadboard and get started with next to nothing > from what I've read, but I can't find instructions that directly tell > me so. Take a roam around my PIC page: http://www.finitesite.com/d3jsys. It has simple hardware and Linux based software tools that can get you going in the right direction. I also take time to answer questions in my Forum. > I've seen a lot of simple programmers out there, but it seems > that a number of them require some form of bootstrapping (because they > use a PIC themselves) Correct. For a permanent development programmer this is a reasonable approach. The onboard PIC is smart enough to handle the PC interface and most of the heavy lifting of programming the target. But of course you run into the chicken and egg problem. My Trivial Programmers are one possible stopgap. > or they are for a specific chip that isn't one of those listed above. Well that's less of an issue. From an electrical interface standpoint virtually every PIC has the same interface: MCLR, Clock, Data, Vdd, and one of Vpp or PGM depending on if you're going high or low voltage programming. So programming hardware will typically program a wide variety of parts even if they are not specifically listed. The challenge comes in finding programming software that both understands how to drive the programmer, and has the algorithms required to program a particualr part. > I think a lot of my confusion is likely simply misunderstanding. I'll > ask a few specific questions and then ask for some general advice: Fire away. > 1. Is a programmer designed to work with a 16C84 able to work for the > 16LF84A or even 16LF870? Probably. I'd suggest kicking the 16LF84A to the curb and using the 16LF870. I have a couple of posted pages on my site about why you should consider newer parts for your designs. > 2. Is this (http://www.jdm.homepage.dk/easypic.htm) just too good to be true? Yes. Two reasons: 1) If you have a properly functioning serial port with anything close to RS-232 spec voltages, then the voltages to the part are out of spec. So nothing is guaranteed. 2) Many modern serial ports do not have anything close to RS-232 spec voltages. Many serial ports switch between 0V and 3.3V. Because of this, there's again no guarantee that the serial port will properly drive the PIC lines in order to program it. > 3. Will the JDM design (http://www.jdm.homepage.dk/newpics.htm) work > for any of the above PICs? JDM programmers have the same serial port issues as above, especially #2. On some ports it works fine, on others it fails. I would suggest that you'd use a MAX232 to ensure that both the PIC and the serial port are getting voltages they expect. > Based on the one SparkFun sells it looks > like I should be able to use it with all my chips. It's a crapshoot. Truthfully the PC parallel port is a more stable target. Since it's always been TTL speced you have a pretty good idea of what you're going to get out of one. That's why my Trivial programmers are parallel port targeted. > 4. What programmer software is recommended for Linux? PikDev (http://pikdev.free.fr) gets high marks. Up to date on programming algorithms and connects to a wide variety of programming hardware. Also it still maintains a CLI interface to the programming engine in addition the IDE that is the traditional interface. > 5. Does anyone know of a PIC C environment that works with the Eclipse IDE? No clue. I would suggest that you work in PIC assmebly at least until you get a reading level understanding of PIC assembly. The reason it that outside of assembly, PIC programming languages is quite fragmented. So assembly is often used to bridge discussion of ideas. But if you can read it, it doesn't help much. Program a project or three in assembly, then start thinking about higher level languages. > 6. What books do people recommend that are still pretty current (the > ones I've browsed at the bookstore often seem to be pretty old)? Google and www.piclist.com. Everything that's up to date is online. The Elmer 160 tutorial by John McDonald: http://www.amqrp.org/elmer160/lessons/index.html is an excellent learning resource for example. > > I hope I haven't gotten too long winded, Nope. > but I'm really excited to get > started and I'm just trying to sort everything out in my head. Welcome again. Come back with any more questions you may have. BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist