Page 1 of 3

PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 9:02 am
by germtangc
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

Re: PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 10:59 am
by dmitri
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.

Re: PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 2:21 pm
by kupooglop
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...

Re: PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 2:40 pm
by dmitri
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.

Re: PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 3:01 pm
by kupooglop
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.

Re: PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 3:05 pm
by germtangc
some other related thread made mention about length of programming cable, what maximum length are we talking here?

Re: PIC18F2550 "problem"

PostPosted: Sat Apr 16, 2011 3:38 pm
by kupooglop
6 foot i.e. (2 meters) works

Re: PIC18F2550 "problem"

PostPosted: Tue Apr 19, 2011 1:25 pm
by germtangc
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.

Re: PIC18F2550 "problem"

PostPosted: Tue Apr 19, 2011 1:44 pm
by dmitri
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.

Re: PIC18F2550 "problem"

PostPosted: Thu Apr 21, 2011 9:01 am
by germtangc
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