[sdiy] Odd problem with LCD

Scott Gravenhorst music.maker at gte.net
Sun Apr 5 21:48:50 CEST 2009


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.

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.




More information about the Synth-diy mailing list