2
\$\begingroup\$

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

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$
    – ducksauz
    Commented Oct 31, 2010 at 20:32

2 Answers 2

1
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$

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?
\$\endgroup\$
5
  • 1
    \$\begingroup\$ * 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 \$\endgroup\$
    – ducksauz
    Commented Oct 30, 2010 at 20:56
  • \$\begingroup\$ Can you post a schematic, or a picture of your circuit on a breadboard? \$\endgroup\$ Commented Oct 30, 2010 at 20:58
  • \$\begingroup\$ Schematic is available here: duksta.org/images/ProtoBreakout.png \$\endgroup\$
    – ducksauz
    Commented Oct 30, 2010 at 21:06
  • \$\begingroup\$ sorry if you hit my hotlink image. just removed that rewrite rule. :/ \$\endgroup\$
    – ducksauz
    Commented Oct 30, 2010 at 21:08
  • \$\begingroup\$ You might want to try asking this question on avrfreaks.com - though, we'll do the best we can \$\endgroup\$ Commented Oct 30, 2010 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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