Electronic – atmega1281 + Nokia 5110 LCD circuit works with USBtinyISP plugged in. Hangs without

atmegaavr

I'm building out a circuit with an ATmega 1281 MCU, some switches for input and a Nokia 5110 LCD (SPI interface) for display. I can load code on it just fine with my USBtinyISP programmer. With the programmer connected, the code runs great. It sits there and will chug away for hours. When I remove the programmer and reset the MCU, things either freeze up or the display gets really hinky and displays garbage.

Both the LCD and the ICSP are SPI interfaces. In attempts to get it run without the ISP connected, I've tried pulling both up and down with a 10K resistor on MISO, MOSI, SCK and RST. Nothing makes a difference.

Has anyone else ever seen this happen? What did you do to fix it?

(edit: image added to question)
http://duksta.org/images/ProtoBreakout.png

Best Answer

Seems that it was a power supply issue. I switched from the 9v regulated wall wart (that came with my Arduino from Adafruit) I was using to a 9v regulated supply that came with a piece of network gear. The wall wart put out 9v @ 2/3A. The other supply puts out 9v @ 1A. The other supply also has a proper ground plug to (it uses a IEC power cable).

So, it was either an issue of not enough amperage or unclean grounding.