[sdiy] Odd problem with LCD
Scott Gravenhorst
music.maker at gte.net
Sun Apr 5 22:32:42 CEST 2009
Tom Wiltshire <tom at electricdruid.net> wrote:
>
>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?
No, but it makes me think - weak pullup - or maybe it's not so weak (as in perhaps
the IC is bad). Do you have another PIC of the same type? I assume that the PIC is
being tested such that RB0 is only connected to the scope? Unless there's some
oddness about that pin described in the datasheet for it, I'd think it might be bad...
>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.
yeah, you need one. Heck, I'm sure you'll find a use for another one if that's not
the problem. But I think you're smelling the same dead rat that I am...
I've had that happen - pins going out, or half out. This is what scares me about
using PICs that aren't in a DIP package, SMD types that are soldered into a
controller a la the ones from Futurlec. Nice boards, but BE THOU EVER SO CAREFUL.
One possible way aroun this might be to run the pin through a resistor and then to a
pull down:
RB0 -------\/\/\/\/\----+--------> New RB0 out
|
\
/
\
/
\
|
GND
I hope that ASCIImatic worked... I don't say the above will necessary work - but
it might in a pinch... I'd still want to try a new one though. Resistor values,
maybe 100 in series, the pulldown 10K ??? Guesses. NOT A GOOD SOLUTION IMO, but
could get it running for now so you can test the rest of your code???
>Thanks,
>Tom
>
>
-- ScottG
________________________________________________________________________
-- Scott Gravenhorst
-- FPGA MIDI Synthesizer Information: home1.gte.net/res0658s/FPGA_synth/
-- FatMan: home1.gte.net/res0658s/fatman/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- When the going gets tough, the tough use the command line.
More information about the Synth-diy
mailing list