My Hitachi 240x128 graphics LCD module:

Here are some pictures of my graphics LCD module. I finally made it working with the same "glue" board I used for the text LCD modules. The Java code is quite slow, for the character LCD module it sort-of works, but it takes whole 4 seconds to paint the whole screen.

I made some improvements to the CPLD code, so LCD looks like normal memory mapped controller and you no longer need to bit-bang the RS, R/W and E signals. Funny thing is that before, the interface was so slow I did not have to check the LCD controller busy signal at all. The new interface is a bit fast, so you actually need to check the busy flag, even from Java code. Overal I think it is quite cool that I managed to get 2x  speed improvement by just reprogramming the CPLD and changing the Java software a little bit.

I'm thinking how to improve the speed, option one is to move to C code. Unfortunately Keil C compiler does some funny things with pointers so if you need to write to address 0x600000, you need to set the pointer address to 0x610000. The SDCC compiler does not do this side effect, but my attempt to write some wrappers to the ROM firmware failed miserably.

The other option is to write some Java native methods, but at the moment the only supported language is assembler and my skills with 8051 asm are close to none. SDCC has something called TINInative target, but I have no idea if it works or not. Then again I might just try it.

Here is a picture of my son Martin. The code is pure Java and it takes close to 5 seconds to display it from a Windows bitmap file. This is a picture of my TINIIs400 board with the TINIIm400 module. You can see the CPLD soldered between the two blue connectors.

Go Back