PIC18F2550 "problem"

Discussions related to MegaDrum Hardware

PIC18F2550 "problem"

Postby germtangc » Sat Apr 16, 2011 9:02 am

First of all thank you Dimitri for one of the greatest shares in the internet. I finally got the time and resources to make my own megadrum module. Here are pics of what I made:
Image
Image
Image
Yes, very ghetto mod there.

I got an Atmega32L with 16MHz xtal. Anyway, I got the device working (at least the LCD says so) sans piezo testing. Then I tried programming the soic PIC18F2550 with winpic using the ICSP programmer detailed in the schematics page. But I got programming error below:

Info: Loading definitions for "PIC18F2550" from C:\Program Files (x86)\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.9074 MHz ... ok
PIC- SelectVddNorm failed
Initialising PIC-Programmer: Success.
Initialising PIC-Programmer: Success.
Programming...
Erasing ("bulk" or "chip") ...
Programming CODE, 0x000000..0x001BE4
Verifying CODE, 0x000000..0x001BE4
Verifying 0x000000..0x001BE4
Verify Error: 000000: read 00FFFF, wanted 00EFE0, mask 00FFFF ==> diff=00101F
Verify Error: 000002: read 00FFFF, wanted 00F00D, mask 00FFFF ==> diff=000FF2
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=3571)
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 got two machines XP and Windows 7 detecting "Megadrum USB Midi" but cannot find and install drivers. Is this normal or should it installed generic drivers for the MD?

Anyway, I used my DMM and got the following readings from PIC18F2550 pins:

pin 1: 4.97v
pin 8: 0.00v
pin 14: 3.33v
pin 19: 0.00v
pin 20: 4.97v
pin 26: 0.06v (connected to 47k resistor)


These are the settings in winpic:
Image
Image
germtangc
 
Posts: 31
Joined: Fri Feb 18, 2011 10:11 pm

Re: PIC18F2550 "problem"

Postby dmitri » Sat Apr 16, 2011 10:59 am

If you search the forum for "Verify Error" you will find a lot of discussions along with many possible reasons what could be wrong and many suggestions what could be done.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: PIC18F2550 "problem"

Postby kupooglop » Sat Apr 16, 2011 2:21 pm

I believe you need to go to the mplab website and download the PIC18F2550.dev file. It is contained in the freeware mplab developer's kit. I say this because of the following reasons:

1. you got this error when trying to program pic.
germtangc wrote:Couldn't find "devices\PIC18F2550.dev", please borrow/copy from MPLAB !


2. your machines actually see the pic. This means it should be able to be programmed if you had the proper .dev file
germtangc wrote:I got two machines XP and Windows 7 detecting "Megadrum USB Midi"


3. your winpic options screenshot shows the "MPLAB DEV-file directory" field as blank. It should point to the folder that contains the correct PIC18F2550.dev file.
germtangc wrote:Image


With the proper .dev file you should be able to program your pic. Depending on how many "ghetto mods" you have going on...
kupooglop
 
Posts: 116
Joined: Wed Aug 25, 2010 10:33 pm

Re: PIC18F2550 "problem"

Postby dmitri » Sat Apr 16, 2011 2:40 pm

The .dev file is not actually needed. It is only for configuration bytes to be interpreted properly at the verifying stage. In this case PIC may be programmed but it is not read properly at the verifying stage.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: PIC18F2550 "problem"

Postby kupooglop » Sat Apr 16, 2011 3:01 pm

dmitri wrote:The .dev file is not actually needed. It is only for configuration bytes to be interpreted properly at the verifying stage. In this case PIC may be programmed but it is not read properly at the verifying stage.


truth.
kupooglop
 
Posts: 116
Joined: Wed Aug 25, 2010 10:33 pm

Re: PIC18F2550 "problem"

Postby germtangc » Sat Apr 16, 2011 3:05 pm

some other related thread made mention about length of programming cable, what maximum length are we talking here?
germtangc
 
Posts: 31
Joined: Fri Feb 18, 2011 10:11 pm

Re: PIC18F2550 "problem"

Postby kupooglop » Sat Apr 16, 2011 3:38 pm

6 foot i.e. (2 meters) works
kupooglop
 
Posts: 116
Joined: Wed Aug 25, 2010 10:33 pm

Re: PIC18F2550 "problem"

Postby germtangc » Tue Apr 19, 2011 1:25 pm

Went back to the drawing board and made myself an ART2003 programmer and used winpic800. PIC18F2550 flashed without error. Installed midiox and midiyoke into my vmware virtual machine and midiox can detect midi activity from my megadrum. Tough luck with my windows 7 still no drivers available.
germtangc
 
Posts: 31
Joined: Fri Feb 18, 2011 10:11 pm

Re: PIC18F2550 "problem"

Postby dmitri » Tue Apr 19, 2011 1:44 pm

germtangc wrote:Tough luck with my windows 7 still no drivers available.

USB MIDI firmware in PIC is USB MIDI Class Compliant, which means all modern OSs - WindowsXP/Vista/7, Mac OS X, Linux - have built in drivers for it. If your Windows detects it as "Megadrum USB Midi" but says it doesn't find drivers, then there is something wrong with your Windows installation.
dmitri
Site Admin
 
Posts: 8709
Joined: Fri Aug 03, 2007 8:05 pm

Re: PIC18F2550 "problem"

Postby germtangc » Thu Apr 21, 2011 9:01 am

Dmitri, when using Windows XP, megadrum is detected as "USB Audio Device", right?

I have a new problem. I tested MD with two piezos. When tapping a piezo, it takes 2-3 seconds before vu meter returns to zero. Could this be because I use an ATMEGA32L?

Please watch this vid: http://www.youtube.com/watch?v=AIqcaGtt8qY
germtangc
 
Posts: 31
Joined: Fri Feb 18, 2011 10:11 pm

Next

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 90 guests