PIC18F2550-I/SP programming issues

Discussions related to MegaDrum Hardware

Re: PIC18F2550-I/SP programming issues

Postby ignotus » Sat Mar 06, 2010 9:16 am

I also had problems when programming this chip - winpic kept telling me it had failed - and after trying again and again (I mean, like +10 times), my pc suddenly recognised it as a usb audio device, despite winpic telling me yet again that it had failed. This happened to me with 2 different chips on 2 different boards and I think I recall someone else had this experience too.
If it ain't broken... fix it until it is.
ignotus
 
Posts: 882
Joined: Sat Nov 24, 2007 11:36 am

Re: PIC18F2550-I/SP programming issues

Postby The_JinJ » Sat Mar 06, 2010 11:46 am

I've double checked the cable, connections etc and all seems ok
Taking measurement at the PIC with options selected in WinPic I get readings as follows:

Pin 26 - VPP checked - 5v
Pin 27 - Clock checked - 5.5v
Pin 28 - Data (To PIC) checked - 2.12v

I took the voltage direct at the connection to the PC and it only outputs 2.12v on pin 8 of the serial - looking at other posts this should be 3.3v (or higher) - I'm thinking this is what's causing the programming to fail(?)

Any ideas?

One other question, what is the relevance of Pin1 to ICSP pin1 and VCC to ICSP Pin 2 when they aren't used in the cable?
The_JinJ
 
Posts: 38
Joined: Fri Feb 12, 2010 12:36 am

Re: PIC18F2550-I/SP programming issues

Postby dmitri » Sat Mar 06, 2010 1:05 pm

If PIC is not driving this pin when connected over a cable to a PC the voltage there can be anything between 0 and ~5V.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: PIC18F2550-I/SP programming issues

Postby The_JinJ » Sat Mar 06, 2010 1:18 pm

dmitri wrote:If PIC is not driving this pin when connected over a cable to a PC the voltage there can be anything between 0 and ~5V.


Thanks, seems comms port is ok then (?) - any other ideas why the PIC isn't being written to? I'm at a bit of a loss as what to check next!
The_JinJ
 
Posts: 38
Joined: Fri Feb 12, 2010 12:36 am

Re: PIC18F2550-I/SP programming issues

Postby dmitri » Sat Mar 06, 2010 1:30 pm

Start from scratch: make another cable and use another PC.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: PIC18F2550-I/SP programming issues

Postby The_JinJ » Tue Mar 09, 2010 12:29 pm

Ok I rebuilt the cable and am using a different PC and I'm still having problems.

Here are the config settings auto loaded from the hex fileloaded:
Image

When I check voltages as mentioned previously they seem correct but when I go to program this is the output

Code: Select all
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
Parsed "C:\Program Files\MPLAB\MPLAB IDE\Device\PIC18F2550.dev" : found 113 bit combinations in 39 configuration bit groups .
PIC18F: family='21'=4550, WriteLatch=32 bytes, EraseLatch=64 bytes .
Initialising PIC-Programmer: Success.
Testing: delay(500ms) took 0.50 seconds, timer_freq=2994.9600 MHz ... ok
Results from LoadHex: LastProgAdr=0x001692 LastDataAdr=0xEFFFFF (C:\Downloads\PIC18F2550_USB_4_8_12_16_20MHz\pic18f2550usb_12MHz.hex)
Programming...
Erasing ("bulk" or "chip") ...
Erasing chip using algorithm "PIC18F" .
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 00CF3F  ==> diff=00C11D
Verify Error: 300002: read 00FFFF, wanted 001E3F, mask 001F3F  ==> diff=000100
Verify Error: 300004: read 00FFFF, wanted 0081FF, mask 008700  ==> diff=000600
Verify Error: 300006: read 00FFFF, wanted 00FF85, mask 0000E5  ==> diff=000060
ERROR: Programming FAILED !


Reading the chip appears ok with no errors.

This was a new PIC, the clock and caps were tested/replaced to eliminate problems there.

Any other ideas what to check?
The_JinJ
 
Posts: 38
Joined: Fri Feb 12, 2010 12:36 am

Re: PIC18F2550-I/SP programming issues

Postby dmitri » Tue Mar 09, 2010 12:55 pm

There is nothing more to check. It is one of these:

1. Faults, errors, shorts, breaks on the board.
2. Errors in the cable/connectors.
3. Problem with the COM port.
4. Faulty PIC.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: PIC18F2550-I/SP programming issues

Postby The_JinJ » Tue Mar 09, 2010 1:12 pm

Just to check, the ICSP cable is connected as such:

2550 Pin 26 --> 10k resistor -->DB9 Pin 3
DB9 Pin 8 --> 10k resistor --> DB9 Pin 4
GND --> no resistor --> DB9 Pin 5
2550 Pin 27 --> 10k resistor --> DB9 Pin 7
2550 Pin 28 --> no resistor --> DB9 Pin 8

Is this the correct connections (I ask as pin 1 and 2 of the connector on the schematic are connected to VCC but aren't connected to the cable)
The_JinJ
 
Posts: 38
Joined: Fri Feb 12, 2010 12:36 am

Re: PIC18F2550-I/SP programming issues

Postby dmitri » Tue Mar 09, 2010 1:29 pm

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

Re: PIC18F2550-I/SP programming issues

Postby Johnfreeth » Tue Mar 09, 2010 6:30 pm

Are you using a aready made cable to connect the MegaDrum to the computer COM port? . if you are be aware that their Are two typesof cable one with Straight Connection and one with Crossover Connections.
This site explains it
http://digital.ni.com/public.nsf/allkb/ ... 720071DECF
Johnfreeth
 
Posts: 18
Joined: Tue Feb 23, 2010 5:23 pm
Location: Birmingham UK

PreviousNext

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 90 guests