NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Initial load program loads, doesn't execute.....

December 12, 2010
by mbobak
mbobak's Avatar

Hi all,

Ok, I got everything wired up, and got the initial (pre-loaded) program to run.

Then wired up the programming header, and the USB-Serial cable, and I thought I was on my way. I managed to compile and flash the initialload.c, and it seemed to work fine.

I disconnect battery, switch SPDT from up (program mode) to down (run mode) and re-attach battery, and I get nothing....

I've used meter to make sure I have +5V on rail, and have +5V across pins 1-2 of the LCD.

The LCD is definitely getting power.

Here's a picture of what I've done: My NerdKit

Anyone see something I missed?

-Mark

December 12, 2010
by bretm
bretm's Avatar

The red wire from the programming header isn't going anywhere, but that's probably OK since it should be getting power from the USB, and you said it programmed OK.

The second-from-the-bottom yellow wire going into the LCD looks like it might have popped out but I can't tell for sure from the picture.

The bottom-most yellow wire going into the breadboard is connected to row 27 (good) but it looks like the contrast resistor is going to row 26. The contrast resistor should bridge rows 29 and 27.

December 12, 2010
by mbobak
mbobak's Avatar

Hi Bret,

Yeah, the red wire from USB is power, and the installation instructions tell you to put in pin 9, which they specifically explain goes nowhere, which is fine since I'm pulling power from battery, not USB.

The second from bottom yellow into LCD, yes, it looks like it popped out, but it didn't. It's just got a little extra bare wire exposed. I tested it w/ meter, by setting continuity test, and I put one probe at the point where the wire goes into breadboard, and other probe on the LBD board, at the solder point where that pin is soldered to the board. I have continuity through the LCD connector for that wire.

As to the resistor, you can't see it in the picture above, but it does go to pins 29 and 27.

Here's a close-up pic of the resistor: resistor closeup

Any other thoughts or suggestions are welcome.

Thanks,

-Mark

December 12, 2010
by mbobak
mbobak's Avatar

I just pulled the battery and put in USB power source, and added the other SPDT switch from the kit, so now I have a power switch, as well.

Needless to say, it didn't make any difference.

I think I'm going tear it down and redo all the connections (at least for the LCD).

-Mark

December 12, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Mark,

I thought it was the contrast resistor too. One thing I noticed is the power connection on row 19 on the right side of the board looks like it is going off into the GND rail when it should go to +5V it might just be the angle again but it is worth taking a look at.

Have you tried programming the chip again. Just to test what happens? That will give us some information as to what is going on. When you put the chip into programming mode do you get the black bars you would expect to get on the LCD?

Humberto

December 12, 2010
by mbobak
mbobak's Avatar

Ok, tore it down and reconnected one more time, no joy....

Here's something interesting...I mentioned that I re-wired for USB power. Well, I was checking voltage, making sure switch was wired right, and everything looked good, and I discovered something. Seems that when I put my probes across the +5 and G rails on either side of the breadboard, I get a +5.1V reading, which is fine. But, if I switch off, I still see +2.5V! Huh? Where is this voltage coming from?? Battery is totally disconnected and out of the picture. Well, after a bit of fiddling, I discovered that if I disconnect the USB green and yellow wires, voltage will drop to 0.0 when I flip the switch, but if they are connected, I get +2.5V, even if my switch is off.

Is this normal? Could this be the source of my problem?

AdvThanksance,

-Mark

December 12, 2010
by mbobak
mbobak's Avatar

Humberto,

Thanks for the update. I checked, the wire coming off 19 on the right definitely goes to +5V rail, not G.

Also, when in programming mode, the LCD does nothing. It never lights up. However, programming mode is 100% rock solid. It works every time.

I'm thinking that I've either: 1.) somehow fried the LCD? 2.) have a difficult to detect wiring problem.

Question: What's the minimum I can connect to the LCD for a sanity check, to see if it will even light up at all?

Thanks,

-Mark

December 12, 2010
by mbobak
mbobak's Avatar

Just re-tested program mode, it remains 100% reliable, no errors.

December 12, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi mbobak,

You can try connecting only the power connections to your LCD and then taking the contrast wire and alternating between +5V and GND, one of these should cause your LCD to be all black (full contrast) this will at least tell you your LCD is turning on.

Are you sure the contrast resistor is the correct one (brown, black, red), and that it is snuggle in place?

Humberto

December 12, 2010
by mbobak
mbobak's Avatar

Finally,success!!

"Congratulations! Your USB NerdKit is alive!"

First, I did the test, as Humberto advised, and verified that the LCD was working. At that point, I knew it had to be the contrast resistor!

Ok, so, there were two issues, both related to the contrast resistor.

1.) Initially, when I re-built the entire board, I re-bent the resistor leads so that they bent back under the resistor, and then went down into the board, so that the resistor was flush w/ the board. This, apparently, was not a good connection. So, instead, I re-bent the leads off the resistor so that they bend 90 degrees from the end of the resistor. But, then the resistor is too long to connect directly from 29 to 27. So, I mounted it diagonally, so that it's cleanly flush with the board, and the diagonal makes for the right length to connect at 29 and 27. So, bad resistor mount when I stripped and reassembled the board, solved.

2.) When I switched from 9V battery to USB, I pulled the voltage regulator, and I pulled the wire jumpering it over to the rail. When I did that, I also pulled the wire that jumpered 29 to G, so, suddenly, the contrast resistor didn't have a connection to G. Oops!

So, fixed those two issues, and I'm back in business!

Yay! :-)

Thanks to everyone who took the time to read this, especially Bret and Humberto!

-Mark

December 12, 2010
by mbobak
mbobak's Avatar

And, as a final follow up, I just got the temp sensor project complete!

Thanks again!

If I run into new issues, I'll start a new thread in the appropriate forum.

-Mark

Post a Reply

Please log in to post a reply.

Did you know that signed numbers need to be sign-extended when chaging variable sizes? Learn more...