Page 1 of 4
PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 7:02 pm
by eloma33
Hi,
When i program the 18F2550 with the cable and winpic, but I do an error : I have select hex file for the 2550 20Mhz, and on my PCB, the Xtal is a 12Mhz. So with winpic, I select "erase", I select the good hex file (12Mhz), and I chose "program", but when winpic verify the memory, there is error, and the pic is not programed.
When I do the first programmation, the USB works fine, but the programmation of the ATMEGA, it doesn't work. That's why I would like to erase the PIC and redo the programmation.
Thanks all for your help, and sorry for my very bad english.
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 7:25 pm
by dmitri
What is the question?
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 7:30 pm
by eloma33
First programmation success, but wrong hex file.
Second programmation don't works.
Is someone know why second programmation don't works ?
I would like to erase first program in the PIC, and write the good hex file.
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 7:45 pm
by dmitri
eloma33 wrote:First programmation success, but wrong hex file.
Second programmation don't works.
Is someone know why second programmation don't works ?
Does the programmer give any more info besides very brief messages "success"/"don't work"?
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 7:55 pm
by eloma33
When I do the first programmation, the process success. When I connect the megadrum with usb, the PC find it. But I realise that I write PC with the PIC18H2550-20Mhz, and the programmation of the ATMEGA don't works, so I think it's because I write the wrong hex file in the PIC.
Then I would like to write the good one (PIC18F2550-16Mhz) in the PIC, but when I did this operation, I've got error, and the pic is not programmed.
I've got message like this :
Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x001692
Verifying CODE, 0x000000..0x001692
Verifying 0x000000..0x001692
Verify Error: 000000: read 000000, wanted 00EF30, mask 00FFFF ==> diff=00EF30
Verify Error: 000002: read 000000, wanted 00F00B, mask 00FFFF ==> diff=00F00B
Verify Error: 000004: read 000000, wanted 000012, mask 00FFFF ==> diff=000012
Verify Error: 000006: read 000000, wanted 000012, mask 00FFFF ==> diff=000012
More Verify Errors, unable to list all (total=2875)
Programming CONFIG, 0x300000..0x30000C
Verifying CONFIG, 0x300000..0x30000C
Verifying 0x300000..0x30000C
Verify Error: 300000: read 000000, wanted 000E22, mask 00FFFF ==> diff=000E22
Verify Error: 300002: read 000000, wanted 001E3F, mask 00FFFF ==> diff=001E3F
Verify Error: 300004: read 000000, wanted 0081FF, mask 00FFFF ==> diff=0081FF
Verify Error: 300006: read 000000, wanted 00FF85, mask 00FFFF ==> diff=00FF85
More Verify Errors, unable to list all (total=7)
ERROR: Programming FAILED !
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 8:07 pm
by dmitri
eloma33 wrote:Verify Error: 000000: read 000000, wanted 00EF30, mask 00FFFF ==> diff=00EF30
Judging by this you either not powering your PIC while trying to program it or there is a problem with the ICSP cable (not connected properly, broken).
And I don't understand why you keep mentioning Atmega here. How is it relevant?
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 8:17 pm
by eloma33
Thank for your help. I'm going to check my cable tomorow, but I'm not sure this is the solution because I mesure tension on the PIC, and I've got the good tension on the PIC (5v, 3.3v).
I'm speaking about ATMEGA because when I program PIC for the first time, the usb work, but not the programmation of the ATMEGA. It's perhaps because I don't write the good hex file in the PIC (PIC18F2550-20Mhz instead of PIC18F2550-12Mhz).
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 8:23 pm
by dmitri
eloma33 wrote:Thank for your help. I'm going to check my cable tomorow, but I'm not sure this is the solution because I mesure tension on the PIC, and I've got the good tension on the PIC (5v, 3.3v).
If you're not sure this is the solution than you must have a solution in mind. What is it?
I'm speaking about ATMEGA because when I program PIC for the first time, the usb work, but not the programmation of the ATMEGA. It's perhaps because I don't write the good hex file in the PIC (PIC18F2550-20Mhz instead of PIC18F2550-12Mhz).
I still don't understand. How are trying to program Atmega using PIC?
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 8:41 pm
by eloma33
My question is : is it possible to reprogram a pic once it had been programmed ?
When I read the forum, I understand than to program the ATMEGA :
- first program the pic (to active USB) with ICSP cable.
- second : use usb cable and MDFUpdateGUI or mdfwupdate to program the ATMEGA (by using button sequence on the megadrum)
I also find 3 files (bootloader32.hex, bootloader324.hex and bootloader644.hex) on the forum, but I don't know when I use them ?
The procedure to program PIC and ATMEGA is a little difficult for me. Sorry
Re: PIC18F2550 Problem
Posted:
Sat Jun 25, 2011 8:43 pm
by dmitri
eloma33 wrote:My question is : is it possible to reprogram a pic once it had been programmed ?
Yes.
When I read the forum, I understand than to program the ATMEGA :
- first program the pic (to active USB) with ICSP cable.
- second : use usb cable and MDFUpdateGUI or mdfwupdate to program the ATMEGA (by using button sequence on the megadrum)
Only if Atmega has the protected bootloader.