PDA

View Full Version : PIC18F6680 programming



gopher
- 14th January 2008, 02:04
i need to program a PIC18F6680 thats 64 pin quad surface mount. I want to programing with ICSP but im not exzatly sure which pins or how many are needed. I assume i will need a rs232 to ttl converter correct? I really dont want to unsolder this bad boy to program it. Any ideas anyone?

skimask
- 14th January 2008, 02:23
i need to program a PIC18F6680 thats 64 pin quad surface mount. I want to programing with ICSP but im not exzatly sure which pins or how many are needed. I assume i will need a rs232 to ttl converter correct? I really dont want to unsolder this bad boy to program it. Any ideas anyone?

Two words...Not correct...

www.microchip.com - PIC18F6680 datasheets and programming specifications
www.microchip.com - MPLAB, assemblers, etc.
www.microchip.com - PICKIT2 (my preferred programmer IMO, certainly much more than an RS232-TTL converter)
www.melabs.com - PicBasicPro (also, if you don't like the PICKIT2 from www.microchip.com, check out one of MELABS programmers)
www.dictionary.com - spelling and grammar check
www.digikey.com - jumper wire for tapping into Vdd, Vss, PGC, PGD, PGM lines on the '6680, maybe even pick up a soldering iron, some solder, maybe some flux, some small drill bits, and other handy things for modifying a PCB.

gopher
- 14th January 2008, 02:48
listen dude i already downloaded the 484 page pdf on this chip. It's alot of information to chew. I have another newer piece of hardware that is reprogrammable via a serial cable. the only difference of the board is that there is a maxium max323e so i know all i gotta do is make a board with that chip and p/s and somehow solder some really small wires to the pins on the chip, program it, then unsolder it. I think there are only 3 connections to the cpu but they pop up under the chip via thru holes so i dont know where they go. According to the pdf it looks like it might be RB5,RB6,RB7? can someone confirm this?

gopher
- 14th January 2008, 02:49
and 4 real who cares about spelling this is not english class.

skimask
- 14th January 2008, 03:17
listen dude i already downloaded the 484 page pdf on this chip. It's alot of information to chew.
Really? I only see one small chapter in there relating to the programming pins and what to connect to and references to programming specifications....DUDE...


I have another newer piece of hardware that is reprogrammable via a serial cable.
That's great...problem is that PICs don't talk 'special RS232-TTL serial reprogramming language' unless they're programmed with a bootloader. A blank chip won't talk to anything but a programmer...which...(read on)...


so i know all i gotta do is make a board with that chip and p/s and somehow solder some really small wires to the pins on the chip, program it, then unsolder it. I think there are only 3 connections to the cpu but they pop up under the chip via thru holes so i dont know where they go. According to the pdf it looks like it might be RB5,RB6,RB7?
And Vdd and Vss and MCLR, because a blank chip won't take low voltage programming.
And yes, it is possible to hand solder some wire wrap wire directly to the pins (or via's or whatever) and run those wires to a programmer. Another problem is, what happens when the rest of the circuit tries to draw that power/signals off those pins at the same time as you're trying to program them. Might have to cut a couple of traces and solder-jumper them back together when you're done.

skimask
- 14th January 2008, 03:18
and 4 real who cares about spelling this is not english class.

Apparently not...
Eye dunt no wat eye waz tinkin...4 real...4 shur.
Eym nut 733t like 50m3.

gopher
- 14th January 2008, 03:51
The PIC is not blank its already soldered onto a piece of working equipment.
The new devices we reprogram with a laptop that has special software that sends data via the serial port straight into the max232e thats wired directly to the PIC. The older devices are exactly the same except no connection port and no mac232e chip. from what i can see there are only 3 connections from the max232 the the PIC
I just don't know what they connect to..... RB5,RB6,RB7,Vdd,Vss or MCLR ?

atwoz
- 14th January 2008, 04:28
Use Google and do a little research about ICSP, that might help.

gopher
- 14th January 2008, 04:43
I hope you don't get the idea that i came here without trying to research this stuff.

Look here
http://s261.photobucket.com/albums/ii62/ABC-123asdfasdf/?action=view&current=BACK.jpg
and here
http://s261.photobucket.com/albums/ii62/ABC-123asdfasdf/?action=view&current=front.jpg

If someone could tell me what pins on the PIC the 3 data lines connect to??? Is that asking 2 much?

rhino
- 14th January 2008, 05:06
The new devices we reprogram with a laptop that has special software that sends data via the serial port straight into the max232e thats wired directly to the PIC. The older devices are exactly the same except no connection port and no mac232e chip. from what i can see there are only 3 connections from the max232 the the PIC

The problem here is without knowing the hardware or software differences between the two versions, who's to say the second version (with the max232) was loaded with a bootloader to allow for field updates? The first version could have been programed using ICSP or could have just been programmed and soldered into the circuit without regard for future updates.... hence the second version that is field updateable.

gopher
- 14th January 2008, 05:13
OK good point. Thanks for the reply. that is a very real possibility. Since the PIC chips are exactly the same I think it may be worth a try to save some money.

rhino
- 14th January 2008, 05:29
I understand where you're coming from. But you got to look at it this way... without knowing all of the details of the revision, you may end up with a smoked board, and end up paying for a new one instead of an upgrade.... or whatever the details may be in your case. Hate to see that happen.

gopher
- 14th January 2008, 05:31
the thing is we got tons of extra old ones that will probably hit the trash if we decide to buy new

rhino
- 14th January 2008, 05:43
Well... if you've got tons of old ones, hack away. That's my favorite way to learn about something. Personally, I'd desolder one of the old ones and see if the code protection fuses were blown, then inspect the circuit boards to see where the differences were. If the only differences is the serial connection, then chances are the manufacturer found a bug, fixed it, then thought to themselves.... hmmm what if this happens again? So they decide to flash it with a bootloader so they can send Joe customer a new revision that he can update himself instead of sending in a board, or buying a new one, etc. Sounds like you've got nothing to lose but time and sanity! Have fun with it.

gopher
- 14th January 2008, 05:51
You may be right. I might ask the techs to unsolder the chip from the new one, they have a nice hot air rework station. I did try unsoldering one of the old ones with a soldering iron, but its to hard to get all the pins heated evenly. Thanks again.

BobK
- 14th January 2008, 13:08
Hi Gopher,

I noticed 9 holes on the front view. Alot of products in the alarm industry have either pads or holes for ICSP programming. It's possible that these holes might be for a tester or programmer. Try metering them to see if they connect to the ICSP pins on the PIC. Like you said, you've got alot of these boards. The RS232 chip could be for sending and receiving data and/or could be for a bootloader as was mentioned earlier.

HTH,

BobK

gopher
- 15th January 2008, 01:13
ok here is what i traced

max232 pins 2,5 (INVALID, FORCEON) goes to PIC pin 30 (RC0/T1OSO/T13CKI)
max232 pin 4 (T1IN TTL/CMOS Transmitter Outputs) goes to PIC oun 31 (RC6/TX/CK)
max232 pin 6 (R1OUT TTL/CMOS Receiver Outputs) goes to PIC pin 32 (RC7/RX/DT)

does this sound like it makes any sence? can USART pins be used to program a part of the chips memory ?

skimask
- 15th January 2008, 18:38
does this sound like it makes any sence? can USART pins be used to program a part of the chips memory ?

No, not without some sort of preloaded bootloader software (and the knowledge to operate it) loaded into the PIC that's already soldered on the PCB.
You need to hook into PGC/PGD/PGM/MCLR and all Vdd and Vss, and have those pins isolated from major loads on the rest of the PCB to keep from messing with the programming signals.
But you already knew that judging from Post #9...right?