128x96 Graphical LCD and driver code - finally!
Timothy D. Swieter
Posts: 1,613
Back in June I picked up a couple different LCD displays types from the electronics market in Shenzhen. One of the displays was a graphical LCD. For weeks...rather months...I had good intentions to sit down and use it with my Propeller. Finally I have come through!!! Not only did I write driver for using it, but I also got stock for selling it through the Brilldea web site so the community can have fun with it too.
The LCD is called the LM9033A. It is a monochrome LCD with 128x96 pixels. Though it is monochrome it has four gray scale levels so there can be rudimentary shading. Another perfect aspect of the LCD is that it is 3.3V DC powered so it interfaces easily with the Propeller.
The driver code is an assembly object with SPIN routines for commanding the driver. I really like the way the assembly code is structured for a "wait for command and then execute" style. This style is similar to graphics.spin or Float32.spin. I commented the driver heavily so I think it will be useful to others trying to structure ASM code like this "wait for command" method or others trying to modify the code for use with a different LCD driver IC. This particular driver uses 4-wire serial for communicating to the display. Future revisions of the driver may add the possibility for other protocols. Also, this driver allows for the orientation of the display to be changed. Right now it is landscape one way or the other way, but I would like to add a portrait mode too.
There is a small bit of demo code included with the driver. The LCD driver works in conjunction with graphics.spin to read/write the video memory. What I mean is that you use graphics.spin to draw the text, shapes and shading in the hub memory and then you point the LCD driver to this memory. The LCD driver can work with both single buffer (writing the memory and the updating LCD before writing again) or with double buffer (writing in memory, then kicking the driver to update while you begin writing in memory before the update is finished).
I am integrating one of the displays in my latest project so I will show that off once I get that project wrapped up and ready for show and tell.
You can read a little more on the display here: www.brilldea.com/product_LM9033A.html
You can see a video of the display being tested in the market here:www.youtube.com/watch?v=BoDaA0s6MC0
You can see a video of the demo code running here:www.youtube.com/watch?v=Dd2-1k3NPEM
The driver object is available at the Brilldea site or via the object exchange here:obex.parallax.com/objects/389/
I also attached a couple pictures.
I imagine that in the next couple weeks the LCD driver code may be improved and optimized so the object exchange will always be the latest and greatest.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
The LCD is called the LM9033A. It is a monochrome LCD with 128x96 pixels. Though it is monochrome it has four gray scale levels so there can be rudimentary shading. Another perfect aspect of the LCD is that it is 3.3V DC powered so it interfaces easily with the Propeller.
The driver code is an assembly object with SPIN routines for commanding the driver. I really like the way the assembly code is structured for a "wait for command and then execute" style. This style is similar to graphics.spin or Float32.spin. I commented the driver heavily so I think it will be useful to others trying to structure ASM code like this "wait for command" method or others trying to modify the code for use with a different LCD driver IC. This particular driver uses 4-wire serial for communicating to the display. Future revisions of the driver may add the possibility for other protocols. Also, this driver allows for the orientation of the display to be changed. Right now it is landscape one way or the other way, but I would like to add a portrait mode too.
There is a small bit of demo code included with the driver. The LCD driver works in conjunction with graphics.spin to read/write the video memory. What I mean is that you use graphics.spin to draw the text, shapes and shading in the hub memory and then you point the LCD driver to this memory. The LCD driver can work with both single buffer (writing the memory and the updating LCD before writing again) or with double buffer (writing in memory, then kicking the driver to update while you begin writing in memory before the update is finished).
I am integrating one of the displays in my latest project so I will show that off once I get that project wrapped up and ready for show and tell.
You can read a little more on the display here: www.brilldea.com/product_LM9033A.html
You can see a video of the display being tested in the market here:www.youtube.com/watch?v=BoDaA0s6MC0
You can see a video of the demo code running here:www.youtube.com/watch?v=Dd2-1k3NPEM
The driver object is available at the Brilldea site or via the object exchange here:obex.parallax.com/objects/389/
I also attached a couple pictures.
I imagine that in the next couple weeks the LCD driver code may be improved and optimized so the object exchange will always be the latest and greatest.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Comments
Yes the I/O connections are through a 0.1" header with 16 pins. There are also solder pads on back in case you want to solder a flat flexible cable or wires to those. You can see this in the attached picture. I am using the 4-wire SPI interface which is the default configuration. The updates for most applications are fast enough with this. If you want though the LCD can be used with other protocols such as 3-wire or a 8-bit interface such as 8080 or 6800. In order to use the other protocol modes you have to solder/desolder jumpers on the back of the display.
With the 4-wire serial there are a total of five I/O lines, maybe 6 depending if you want to use the back light, as shown below.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Hmm....now that you mention it Rayman I remember sometime ago seeing a thread about a display being purchased in Europe and used by our German friends. I will have to search to see if it is similar.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
I have thought a little more about the app notes or tutorials on creating graphics and/or menu system. I am cooking up an idea that would use this display and then a carrier board of sort or a backpack of sorts. The backpack would include the Propeller and buttons and a couple LEDs. All the spare I/O would be left for connecting to your devices, but a standardized interface with buttons, LEDs, LCD would be there.
This is similar to a concept I started pursuing back in the summer. I dropped that idea because of so many other things I had going on. I was trying to make the other idea more complicated than it needed to be.
Anyway - I will post more once I review my time and schedule. I am excited about this display and what can be done with is. For those that have made purchases, what projects are you going to be using the display in?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com