Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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)

share|improve this question
I've got some more data. It runs ok with the LCD attached and the ISP disconnected if I set it on a pad of anti-static material. However, if I touch it or hit one of the buttons, it hangs. If I use a 9v battery instead of the wall wart, it runs better and doesn't require the anti-static mat. So, I think I've got a grounding or ESD issue. – ducksauz Oct 31 '10 at 20:32

2 Answers

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.

share|improve this answer

There are lots of things it could be, here are some ideas:

  • You definitely need to tie RST high with a resistor
  • Is your power source good enough? Are you powering your circuit from USB?
  • What settings do you have for the brownout detection fuses in the AVR?
  • Do you have a decoupling capacitor placed near the power pin of the AVR?
  • Does the AVR circuit work ok without the display connected (can it blink an LED reliably)?
  • What are the power supply requirements of the display? Are you powering it from the same source as the AVR?
  • Does it work if you turn the LCD backlight off?
share|improve this answer
1  
* RST is tied high with a 10K resistor * Power is good. 9v wall wart feeding a AP1086-33 regulator. There's no power coming from the USBtinyISP, as I have that jumper off * Brownout fuses are all disabled * There are 100uF decouping caps on both sides (Vin and Vout) of the regulator. * It can blink an LED with the LCD both connected and disconnected – ducksauz Oct 30 '10 at 20:56
Can you post a schematic, or a picture of your circuit on a breadboard? – Toby Jaffey Oct 30 '10 at 20:58
Schematic is available here: duksta.org/images/ProtoBreakout.png – ducksauz Oct 30 '10 at 21:06
sorry if you hit my hotlink image. just removed that rewrite rule. :/ – ducksauz Oct 30 '10 at 21:08
You might want to try asking this question on avrfreaks.com - though, we'll do the best we can – Toby Jaffey Oct 30 '10 at 22:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.