On Sun, Jul 21, 2002 at 01:41:54PM -0500, Jay Jacobs wrote: > Having a bit of a problem getting any code into a pic at all. I've > already given up on the NOPPP circuit and I've moved onto the much simpler > TVLP and the 16F628. Good to hear it. First question: How long is your cable from the parallel port to the programmer? One way that I kept it simple is having no anti-ringing circuitry in front of HCT573 inputs. It seems to work OK up to about 2 feet of cable or so. But invariably it doesn't work with 6 to 10 foot cables. Question 2: On the linux side what version of picprg are you using? Question 2A: What's your Linux setup (distribution and kernel versions)? Question 3: Did you use the picprg config page to configure and verify the operation of the parallel port bits? And finally question 4: Are you absolutely sure that you wired the PGM line from the HCT573 to RB4 for the 16F628? I find that a short cable coupled with very careful checking of the configuration results in a successful endeavor. > > At first I tried under windows using David Tait's Programmer and when I > tried to program it just Failed (very generic message like "Failed to > program" or something like that). It seemed like it would try to erase > and read from the pic but not write. > > Anyway, I moved over to a linux box, and I should double check the > parallel port on it, but the one thing that really is out of my > comprehension is the: > -i[hex] = HEX value of ID data address in memory map. > -e[hex] = HEX value of EEPROM data address in memory map. See what happens when you actually read the README file! ;-) Honestly I had completely forgotten about those options. That README is Brian Lane's original README. I'm sure the options are still there but I never ever use them. But an explanation is in order... > > The FPP had the options: > Code, Data, ID, Config > with Code set to 2048, Data set to 128 and ID set to "####" and Config set > to what I think is the length of my hex assembled program. > > Is the "ID number" and "EEPROM Data" specific to the 16F628 or my program? Actually they are related to the hex file that you are loading into the part so I guess the answer is your program. > How are they calculated or obtained? They are determined by convention. By convention the data eeprom memory is usually located at address 0x2100. The ID memory is a part of the configuration memory space and is the 4 words starting at 0x2000. Currently picprg2.3c and picprg2.3d have these addresses hardcoded. I removed the config page options for them. So the only way to change them (if necessary) is to either use the command line options as shown above or to change their values in the .picprgrc file in your home directory. Now that I've given the long answer here's the short one: Don't worry about them. ID locations aren't critical for operation and honestly right now the data EEPROM programming algorithm in picprg2.3[cd] hasn't been updated to work yet. > > The docs with FPP were a bit slim and I'm much more of a programmer then > an EE, so the Specsheets of the 628 are a bit over my head. Well I'm here to help. Here's a summary of my suggestions: 1) Keep the cable between the parallel port and the programmer short. 2 feet at the maximum. 2) Make sure that you're running either picprg2.3c or picprg2.3d. One really cool feature that I added is part autodetection. So if everything for the programmer and the port is configured right, the software will tell you what kind of chip you have loaded into the programmer, or failing detection will ask you which chip to use. It makes for a real quick programmer tester because if main page comes up with the right chip and config bit settings, then you can be pretty sure that everything for the programmer is configured correctly. Note that you'll need picprg2.3d if you are using a Linux 2.4 kernel. 3) Use the config/debug page to verify programmer operation. FPP has the same style page. You'll need a logic probe, DMM, or if worst comes to worst a LED/resistor combo to test the proper operation of the pins. 4) Doublecheck your programmer wiring being especially careful of the location of the PGM pin. It's RB4 on the 16F628 and RB3 on the 16F87X. And in an ironic twist it's RB5 on the 18FXXX chips (my next target for TLVP/picprg BTW) Let me know how it turns out and any additional information I can put either on my TLVP page or the picprg documentation to make it easier. Hope this helps and Good Luck. BAJ -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads