[sdiy] Odd problem with LCD

Magnus Danielson magnus at rubidium.dyndns.org
Sun Apr 5 23:16:06 CEST 2009


Tom Wiltshire skrev:
> 
> On 5 Apr 2009, at 20:48, Scott Gravenhorst wrote:
> 
>> Hey Tom,
>>
>> I'm sure you know what the heck you're doing...  That's very odd.  My 
>> experience
>> with PICs reminds me that outputs are configurable in many different 
>> ways.  I would
>> look at my own code and wonder whether I am indeed setting it as an 
>> output and with
>> the specific characteristics I need.  I would want to make sure that 
>> the line being
>> programmed _can_ be programmed exactly like the ones that work correctly.
>>
>> I also do weird little tests sometimes. In this case, I'd write what I 
>> call a "scope
>> loop", a tiny bit of infinite loop code which does only the test I 
>> want, like set up
>> the one line in question as an output and then set it high, and then 
>> low and then
>> high,low, high, forever.  Run it and stick a scope probe on it and 
>> watch it.
>> Fiddling with that loop code will usually tell what's wrong - eventually.
> 
> Hi Scott,
> 
> I've now got just the uP and the LCD on the breadboard, and I've got the 
> same problem.
> 
> I set up a "scope loop" like you suggested (I like it - I could use some 
> terminology for some of these tricks!). It sets all Port B pins high, 
> then waits, then sets them low, then waits, then repeats.
> All the port pins are fine, except for RB0, which goes high correctly, 
> but doesn't go to zero when it is low. Instead, there is a small voltage 
> remaining. Presumably this is enough for the LCD to think the pin is 
> still high. Ever seen anything like that before?

Either you go between '1' and 'Z' so you are infact steering it into an 
input that forcing it into 0 with the output direction.

Another thing may be a result of a small short to VCC such that it tries 
to pull it low but the short is too strong.

You can check for the short in power off condition.

Unpop the PIC may also help.

> I'm beginning to suspect that I might be playing with a chip with a dead 
> or damaged I/O pin...and (of course) that's one of the ones that I don't 
> have spare of, so I can't easily test that theory.

You still need to test for simple things like shorts and programming 
errors... those are much cheaper. :)

You can also attempt to put a pull-down resistor of say 470 Ohm on the 
pin, this will help you to find out if you have a 'Z' drive or a short.
If it dips down with the resistor, then you have a 'Z' drive issue 
(programming fault or broken chip) where as if it stays up you have a 
short-problem most probably.

Cheers,
Magnus



More information about the Synth-diy mailing list