On Mon, Aug 07, 2006 at 01:41:02PM +0200, Richard Le Mesurier wrote: > (reposted - sorry, I left off the [PIC] tag) > > I am looking for online reference on programming of the 16f84 on a > technical level. You're looking for the Programming Specification. It's found on Microchips site. As I'm sure that others will point out, that unless you have a really good reason, a 16F84 is generally considered to be obsolete. I advance that argument is this piece that I wrote a couple of years ago: http://www.finitesite.com/d3jsys/16F88.html I feel a 16F88, or a 16F628A or 16F648A would be much better choices in an 18 pin package. > > How are the DATA and CLK lines used during programming? It's in the programming specification. > What info is sent to pic for each byte of the hex84 file? Same. > How do I request the pic to send data back to the PC so I can confirm > programming? Same. You need this document. > What commands does the pic understand being sent to it? It's all there. > I guess this leads to "how do I make/design/create my own ICD?" Well the 16F84 isn't equipped to do ICD, which is yet another good reason not to do it. Now you're going to get a second argument. There's already a ton of software out there that programs the part. Do you have a really good reason for wanting to reinvent the wheel? I have espoused on this group many a time that the actual process of programming is only a minor annoyance in the process of using a PIC. I do believe that homebuilt programming tools may be worthwhile to build. But to spend time reinveninting software that already exists may be time better spent working on projects. > Due to my problems originally with trying to get a hardware programmer > running properly, I have decided that an early project will be some > other form of programmer. Well a programmer is fine, like I said. But writing and more importantly testing software is a challenge. Use software that already works. Many would say simply buy a programmer that already works too. But that's debatable. > Maybe someone here has written some programmer software, or happened to > read the correct MicroChip document. My basic requirement is that I want > to know how to write the software side of a pic programmer... 16F8X Programming Specification. Here I'll even look up the document for you. I've found one here: http://www.iearobotics.com/proyectos/cuadernos/ct4/download/16f8x-serial-prog.pdf Now I want to reiterate that the 16F84 probably isn't the best starting point. Others disagree. John McDonald gives some reasons why he choose the 16F84 as the basis for his Elmer 160 tutorial series on the last page of this doc: http://www.amqrp.org/elmer160/lessons/e160aa.pdf My counter argument continues to be that while the 16F84 does have a simple I/O interface, that once you proceed beyond the most basic of projects, this simplicity gets in your way in terms of development. The wide array of peripheral tools the other chips bring to the table, USART, ADC, CCP/PWM, multiple timers, I2C and the like simplify the task of managing complex projects because these tools are set it and forget it type interfaces. So it does have a learning curve to figure out how to set it up, but once you've scaled that you gain the great benefit of having an autonomic system that can save you a ton of code, time, and testing. I also believe that novices tend to learn the tougher way to solve a problem, bit banging and virtual timers for example. And while you may need those techniques for very complicated projects, it's still better to use the simpler hardware interfaces when they are available first. > I know these are way hardcore questions to be asking at such an early > stage, but I gotta have something hard to work towards. My suggestion is that you pick a new target. I too am a tool tinkerer. The problem is that tool tinkerers don't get many projects done because they spend time tinkering with the tools instead of using the tools to solve the problems that need to be solved. There are a wide variety of hardware programmers for all PIC chips. There is also a ton of programming software out there for those programmers. There are few good reasons to reinvent. One is to target a new platform or interface (USB would have been a good example a few years ago). Another is to be in the business of selling programmers (Olin's EasyProg and ProProg and Wouters WISP628 for example). But I cannot think of any others off the top of my head. Think about it. Upgrade your chip. Get a simple hardware programmer (or even better an intelligent one like the three outlined above or the ICD2) Get the software for it, and get to work on your projects. BAJ -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist