pic programming failed

Discussions related to MegaDrum Hardware

pic programming failed

Postby oliboy » Wed Jul 29, 2009 5:02 am

i can't program my pic....can you help me...pls...pls...pls....
this is the message i get from winpic...

Info: Loading definitions for "PIC18F2550" from C:\Program Files\WinPic\devices.ini .
Info: Support for some newer PIC18F devices added by Martin v.d. Werff 2005
Couldn't find "devices\PIC18F2550.dev", please borrow/copy from MPLAB !
PIC18F: family='21'=4550, WriteLatch=32 bytes, EraseLatch=64 bytes .
Failed read back of DATA line (HIGH) !
WARNING: Could not initialize programmer !
Testing: delay(500ms) took 0.50 seconds, timer_freq=2800.0600 MHz ... ok
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 !
oliboy
 
Posts: 58
Joined: Fri Oct 24, 2008 3:59 am

Re: pic programming failed

Postby Firelord » Wed Jul 29, 2009 8:42 am

oliboy wrote:WARNING: Could not initialize programmer !

Check port settings in WinPic and your programming cable (I'd check the cable first). Your PIC cannot be programmed because the programmer does not initialize (wrong port or programmer type selected in WinPic, problems with the cable or its wiring, or even problems with the board, etc). Otherwise, there is a thread here which addresses a similar problem.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: pic programming failed

Postby oliboy » Fri Jul 31, 2009 1:55 am

when i start winpic i get this message
WARNING:could not initialize programmer...
i haven't connected anything to com port...
is this normal?..
what message should i get when i start winpic?..
oliboy
 
Posts: 58
Joined: Fri Oct 24, 2008 3:59 am

Re: pic programming failed

Postby Firelord » Fri Jul 31, 2009 8:42 am

oliboy wrote:when i start winpic i get this message
WARNING:could not initialize programmer...
i haven't connected anything to com port...
is this normal?..
what message should i get when i start winpic?..

It is normal, because you actually have no programmer connected and there is nothing to initialize.

By the way, did you power up the board via USB when trying to flash the PIC with the programming cable? Did you follow these steps altogether?
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: pic programming failed

Postby oliboy » Sat Aug 01, 2009 1:23 am

i did follow the steps...
this is that i get when i try to program...

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 !
oliboy
 
Posts: 58
Joined: Fri Oct 24, 2008 3:59 am

Re: pic programming failed

Postby Firelord » Sat Aug 01, 2009 8:39 am

Please provide more information on the type of board you are using.

A bunch of quick thoughts (possible reasons for failure):

- if you are trying to program the PIC via a USB-COM or cheap PCMCIA-COM -- it will not work;
- the programming cable is defective, too long or incorrectly wired;
- the board is defective, there are shorts/breaks somewhere, or some component(s) around the PIC is not working properly, also check that you are using a correct crystal in there.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: pic programming failed

Postby jman 31 » Sat Aug 01, 2009 11:02 am

I ended up switching to a different computer. I still got the error but the computer recognized it and it flashed fine.
jman 31
 
Posts: 536
Joined: Thu Jul 10, 2008 10:51 pm
Location: USA

Re: pic programming failed

Postby Firelord » Sat Aug 01, 2009 12:53 pm

jman 31 wrote:I ended up switching to a different computer. I still got the error but the computer recognized it and it flashed fine.

Yeah, it's always a good idea to try that. But you didn't get this error:
WARNING: Could not initialize programmer !

did you?
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: pic programming failed

Postby dmitri » Sat Aug 01, 2009 1:01 pm

oliboy wrote:Verify Error: 000000: read 000000, wanted 00EF30, mask 00FFFF ==> diff=00EF30

The fact that it reads zeros everywhere means one of these:
1. PIC is not powered up when you try to program it.
2. ICSP cable is wired incorrectly.
3. Wrong or faulty COM port.
4. WinPic is not configured correctly.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: pic programming failed

Postby jman 31 » Sat Aug 01, 2009 1:07 pm

Firelord wrote:
jman 31 wrote:I ended up switching to a different computer. I still got the error but the computer recognized it and it flashed fine.

Yeah, it's always a good idea to try that. But you didn't get this error:
WARNING: Could not initialize programmer !

did you?


No actually, I think you are right. I guess that changing the computer wouldn't help there.
jman 31
 
Posts: 536
Joined: Thu Jul 10, 2008 10:51 pm
Location: USA

Next

Return to MegaDrum Hardware

Who is online

Users browsing this forum: No registered users and 86 guests