Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Solved] Programming an PIC18F4550 TQFP using Picstart Plus

Status
Not open for further replies.

choppa

Newbie level 3
Joined
Aug 31, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
picstart plus icsp

Hello everyone,

I'm new here, please forgive me if this has already been answered, but after spending the better part of the last 10 hours trying to fix the problem and around 4 hours searching on Google and various forums, I have not found a solution.

First the problem: I am attempting to program a PIC 18F4550 using a PICSTART Plus programmer, using ICSP (In circuit serial programming). Every time I attempt to program it, with any type of program or hex file, I get a transmission error. During verification it seems that NOTHING has been written to the PIC - either that or it didn't read anything back out of it. This only ever occurs when trying to program a 44-pin TQFP PIC 18F4550.

Just before a transmission error occurs, the PICSTART Plus lights (both green and orange LEDs) start flickering before eventually failing. If I remove the ICSP cable and just put in a normal DIP40 18F4550, it will program/read/verify everything correctly, so some how I doubt it's my programmer. If I attempt to program the DIP40 18F4550 (I think they're called DIP?) it also has no problems. The only modifications I have made to my circuit from one version to another is replacing the DIP40 (large) by a TQFP-44 (small) chip. Even when I try to program the 18F4550 TQFP on it's own, I get the errors Am I not supposed to be connecting up VCC/VSS and MCLR/RB6/RB7?

I am using:
MPLAB IDE v7.62
PICSTART Plus with PICSTART Plus Firmware Version 04.50.06
An ICSP cable
TQFP (44pin) PIC 18F4550 with pins MCLR/VCC/GND/RB7/RB6 connected to ICSP
MCC18 3.05 Compiler

Attempted under both Windows XP and Windows 2003 on different computers.


My PCB and circuit diagram has been attached, as well as a picture of the setup.
**broken link removed**
**broken link removed**
 

pic18f4550 tqfp

Another thing to add to the above - even when I try to read back the memory of the single PIC on its own on the test board, the PICSTART Plus's LEDs will at some point (usualy around mem. location 0x1f?? when it nears 0x2??) will gradually turn off (from being lit green/orange) and at that point the reading will freeze.

Anyone have any ideas, please I beg you.
 

picstart plus pic18f4550

The PICStart Plus was never designed as an ICP, they even tell you not to on the Microchip forums.
 

18f4550 icsp

blueroomelectronics, could you please elaborate? My PICSTART Plus kit came with an ICSP adapter cable (or is it ICP now?), like the one in the photo that I posted. It works fine with the DIP-40 type but not the TQFP type I guess. I'm at a loss to account for this :(

Thank you again and in advance for your help blueroomelectronics. Might you be able to recommend me something that will work correctly? I urgently need to program the system.
 

using picstart plus for icsp

you need to connect ICSP to ALL power pins (VCC and GND), not just one pair.

0x41 0x56 0x45!!
 

picstart plus icsp adapter

Hello Freddie Chopin, in my circuit the VCC and GND from the ICSP header is connected straight into the VCC and GND planes, so all VCC and GND pins on the PIC are being supplied.

I've noticed that if I disconnect the VCC from the ICSP, while powering the board from USB, I do not get a time-out any more. (i.e. I only connect the GND/MCLR/RB6/RB7 pins of the PICSTART Plus to the circuit, and so VCC is supplied from the USB).

However, when I attempt to read the program memory at the MPLAB / PICSTART says:
"Device is data protected! Data memory may be invalid.
Device is code protected! Program memory may be invalid."

If I attempt to Erase the chip (Programmer -> Erase Flash Device) it tells me "Erase operation is successful." However, reading it again gives the same error.

If I now attempt to write anything to the device (Right click anywhere in Program Memory and Fill Memory with random data) then write this, MPLAB / PICSTART says:
Code:
PICSTART Program\Verify Report
10-Jan-2008, 20:38:45

Device Type: PIC18F4550
Address Range 0-7fff


Program Memory Errors
Address  Good  Bad
0000:    CAC9  0000
0002:    D648  0000
0004:    1555  0000
0006:    1DBB  0000
0008:    61F5  0000
000A:    AA80  0000
000C:    F675  0000
000E:    E5F8  0000
0010:    A555  0000
0012:    45B5  0000
0014:    98D6  0000
0016:    8F2E  0000
0018:    5455  0000
001A:    03B7  0000
001C:    5FD8  0000
001E:    88B0  0000
0020:    D1E7  0000
0022:    9FFC  0000
0024:    2B9D  0000
0026:    C4B5  0000
0028:    BAFE  0000
002A:    001D  0000
002C:    778B  0000
002E:    CAD8  0000
0030:    0D14  0000
0032:    0E59  0000
0034:    88CE  0000
0036:    DA9B  0000
0038:    5CA5  0000
003A:    2411  0000
003C:    ACD3  0000
003E:    1DDF  0000
Any additional errors are not displayed.

Anyone have any further suggestions?

Added after 2 hours 23 minutes:

Thank you everyone for your suggestions. I have solved the issue in the following way:

1. Remove the VCC (power pin) from the ICSP cable.
2. Let the USB provide VCC to the circuit board (in my case).
3. Create a new ICSP cable as follows:
Code:
From the PICSTART Plus (position corresponding to DIP40 18F4550) ->  ICSP Header
Pin 1 (MCLR) -> Pin 1 (MCLR)
Pin 31 (VSS) -> Pin 3 (GND)
Pin 39 (RB6) -> Pin 5 (PGC)
Pin 40 (RB7) -> Pin 4 (PGD)

You can also connect Pin 32 (VDD) -> Pin 2 (VCC) if your board doesn't consume too much power, but this caused some of my problems.
4. Test Read/Write/Verify/Fill and so on.

Thanks everyone for the help, this has taken me way too long to figure out. Now I can finally get on with my work.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top