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.

Microcontroller Programming » I can write to my MCU but it won't work

May 31, 2011
by thatguy
thatguy's Avatar

Hey guys,

I don't know what has happened, but I am using the printf function to write to the computer, my program WAS working 2 days ago, (i didn't tamper with code) and now it's not working,

Today i was initially trying out some new code on it, when that didn't work I reverted back to my old (unchanged) code, now I am able to write to the chip however, I expect to see lines printed in hyperterminal and there is nothing coming up, the chip isn't lighting any LED's which would have been on the board for testing purposes either....

Is there a way to fully flash the chip or any tests I can do to see if the chip is damaged?

Thanks in advance !

May 31, 2011
by 6ofhalfdozen
6ofhalfdozen's Avatar

Heya Thatguy,

A couple quick suggestions..

  1. double check the switch/jumper on pin14 (the program/run switch), from time to time I swear my mcu died, when in fact i just left it in programming mode.

  2. You can always download the temperature sensor code to the mcu again. The code when running sends the temperature readings over the serial cable and hyperterminal will see it, even if there is not temp sensor attached.( I use this as a uart diagnostic testing tool all the time)

June 01, 2011
by thatguy
thatguy's Avatar

I've tried putting on the temperature sensor code and still nothing,

Something i've noticed, when i am not in programming mode, the pin PB0 is giving out 5 volts, it's very strange :(

June 01, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi thatguy,

Just to make sure I understand the symptoms. You can flash the chip with any new programs, and the command line shows no errors, but when you do flash a program the chip does not seem to respond? Have you tried flashing a very simple program like blinking an LED just to make sure there is nothing in the LCD wiring that is tripping you up.

Humberto

June 01, 2011
by thatguy
thatguy's Avatar

I've done what you said Humberto, and it seems to only...... work when it wants to, I wrote the program twice to the chip before attempting anything and I got it to work once (turning on an LED), It just seems a bit bizarre, It could be just my machine or something small, I was just wondering was it a common problem, I was afraid I did damage to the chip because I was using pin 14 and I thought I might done something to damage the chip.

Hopefully I will have a better day tomorrow with it, thanks guys !

June 03, 2011
by BobaMosfet
BobaMosfet's Avatar

First rule of debugging- don't assume because your code seemed to work the first time and now isn't, that it was right. Either it or something else about your setup was different than it is now.

Assume nothing, check everything.

BM

June 03, 2011
by BobaMosfet
BobaMosfet's Avatar

Don't fixate on pin 14 being +5-- that may just be due to a pullup.

BM

Post a Reply

Please log in to post a reply.

Did you know that you can use a transistor to interface between different voltage levels of digital logic? Learn more...