Alexandre Kremer

MCF52235 and KS0108 LCD´s

Discussion created by Alexandre Kremer on Sep 27, 2007
Latest reply on Sep 27, 2007 by Alexandre Kremer
 Hi friends
 I´m trying to do a very cheap bidirectional interface between MCF52235 and  a 128x64 LCD controlled by KS0108 (most common and cheap dot matrix LCD).
 Unfortunately, this display requires 5V supply, and i think coldfire is NOT 5V tolerant.
 On another thread on this forum i´ve read that we can connect CF´s gpio as inputs to a TTL level device, since CF will clamp the high level voltage to 3.6V. All we need to do is limit the current by using resistors ( I tried from 1K to 10 K values).
 Well, i used the PORTAN (full 8 bit registers) to do the D0~D7 lines. Using it as output, i can succefully write to display and show any kind of message and chars on it.
 The problem happens when i try to read the device´s ram. Read the internal LCD ram is needed because when you want to set/clear just one pixel, you need to know the state of the other pixels (one pixel is one bit but we write in bytes, so 8 pixels per write), to avoid clearing preivous set pixels.
 So, using PORTAN as input, i can´t read correctly. I mean, when i change the PORTAN DDR register to 0x00 (turn all pins as input), the SETAN register goes to 0xFE, no matter what level i have on port´s pins.
 Testing the PORTAN as gpio input without the display, i can succefully read the pins state correctly (0x00 with port´s pins to GND and 0xFF with port´s pins to 3V3), so this port is working OK.
 Does somebody has done something similar, or guess what i´m missing here?
 Thank you all for the help