pic programming failed

Discussions related to MegaDrum Hardware

Re: pic programming failed

Postby dmitri » Mon May 23, 2011 1:05 pm

atomburst wrote:hmm that is unfortunate news... now i am unsure what is wrong. anyway, i have checked my voltages again, and now they are all correct except pin 20 reads 0v instead of 5v, is there a specific reason for this?

There is - your PIC doesn't get power (+5v).
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: pic programming failed

Postby Maylord.war » Thu Jun 21, 2012 12:05 am

Hi all

Today i've tryed my first attempt to programming pic. I use the Digital Board of original 32input schematic , with all component fitted in place ( atmega644, 6n138 , cap's and resistors )

The pcb works perfectly (browse to menu, send/receive MIDI with midi interface, led activity works good etc).

My voltage on the pin wih ICSP and Usb connected are:

1: 5.07v
8: 0v
9: 2.03v
10: 2.33v
14: 3.34v
15: 0v
16: 2.99v
17: 5.06v
18: 5.06v
19: 0v
20: 5.08
26 -0.60 (negative tension)
27 -0.60 (negative tension)
28 -0.60 (negative tension)

I've tryed with WinPic following this instruction:

1) Connected all in place
2) Run WinPic
3 Go to Interface tab, select inferface type to COM84 or JDM(2), (Make sure the COM port is right,in my case is COM1)
4)Go to Device Configuration tab, select Pic18F2550
5)File-->Load--->Loading the Firmware pic18f2550usb_12MHz.hex
6) Go to Device Tab, click on Program (CODE + DATA + CONFIG )

The file log

Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x001692
Verifying CODE, 0x000000..0x001692
Verifying 0x000000..0x001692
Verify Error: 000000: read 00FFFF, wanted 00EF30, mask 00FFFF ==> diff=0010CF
Verify Error: 000002: read 00FFFF, wanted 00F00B, mask 00FFFF ==> diff=000FF4
Verify Error: 000004: read 00FFFF, wanted 000012, mask 00FFFF ==> diff=00FFED
Verify Error: 000006: read 00FFFF, wanted 000012, mask 00FFFF ==> diff=00FFED
More Verify Errors, unable to list all (total=2890)
Programming CONFIG, 0x300000..0x30000C
Verifying CONFIG, 0x300000..0x30000C
Verifying 0x300000..0x30000C
Verify Error: 300000: read 00FFFF, wanted 000E22, mask 00FFFF ==> diff=00F1DD
Verify Error: 300002: read 00FFFF, wanted 001E3F, mask 00FFFF ==> diff=00E1C0
Verify Error: 300004: read 00FFFF, wanted 0081FF, mask 00FFFF ==> diff=007E00
Verify Error: 300006: read 00FFFF, wanted 00FF85, mask 00FFFF ==> diff=00007A
More Verify Errors, unable to list all (total=7)
ERROR: Programming FAILED !

I've tryed on the same PC but in another partition with windows XP, results? The same problem.

The ICSP cable is correct, the same for the resistor (10k).

I can't remove the atmega because i soldered the IC directly on the PCB, is possible cause for programming PIC?

Thanks in advance. :roll:
Maylord.war
 
Posts: 210
Joined: Fri Feb 19, 2010 2:42 am

Re: pic programming failed

Postby dmitri » Thu Jun 21, 2012 10:46 am

Maylord.war wrote:I can't remove the atmega because i soldered the IC directly on the PCB, is possible cause for programming PIC?

No.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: pic programming failed

Postby Maylord.war » Thu Jun 21, 2012 3:21 pm

I've read all the post of this topic but i never see the negative values tension on pin 26 27 and 28.

Can you confirm , it's normal ? ( the ICSP and USB are connected on PC)
Maylord.war
 
Posts: 210
Joined: Fri Feb 19, 2010 2:42 am

Re: pic programming failed

Postby dmitri » Thu Jun 21, 2012 4:07 pm

I don't use ICSP cable any more so I cannot measure myself but I believe it should be 0. As far as I can judge you measure voltage with the ICSP cable connected to the COM port and you have done something wrong which cause the negative voltage to appear on those pins. I guess if you take the PIC out you will get from -5v to -15V volts on those pins which is wrong.
Check wiring/soldering/pinouts.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: pic programming failed

Postby Maylord.war » Sun Jun 24, 2012 3:38 pm

I've made an external programmer for my pic on the bread board, is very easy.

Now with winpic800 the pic is recognized, the log show me all is ok and is 100% flashed.

BUT when i connect the usb on my pc appears " device not recognized " .

I've tryed with winpic, 100% verified, without errors but again, device not recognized.

I'll try to post my dump as soon possible.

The crystal on my digital board X3: 12MhZ and X2: 20MhZ ( For pic i load the 12mhz rate hex file )
Maylord.war
 
Posts: 210
Joined: Fri Feb 19, 2010 2:42 am

Re: pic programming failed

Postby dmitri » Sun Jun 24, 2012 4:14 pm

Maylord.war wrote:I've made an external programmer for my pic on the bread board, is very easy.

Now with winpic800 the pic is recognized, the log show me all is ok and is 100% flashed.

BUT when i connect the usb on my pc appears " device not recognized " .

Look for bad soldering/wiring.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: pic programming failed

Postby Maylord.war » Sun Jun 24, 2012 6:24 pm

Edit:

I have a full success with my two 18f2550! :shock: :)

Image

In this session i used the interface i've maked into breadboard and PICpgm, add a 10k to Mclr and Vdd ( pin 1 and 20 ) and i use a small 5v battery instead the power from usb cable.

For now i have only one question, the two pic works properly but if i remove the atmega and connect the usb the pc show me " device not recognized " ,is normal ? With atmega installed the drivers (for the first time only) are automatically loaded and installed.


Thanks a lot
Maylord.war
 
Posts: 210
Joined: Fri Feb 19, 2010 2:42 am

Re: pic programming failed

Postby dmitri » Sun Jun 24, 2012 7:59 pm

Maylord.war wrote:For now i have only one question, the two pic works properly but if i remove the atmega and connect the usb the pc show me " device not recognized " ,is normal ?

No, this is not normal.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: pic programming failed

Postby Maylord.war » Sun Jun 24, 2012 9:52 pm

Solved again, the D+ D- signal's for usb are inverted.

I confirm, drivers will install automatically also without atmega installed.

Thanks :)
Maylord.war
 
Posts: 210
Joined: Fri Feb 19, 2010 2:42 am

Previous

Return to MegaDrum Hardware

Who is online

Users browsing this forum: No registered users and 93 guests