[sdiy] Odd problem with LCD
Roy J. Tellason
rtellason at verizon.net
Sun Apr 5 22:07:00 CEST 2009
On Sunday 05 April 2009 03:48:50 pm 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.
Good idea!
It's also a good idea to be using a scope rather than a meter in the first
place, as that "voltage level" doesn't really tell you whether the line is
sitting at that level or switching around it...
One computer I assembled and debugged a while back used a z80, and I had a
few problems (mostly solder bridges). The key there was to take the bus
buffer (LS245) out and solder temporarily a jumper across the data bus pins
on the z80 side of things. This effectively fed a continous stream of NOP
instructions to the z80, which would then continually increment the address
bus lines, so you'd see octavely-related square waves on each one. Or at
least you were supposed to, as I found out when the problems made themselves
apparent. :-)
The other thing I'd do here is go through the entire length of that line with
an ohmmeter, just on the off chance that there's not a connection where
there's supposed to be one.
> Tom Wiltshire <tom at electricdruid.net> wrote:
> >Hi all,
> >
> >If anyone can give me a clue to help with the following problem, I'd
> >be grateful.
> >
> >I'm working on testing the main processor board of my monosynth. It
> >has a PIC 16F74 that deals with MIDI, scanning the keyboard, the
> >buttons, etc etc. It also has an LCD display attached.
> >
> >The LCD display is working fine, but the least-significant-bit seems
> >to always be high. This means letters with an even-numbered ascii
> >code finish up getting shifted up one place (L becomes M, but E is
> >ok, D becomes E, but U is ok, etc).
> >
> >I have an 8-bit databus to which most of these parts are attached via
> >74HC541 buffer chips - the button matrix and the keyboard matrix both
> >work like this. The LCD data lines (all 8 of them) is connected
> >directly to this bus, since unless its clock and enable lines are
> >pulsed, it will ignore data on the bus. The databus is connected to
> >Port B on the PIC, which also has control of the chip select lines
> >for all the '541s so it can choose which data to read, or can write
> >to the LCD.
> >
> >Testing the troublesome databus line with a voltmeter shows 1.64V,
> >which is what you'd expect for a line which was floating. But it
> >shouldn't be floating, since the PIC should be pulling it high or
> >low. Which it does for the other seven lines.
> >
> >I've tested the board without the PIC in place and both 74HC541
> >buffers are fine. I've tested the LCD on another board, and it's
> >fine. I've tested the relevant pins of the PIC by making it switch
> >LEDs on and off on my breadboard, and it's fine too. There's nothing
> >special about that Port B pin except that it's the one used for
> >external interrupts (INT).
> >
> >So why does this one line seem to float? Where's the problem likely
> >to be? I've been round and round it, but I'm pretty much out of ideas
> >now.
> >
> >Thanks,
> >Tom
> >
> >
> >_______________________________________________
> >Synth-diy mailing list
> >Synth-diy at dropmix.xs4all.nl
> >http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
> -- 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.
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
--
Member of the toughest, meanest, deadliest, most unrelenting -- and
ablest -- form of life in this section of space, a critter that can
be killed but can't be tamed. --Robert A. Heinlein, "The Puppet Masters"
-
Information is more dangerous than cannon to a society ruled by lies. --James
M Dakin
More information about the Synth-diy
mailing list