Programming the ICs

Discussions related to MegaDrum Hardware

Re: Programming the ICs

Postby gastric » Thu Nov 13, 2008 2:58 pm

Japi, If that's how the PIC pinout is then I'm getting:

* 0.140V on Pin 14
* 5.07V on Pin 20

Is that how all ICs pinouts are? Linear from Pin1 like that? I assumed the IC pinout was the same as the LCD socket pinout as documented here: viewtopic.php?f=3&t=131


Synthex, there are no detailed instructions on how to program either the PIC or Atmega. So I simply installed all ICs on the board as pictured and attempted to program the PIC first, then the Atmega, neither of which as worked as noted here. I need very specific directions on how to proceed with troubleshooting and programming the IC.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby Synthex » Thu Nov 13, 2008 7:02 pm

There is a doc for the Atmega :
http://www.megadrum.info/faqs.php#Firmware

For the PIC, this can be a good start :
http://www.megadrum.info/forums/viewtopic.php?f=3&t=38&st=0&sk=t&sd=a&start=50

I'll do a little documentation on programming PIC.
Synthex
 
Posts: 1471
Joined: Fri Oct 12, 2007 6:06 am
Location: France

Re: Programming the ICs

Postby gastric » Thu Nov 13, 2008 8:29 pm

Synthex wrote:I'll do a little documentation on programming PIC.


That would be very appreciated. It's not even clear if you should program PIC with ONLY that IC in the socket or what. And it's definitely not clear what it means when errors are generated using WinPIC. I'd think there's be a bunch of somewhat standard things to inspect after encountering errors.

As far as the Atmega, the same applies. Additionally I see mention of a "bootloader" though it's not clear if that's the same process that described for the firmware installation by Dmitri on the main Megadrum pages or not. I've certainly tried nothing specific to a "bootloader" prior to attempting to install the firmware using PonyProg.

Currently I'm aware of myself and Bobnickelson constructing a V2.5 board without success and needing assistance. Erules said he did successfully create one though I see in a different thread he reports he has issues programming firmware to the Atmega where he has to do it a handful of times before it "takes". That doesn't give me warm fuzzies as I'm assuming it indicates some technical issue with his build as well even though he says it's working fine.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby gastric » Fri Nov 14, 2008 2:04 am

From this thread Dmitri asked estregan the following questions. I'm not positive I completely understand them since I have the V2.5 all-in-one and am not sure what some of the terms mean. Also, I've only ever used my digital multimeter to check continuity and voltage, so I'm not positive I'm using it correctly to measure resistance as I no longer have the manual. I've made notes where applicable.

Note that while doing this the entire board is built and all ICs are in the sockets except when it's requested to remove the PIC from the socket.

Without PIC18F2550 in the socket and disconnected from the Digital Board
1. What are the resistances between pin 4 of the USBExt connector and pins 1,2,3,5,6 of the same connector? Are they all indefinitely high?


I do not know what the USBExt connector is, or it's not applicable to the V2.5 board.

Connect the USB and Digital boards together.Without PIC18F2550 in the socket and without applying power (USB is disconnected) confirm the following:
1. Zero resistance between Digital board ground and pins 8 and 19 in the PIC18F2550 socket.
2. Zero resistance between VCC of Digital board and pin 20 in the PIC18F2550 socket.
3. What is the resistance between pins 19 and 20 in the PIC18F2550 socket? Is it more than 1k?
4. What is the resistance between pins 19 and 14 in the PIC18F2550 socket? Is it indefinitely high?


1. For digital board ground I'm using Pin3 on PIC ISCP header which is grounded. 0 resistance.
2. I don't know what the VCC of Digital Board is.
3. 118.8 ohm (negative probe on 19, positive on 20)
4. .650 M ohm (negative probe on 19, positive on 14)

Still without PIC18F2550 in the socket apply power to Digital board.
1. What is the voltage between Digital board ground and pin 19 in the PIC18F2550 socket? Is it 0?
2. What is the voltage between Digital board ground and pin 20 in the PIC18F2550 socket? is it +5?
3. What is the voltage between Digital board ground and pin 14 in the PIC18F2550 socket? is it 0?


1. 0 V
2. 5.07 V
3. .135 V

Disconnect the power, insert PIC18F2550 into the socket and apply power again.
1. What is the voltage between Digital board ground and pin 19 in the PIC18F2550 socket? Is it 0?
2. What is the voltage between Digital board ground and pin 20 in the PIC18F2550 socket? is it +5?
3. What is the voltage between Digital board ground and pin 14 in the PIC18F2550 socket? is it 3.3? Is it really?


1. 0 V
2. 5.06 V
3. This would vary between 2.07 - 2.7 V, usually hovering around 2.15 - 2.3 V. I checked it again a while later and it was reading aroun .25 - .41 V I have problems reading voltage on Pin 14 of the PIC. I checked it again a minute later and it was .244 V and fairly steady. But before it was fluctuating fairly wildly, almost as if I wasn't holding the leads steady or something, though I was. I just checked it again after writing this and it was .8 or so.


I'm not sure where Pin 14 gets it's power. But from what I see it must be internal in the PIC itself as Pin 14 on the V2.5 board simply runs off to a 470nF resistor which then runs off to ground, assuming I'm reading the board correctly.

I don't see in that thread where estregan ever replies and follows up on this issue so it's not clear if he ever was successful or not.

