Problem Programming PIC18F2550

Discussions related to MegaDrum Hardware

Re: Problem Programming PIC18F2550

Postby dmitri » Mon Jul 13, 2009 11:30 pm

jman 31 wrote:I was wondering if I should be using a different programming cable than the one shown on the schematics page for the v2.5?

The schematic for an ICSP cable you should be using is shown in https://www.megadrum.info/~megadrum/sit ... _kicad.png
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: Problem Programming PIC18F2550

Postby jman 31 » Tue Jul 14, 2009 12:02 am

For some reason I am getting an error for going to the page you showed Dmitri, could you try it again?

Is this the page you are sending me to? http://www.megadrum.info/content/schematics
jman 31
 
Posts: 536
Joined: Thu Jul 10, 2008 10:51 pm
Location: USA

Re: Problem Programming PIC18F2550

Postby dmitri » Tue Jul 14, 2009 9:15 am

Sorry, I posted the link not realising that I 'copy-pasted' while logged into my site. But yes, you can reach the same schematic by going through the Schematics page.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: Problem Programming PIC18F2550

Postby jman 31 » Tue Jul 14, 2009 1:24 pm

Alright, so I changed computers and I got the same error, but...... this time is actually picked it up in windows and loaded the drivers. It seems to be doing exactly what it is supposed to as I follow the FW updating procedure. I am currently at this step.

In MIDI-OX go to View->SysEx... In the SysEx window go to Command Window-> Load File... and load the MegaDrum firmware .syx file matching your MegaDrum hardware, e.g. for 32 inputs MegaDrum with Atmega32 at 16MHz it will be megadrum32_16_32_20090306.syx where first '32' is type of Atmega, '16' - crystal frequency, second '32' - number of inputs and '20090306' - firmware version. Still in the SysEx window go to Command Window->Send Sysex. It will start sending the new firmware to MegaDrum. The MIDI LED should be flashing around twice a second. After around 10-15 seconds the update should finish, MegaDrum should show 'Updated finished' and it will restart automatically in a couple of seconds. If it doesn't work, then you didn't select bootloader frequency matching your Atmega crystal or you have hardware problem in your MegaDrum board or your Windows installation is screwed up.


and I am looking for the latest SysEx. We shall see........
jman 31
 
Posts: 536
Joined: Thu Jul 10, 2008 10:51 pm
Location: USA

Re: Problem Programming PIC18F2550

Postby jman 31 » Tue Jul 14, 2009 1:38 pm

It's aliiiiiiive.... OK now I'm getting somewhere. Got the latest FW in there and everything seems fine and dandy.

Thanks for the help Dmitri!
jman 31
 
Posts: 536
Joined: Thu Jul 10, 2008 10:51 pm
Location: USA

Re: Problem Programming PIC18F2550

Postby Firelord » Tue Jul 21, 2009 6:51 pm

Unfortunately, programming my PIC18F2550 also failed. Here's the log...

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
Couldn't find "devices\PIC18F2550.dev", please borrow/copy from MPLAB !
PIC18F: family='21'=4550, WriteLatch=32 bytes, EraseLatch=64 bytes .
Initialising PIC-Programmer: Success.
Testing: delay(500ms) took 0.50 seconds, timer_freq=3.5795 MHz ... ok
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 .
Initialising PIC-Programmer: Success.
Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x001692
Verifying CODE, 0x000000..0x001692
Verifying 0x000000..0x001692
Programming CONFIG, 0x300000..0x30000C
Verifying CONFIG, 0x300000..0x30000C
Verifying 0x300000..0x30000C
Verify Error: 300004: read 008100, wanted 0081FF, mask 00FFFF  ==> diff=0000FF
Verify Error: 300006: read 000085, wanted 00FF85, mask 00FFFF  ==> diff=00FF00
ERROR: Programming FAILED !


Any ideas on what's going on in here?
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Problem Programming PIC18F2550

Postby dmitri » Tue Jul 21, 2009 7:02 pm

Firelord wrote:Unfortunately, programming my PIC18F2550 also failed. Here's the log...

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
Couldn't find "devices\PIC18F2550.dev", please borrow/copy from MPLAB !
PIC18F: family='21'=4550, WriteLatch=32 bytes, EraseLatch=64 bytes .
Initialising PIC-Programmer: Success.
Testing: delay(500ms) took 0.50 seconds, timer_freq=3.5795 MHz ... ok
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 .
Initialising PIC-Programmer: Success.
Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x001692
Verifying CODE, 0x000000..0x001692
Verifying 0x000000..0x001692
Programming CONFIG, 0x300000..0x30000C
Verifying CONFIG, 0x300000..0x30000C
Verifying 0x300000..0x30000C
Verify Error: 300004: read 008100, wanted 0081FF, mask 00FFFF  ==> diff=0000FF
Verify Error: 300006: read 000085, wanted 00FF85, mask 00FFFF  ==> diff=00FF00
ERROR: Programming FAILED !


Any ideas on what's going on in here?

Looks like your PIC is programmed ok.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: Problem Programming PIC18F2550

Postby Firelord » Tue Jul 21, 2009 7:17 pm

However upon reconnecting the USB cable nothing happens.
Firelord
 
Posts: 666
Joined: Wed Jun 10, 2009 7:50 pm
Location: Estonia

Re: Problem Programming PIC18F2550

Postby jman 31 » Tue Jul 21, 2009 7:21 pm

I ended up just changing computers. I have no idea why it mattered, but one recognized it and one would not. Go figure. :?
jman 31
 
Posts: 536
Joined: Thu Jul 10, 2008 10:51 pm
Location: USA

Re: Problem Programming PIC18F2550

Postby dmitri » Tue Jul 21, 2009 7:26 pm

Firelord wrote:However upon reconnecting the USB cable nothing happens.

http://www.megadrum.info/forums/viewtopic.php?f=3&t=352

Also, read PIC's memory into a file and post it here.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

PreviousNext

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Google [Bot] and 74 guests