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.

Can't program bootloader into PIC18F4520 using PG2C

Status
Not open for further replies.

LOLsim

Junior Member level 3
Joined
Dec 19, 2008
Messages
29
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,502
dl4yhf programmer

I have been trying to program a bootloader into my PIC18F4520 using Olimex PG2C with no success at all.

I tried ICProg and WinPIC, selecting JDM as my programmer.

I've done the PGC/PGD filtering using two 30pF and 100ohm resistor.

Using WinPIC, I get the ca't verify all code error. And with ICProg, I get the generic 0000H error.

My cable is 1 meter long, so that might be the problem. Now, I'm trying to progarm using WinPic800 to see whether there's any difference or not.
 

step by step explanation winpic800 program

No, I don't use any ICSP cable. The cable that I mentioned is the serial RS232 cable.
 

p18f4520 pgd

I tried it with and without the 100ohm resistor and don't really have any resistor below that. The programmer has been left for weeks, I guess. Too bothersome to do anything about now.
 

jdm winpic error writing 0x000000

That's a fast reply. I don't use and don't know how to use MPLab, tried but find it too hard. I tried many different bootloader and programs using ICProg and WinPIC and can't verify successfully.
 

pic pgm pgd pgc

OK, I'm back from my overseas trip.

I've done what you told me to do and this is the result.

I don't think the code is wrong or anything, since I downloaded it from a electronics website.
 

pg2c 16f628a pull pgm to gnd!

LOLsim said:
OK, I'm back from my overseas trip.

I've done what you told me to do and this is the result.

I don't think the code is wrong or anything, since I downloaded it from a electronics website.
Oh! you have just skipped what we wanted
to the left of the (tick)(configuration bits set in code) at the top there is a configuration word.

please create that situation and read that code and intimate.

in fact if you untick it, you will be in a position to set any item in the list below that as per what the source code says. to get back same value. then it indicates what are all the parameters set.

Sarma
 

pic unknown winpic800

There is nothing at the top left of the <Configuration bits set in code>

I think maybe you mean the settings, so I've attach another screenshot here.
 

error writting address 0x000000 jdm

LOLsim said:
There is nothing at the top left of the <Configuration bits set in code>

I think maybe you mean the settings, so I've attach another screenshot here.
I understand the case better now. during programming mode that source code situation won't be there. BTW, can you check the hardware test under winpic800 and see whether it is passing. the programmer is to be defined as JDM, perhaps you may be aware.
can you check some voltages as indicated in part schematic attached ?
 

before programmer 11 v serial

For the 5V, I got 5.3V

For the 13V, before programming, I got 11V-13V, during programming, it rises to around 30V, but ends before I can get a measure.

I tried reading and it reads fine. the 13V, I got 13.5V. 5V same.

Using WinPic800, the hardware test runs fine with no error.

When programming, I got this error.

"Error > Writing address 0x000000
Written 0xEF02 Read 0xFFFF"
 

jdm2 programming 18f4550 pgm

LOLsim said:
For the 5V, I got 5.3V

For the 13V, before programming, I got 11V-13V, during programming, it rises to around 30V, but ends before I can get a measure.

I tried reading and it reads fine. the 13V, I got 13.5V. 5V same.

Using WinPic800, the hardware test runs fine with no error.

When programming, I got this error.

"Error > Writing address 0x000000
Written 0xEF02 Read 0xFFFF"
can winpic800, identify the chip when you seek?
 

icsp 18f4520

No, I did ask Winpic800 to identify my PIC but it says unknown.
 

bootloader pic18f4520 mplab

LOLsim said:
No, I did ask Winpic800 to identify my PIC but it says unknown.
please trace whether the PGC and PGD have reached the right pins wrt 18F4520 when connected to the programmer. if the right pins are connected to PGC and PGD, the device identification should happen.
I now fear whether PG2C has support for 18F series? perhaps i need to check this aspect before i could ascertain this.
whether there is need to ground the PGM pin?

May I suggest this:
instead of pushing the 18F4520 in the on board socket, please put it in breadboard, connect the icsp cable at a spare location and inter wire relevant wires to the pins
as you are using 13V programming, you need not ground the PGM pin.

then check whether the Device is being recognized.
 

PGC and PGM is connected alright.

I haven't tried not grounding PGM.

As far as I know, PG2C does support PIC18F but can have problems.
 

LOLsim said:
PGC and PGM is connected alright.

I haven't tried not grounding PGM.

As far as I know, PG2C does support PIC18F but can have problems.

POlease see that the Vdd and Vss at both locations are are connected together, and that across Vdd&Vss provide a 100nF cap.
as per the datasheet and supported devices using winpic, this chip was not there. of course it was an old pdf of 2003.
but , all said, the bread board method can make things happen. basically using winpic800 and configuring it properly, you must be able to identify the device. Only then think of next step.

other wise make a programmer using DL4YHF with external power supply, pic programmer that can work with winpic800 as JDM.
 

Vdd and Vss on both side of the PIC is connected together.

I put a 100nF cap across Vdd and Vss and it is still the same.

I can't find schematics for the DL4YHF programmer you told me about.

How about the JDM2 programmer? Should I try that one?
 

LOLsim said:
Vdd and Vss on both side of the PIC is connected together.
I put a 100nF cap across Vdd and Vss and it is still the same.
I can't find schematics for the DL4YHF programmer you told me about.
How about the JDM2 programmer? Should I try that one?

BTW, Did you try bread boarding? attached find DL4YHF schematic.
 

LOLsim said:
Vdd and Vss on both side of the PIC is connected together.

I put a 100nF cap across Vdd and Vss and it is still the same.

I can't find schematics for the DL4YHF programmer you told me about.

How about the JDM2 programmer? Should I try that one?
here again you have to pick up the ICSP connections and use breadboard, as the socket used is for 18 pin.

Looking at the PG2C in retrospect, I feel that the COM port may not be able to deliver the current load needed by the 4520 chip, thus troubling you. The externally powered device would serve well.
 

yeah off course externally powered device would be better
 

this DL4YHF model has the advantage of Vpp before Vdd
needed many times by chips like 16F628A
 

Are you sure this DL4YHF can program my PIC18F4520?

I'm considering making the PICkit2 instead.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top