I see in that same thread where two other users report the same WinPIC failures I'm seeing. lshutt said he used a LPT1 programmer with success, whatever that is. Zakir'S reported he just used an old version of the firmware, but I'm using "MegaDrum USB MIDI Firmware 18F2550 12MHz V2.hex"
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby dmitri » Fri Nov 14, 2008 12:28 pm

Let's think logically.
Without PIC18F2550 in the socket, pin 14 of the socket is effectively disconnected from everything. There MUST be exactly 0v on this pin without the IC in the socket and it MUST read infinitive resistance between this pin and anything else.
If it is not the case, then this pin either has a short somewhere or the capacitor connected to this pin is bad.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Programming the ICs

Postby gastric » Fri Nov 14, 2008 3:58 pm

What exactly should I be looking at when troubleshooting this? Pin14 only connects to a single capacitor which connects to ground. What issue would have to exist for Pin14 to be getting ANY voltage at all? Something else being fed from the USB power (USB Pin1) would have to be leaking voltage to the ground of the board, which then would go back up via ground through the capacitor to Pin14? The USB power is fed to a ton of places across the board, I'm just trying to determine if that's where I need to focus?

Troubleshooting could possibly be easier if I could isolate the USB portions of the V2.5 board so I don't have to consider the rest of the board while addressing the PIC and it's programming. Is that possible? And if so, what components do I need to remove to isolate it?
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby dmitri » Fri Nov 14, 2008 4:40 pm

gastric wrote:What exactly should I be looking at when troubleshooting this? Pin14 only connects to a single capacitor which connects to ground. What issue would have to exist for Pin14 to be getting ANY voltage at all? Something else being fed from the USB power (USB Pin1) would have to be leaking voltage to the ground of the board, which then would go back up via ground through the capacitor to Pin14? The USB power is fed to a ton of places across the board, I'm just trying to determine if that's where I need to focus?

Troubleshooting could possibly be easier if I could isolate the USB portions of the V2.5 board so I don't have to consider the rest of the board while addressing the PIC and it's programming. Is that possible? And if so, what components do I need to remove to isolate it?

Don't quite get the wording "to be leaking voltage to the ground of the board". When you measure voltages anywhere on the board, you measure it against the ground. So when you measure any place on the board which is meant to be a ground, you measure it against the ground and so you MUST read 0 no mater what "leaks" into this ground. When you measure the voltage on the pin 14, the pin is connected to the ground ONLY through a capacitor which, for a constant current, is an isolator so the voltage MUST read as zero. If it doesn't, there must be a short somewhere which feeds a current to the pin and so you get some voltage there. For the same reason, that a capacitor is an isolator for a constant current, it MUST read infinitive resistance between this pin and anything else, including the ground.
To start with, unsolder/cut the capacitor and make measurements again.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Programming the ICs

Postby gastric » Fri Nov 14, 2008 7:08 pm

I have no specific knowledge of electronics. So now that I know that measuring against ground should always be 0.

I desoldered the capacitor and while doing that appear to have somehow ruined the trace from Pin14 to the mounting hole for the capacitor. Or at least it's covered partially with some non-conductive residue as I cannot get continuity from Pin14 to the mounting hole, only partially down the trace to that hole where the trace is still visibly exposed. Unsure if I can repair that, but that's likely a totally different issue. Just to clarify, the trace is partially covered in some residue from desoldering with a desoldering braid. There's no continuity from Pin14 to anything including to the ground.

Below, when I say from Pin14 to Ground that means red lead on Pin14 black on ground. Or Pin2 to Pin3, red on is 2 black on 3.

* PIC is removed from socket
* There's absolutely no continuity from Pin14 to anywhere else on the board, including ground. I checked against ground and every other solder point on the board.
* While disconnected from USB voltage from Pin14 to ground fluctuates between 0.000V and 0.011V
* While my multimeter is connected to nothing (probes touching nothing) it fluctuates between 0.000V and 0.005V
* While my multimeter is connected to the board ground (both probes touching the groun) it displays 0.000V
* While disconnected from USB resistance from Pin14 to ground is .685 M ohm (.635 M ohm during a later probe)
* While disconnected from USB resistance from Pin2 to Pin3 is 1.350 M ohm
* While disconnected from USB resistance from Pin3 to Pin4 is 0.618 M ohm
* While my multimeter is connected to nothing (probes touching nothing) it indicates a steady 0.F M ohm
* While my multimeter is connected to the board ground (both probes touching the groun) it indicates a steady 0.F M ohm

I have to defer to the experts as to what this all means. Uneducated user? Crappy multimeter? Multimeter needs new batteries? Bad etching where the etched masks are still slightly conductive even though they pass continuity?

At this point it all certainly makes no sense to me.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

Re: Programming the ICs

Postby dmitri » Fri Nov 14, 2008 7:29 pm

gastric wrote:* While disconnected from USB resistance from Pin14 to ground is .685 M ohm (.635 M ohm during a later probe)

Either you have conductivity between the pin 14 and the ground or your multimeter is not good enough. You must sort this out first before doing anything else.
The resistance must read infinity. Full stop.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: Programming the ICs

Postby gastric » Fri Nov 14, 2008 7:37 pm

Based on the fact the values change from test to test (are not identical and consistent) against the same pin, and the fact it passes continuity but is failing resistance/voltage, I'm assuming the multimeter is at fault. I'll have to obtain another multimeter to compare with and go from there.
gastric
 
Posts: 286
Joined: Wed May 14, 2008 1:22 am
Location: Raleigh, NC, USA

PreviousNext

Return to MegaDrum Hardware

Who is online

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