The S65-Shield is a plug-on module with color TFT-Display (176x132), microSD socket and rotary encoder for Arduino Uno, Duemilanove, Diecimila and Mega BoardsThey chose to use a LCD module from a Siemens S65 mobile phone. This LCD module can be found with three different display controllers. The S65-Shield I got from Watterott contains the LS020 controller.
A recent check of the Watterott website shows that this shield is no longer available. They have upgraded their Arduino LCD shield to use a Multi-Inno MI0283QT-2 TFT-Display and a TI ADS7846 Touch-Controller .
Fortunately, a variety of people have already worked on reverse engineering the LS020 LCD module. In particular -
- Programming the S65 Displays, by Christian Kranz, and Using the Siemens S65-Display
- Further work over at Juraś-Projects
- And possibly the original very long forum post started by Christian here
The last time I dealt with writing low-level driver code for single pixel addressable LCD controllers was many years ago. Lots of fond memories and tricks came flooding back. Porting other peoples work to a new language and embedded environment is the easy part. Hopefully others can take further advances thanks to the port and the reverse engineering by many others that forms the basis of this port.
I started first by porting Watterott's library code. Configuring the SPI bus and LS020 controller was quite straightforward to set up. The first expected challenge came from managed code loops within the clear screen (or area) function. Writing single pixels out over the SPI bus using a double for-loop is slow. To reduce delays throwing pixel data over to the LS020, I adopted a line buffer write approach. I did some performance profiling a while ago and recall getting a full clear screen down to around 33 microseconds. Not great, but showed the type of optimisation work required to speed up the ported Watterott Arduino library code. I managed to speed up quite a few library functions, but then got distracted by Juraś work on driving the LS020.
One of the examples Juraś has on his forum does a nice job of showing off the other display addressing modes that the LS020 supports. Two eight bit modes and a 16 bit mode. Watterott's code relies on 16 bit display addressing, whereas Juraś opted for an 8 bit mode. With an unoptimised port of the forum example code, it's plain to see that an 8 bit mode has more potential when coupled with managed code.
A future challenge coupled with optimising the low level LS020 driver code, is adding higher level functionality. The usual tricks involving dirty rectangle tracking and handling, bit blitting bitmaps that have been converted to tie in with the pixel addressing mode, etc.
C# library and example code for this port can be found here and here. It's also over on Fezzer.com here.
With the arrival of a second Protoshield this week, I'm now moving on to look at the IMU side of Burt.
2 comments:
Can you please post the connections from the FEZ_Domino to the MI0283Q-T2 adapter? his would complete a propper tutor.
Hi Wim. I don't have the MI0283Q-T2 based Watterott shield, so I have no Domino related code for it.
Post a Comment