View Full Version : My LCD is high.

05-08-2006, 03:30 AM
I have a little app that prints a string out to a SEETRON 216 LCD. When I end the program I get very odd looking charactors that very slowly fill the screen. But, when I send the pin HIGH when the program ends it's okay.

I thought I read some place that you generally don't want to leave pins high if you don't have too.


My project, the ElectricMotorcycle Dashboard: Em Dash (http://snipurl.com/q5gd)

Post Edited (mreish) : 5/7/2006 8:42:52 PM GMT

Chris Savage
05-08-2006, 04:09 AM
Use STOP instead of END. What's happening is this, when the program ends, the effect is similar to SLEEP.

If your application is driving loads (sourcing or sinking current through output-high or output-low pins) during SLEEP, current will be interrupted for about 18 ms when the BASIC Stamp wakes up every 2.3 seconds. The reason is that the watchdog-timer reset that awakens the BASIC Stamp also causes all of the pins to switch to input mode for approximately 18 ms. When the interpreter firmware regains control of the processor, it restores the I/O directions dictated by your program.

In your case your LCD is perceiving that as some character being sent...

Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

05-08-2006, 04:20 AM
Neat. Yes, in 'sleep' the BS2 'wakes up' every 2 seconds, and sets all pins as inputs briefly. Then the state they should have, input, output high, output low, is applied. Apparently, when you leave your pin high, this 'reset' does nothing. When you leave it low, the 'reset' looks to your LCD like it is 'bouncing' the pin high then back low -- a 'good' clock pulse, in other words.

So, in this situation, leaving the pin output high is not a problem.

The real problem is when you tie two outputs together, then try to make one output high, while the other outputs low. If you don't have a 220 ohm resistor between the two, the resulting wrestling match will burn out one or both of the pins.

05-08-2006, 04:41 AM
Sunnuvagun, I knew that because I read it earlier today! Grr...

Well, thanks for both replies. Problem solved!

My project, the ElectricMotorcycle Dashboard: Em Dash (http://snipurl.com/q5gd)