Xenium LCD support

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
YellowHat Offline
Junior Member
Posts: 8
Joined: May 2004
Reputation: 0
Post: #1
i've been trying to get this lcd working in xbmc with a xenium:

http://www.lcd-module.de/eng/pdf/doma/dip204-4e.pdf
which uses the following controller:
http://www.lcd-module.de/eng/pdf/zubehoer/ks0073.pdf

even though it should be connected/jumpered properly, it doesn't work. i tried to change xbmc's implementation of xenium-lcd-support as i think the lcd's protocol isn't compatible with the one xbmc uses. this is from the lcd's datasheet:

Quote:before transferring real data, start byte has to be transferred. it is composed of succeeding 5 "high" bits,
read write control bit (r/w), register selection bit (rs), and end bit that indicates the end of start byte.
whenever succeeding 5 "high" bits are detected by ks0073, it resets the serial transfer counter and prepares
to receive next informations.
the next input data is the register selection bit which determines which register is to be used, and read write
control bit that determines the direction of data. then end bit is transferred, which must have "low" value to
show the end of start byte.

and further:

Quote:(1) write operation (r/w = 0)
after start byte is transferred from mpu to ks0073, 8-bit data is transferred which is divided into 2 bytes,
each byte has 4 bit's real data and 4 bit's partition token data. for example, if real data is "10110001"
(d0 - d7), then serially transferred data becomes "1011 0000 0001 0000" where 2nd and 4th 4 bits must
be "0000" for safe transfer.
to transfer several bytes continuously without changing r/w bit and rs bit, start byte
transfer is needed only at first starting time.

but it looks like the source of the function xeniumspisendbyte is not available as it is an external library.
does anyone know the implementation of this function? or was this provided by ozxodus without source?
find quote
Hullebulle Offline
Posting Freak
Posts: 1,901
Joined: Sep 2003
Reputation: 0
Post: #2
iirc we just got the libs without any source. but i am not sure.

read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!
find quote
YellowHat Offline
Junior Member
Posts: 8
Joined: May 2004
Reputation: 0
Post: #3
i tried to write a wrapper function, so that the lcd receives data with it's protocol. i also changed the commands according to the datasheet. unfortunately it doesn't work properly yet. the display shows activity (you see the cursor ie), but it doesn't show what it is supposed to do.

this is the wrapper function. the lcd expects one byte data in the form: lower 4 databits + 4 times lowbit, upper 4 bits + 4 times lowbit (therefore 2bytes), ie 11010001 will be sent as two bytes: 1101000 0001000

Quote:void xenium::xeniumspisendbyte2(unsigned char data)
{
unsigned char lower;
unsigned char upper;

lower = data >> 4 << 4;
upper = data << 4;

entercriticalsection(&criticalsection);
xeniumspisendbyte(lower, spi0);
xeniumspisendbyte(upper, spi0);
leavecriticalsection(&criticalsection);
}

before data is sent the lcd expects a startbyte.
for commands this is: 5 high bits and 3 low bits (dec 248)
for display data it's: 6high bits and 2 low bits (dec 252)

i couldn't determine the commands for linefeed/backspace and so on, and i'm not sure if normal ascii codes work (as it was used in the former implementation). i'm also not sure how to implement cursor movement, it looks like i'd need to read the current ddram address from the display and calculate the movements. and i don't know if this is supported by the spi lib.

all changes i made are in xenium.cpp. if someone owns this lcd and wants to help please do so, because i'm stuck atm...
find quote