128x64 graphics module
Peter Jakacki
Posts: 10,193
I recently ordered some samples of this 128x64 graphics module to replace some of my serial 20x4 character LCDs. They are the same width as the 20x4 modules but the glass height is 40mm vs 25mm (1") so the pcb is a taller in this respect. What's interesting is that the LCD also supports clock serial mode which turns out to be only 2 lines required. This would make it suitable for a lot of I/O strapped projects for sure. Anyway, I hooked up the Prop and had to do a lot of guessing as these Chinese datasheets aren't much better than a brochure (or an old newspaper ad) but I eventually got it going after half a day.
I don't need to run it in text mode which is only 16x4 as the graphics mode is much more flexible. So I wrote a driver that works like the TV and VGA bitmap drivers in that you have a memory area that you can draw to and the driver just refreshes the display automatically. Of course the LCD doesn't need constant refreshing but it's much easier to do it this way to mirror the "frame buffer" in RAM.
Here's a pic of the display and I am adapting graphics.spin at the moment so I can have a cog as the graphics engine to draw text and other graphics. It would therefore be possible to use the same cog to draw and refresh. Quite surprising too is that although the backlight is nice and bright it is only drawing 70ma as opposed to the 200ma+ that the smaller 20x4 draws.
I have arranged to buy these displays in carton loads to get the price down (real cheap!) as I will be doing a Prop serial backback for these but I should a few leftover for any who want to try. Otherwise you can get them from:
cgi.ebay.com/12864-128x64-Graphic-LCD-Display-module-YellowBacklight_W0QQitemZ300350679188QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45ee4ba894
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I don't need to run it in text mode which is only 16x4 as the graphics mode is much more flexible. So I wrote a driver that works like the TV and VGA bitmap drivers in that you have a memory area that you can draw to and the driver just refreshes the display automatically. Of course the LCD doesn't need constant refreshing but it's much easier to do it this way to mirror the "frame buffer" in RAM.
Here's a pic of the display and I am adapting graphics.spin at the moment so I can have a cog as the graphics engine to draw text and other graphics. It would therefore be possible to use the same cog to draw and refresh. Quite surprising too is that although the backlight is nice and bright it is only drawing 70ma as opposed to the 200ma+ that the smaller 20x4 draws.
I have arranged to buy these displays in carton loads to get the price down (real cheap!) as I will be doing a Prop serial backback for these but I should a few leftover for any who want to try. Otherwise you can get them from:
cgi.ebay.com/12864-128x64-Graphic-LCD-Display-module-YellowBacklight_W0QQitemZ300350679188QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45ee4ba894
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Comments
What is the connection like on it ? It looks like 0.1" pins on the bottom ?
What price will you charge for just the displays ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
·
It don't seems like there is a lot a informations about serial programming of the device in the datasheet (versus parallel)·how did you manage to find out what to send? So graphics.spin will be 100% working on it? (apart from colors)
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
You might want to look at the driver in the object exchange here: http://obex.parallax.com/objects/151/ It might just save you some time [noparse]:)[/noparse]
It is a good driver I have used for a similar LCD (using a different chipset and parallel interface) The driver includes drawing functions and several fonts. It also seems to be compatible with graphics.spin.
Carl
Thanks for the link, I didn't think to look in the obex. I've got it now and looking at it but I may still roll my own as there seems to be a lot of head scratching mush in the driver, I'll see how it goes. My lcd driver has been optimized and pixel positions set up as lsb=left to keep it compatible with these graphics drivers.
@Fred
The basic serial timing is ok and there is no problem with that, the problem was with the command set and how the sequence is touchy I guess. Anyway, it's not really obvious or spelt out in the datasheet, just takes experimentation, even if it does work, you experiment to see what doesn't to help fill in the gaps. Then there was this problem with the bottom half of the graphics display not working. Eventually found another datasheet which hinted at this half having the same vertical address as the top but the X position is offset by 8.
@Bean
Bear in mind that these displays sell for around $20 each one off or around $15 if you buy three cgi.ebay.com/3x-128x64-Dot-Matrix-GRAPHIC-LCD-module-Blue-Backlight_W0QQitemZ300350679179QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item45ee4ba88b. My buy price is better but it's always awkward to sell in 1's and 2's. Mind you my completed Propeller backpack will include and SD slot, 16 free I/O, RS485, etc and compete with stock standard 20x4 LCDs. As always with pricing though is you like to sell cheap to hobbyists but then you have to deal with handling one offs and "I can't get your %^&$%#! module to work, it's cr^&%p!, sort it out for me". Trying to lower the price for hobbyists also affects the price you charge OEMs who are much easier to deal with and order in bulk and will pay a good price but not if they find out you are selling cheap to hobbyists! Any suggestions?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Over the weekend I managed to hack graphics.spin enough to get it to work with this display so I have included a short video. I haven't tried all the functions yet. I don't use any normal frame buffers but I write directly (so no need to copy) into the 1K display bitmap in hub memory which another cog continually reads from and updates the lcd at around 10Hz. My original code showed a CS signal but this is not needed as the serial timing can work without it. Once I test it out a bit more I will tidy it up and post it. Has anyone got one of these displays?
This is an excellent graphic display especially considering that even in one off quantities it only costs $20 (from China).
Short flash video (1.9MB) of graphics demo on 128x64 LCD.
www.pbjtech.com/propeller/graphicsdemo.avi
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
That's it, no external components at all, and the 70ma from the backlight will keep those regulators running cool, actually I'm just running mine straight off the USB power.
I like it. BTW, the image has the lcd driver set to a negative image to give you an idea of the display area.
P.S. Sneaked/snuck in another picture but with the Parallax font.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Post Edited (Peter Jakacki) : 11/17/2009 4:57:01 AM GMT
I may even modify the driver to run two displays from one prop like I did w/ the LM9033A display from Brilldea.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jim Fouch
FOUCH SOFTWARE
This module sounds like about the minimum size I'd want for one application. Spoiled using a nice Sony DVD reader with 8" color LCD. But monochrome with graphics is what I need/wanted it for. I will need graphics, so I await that portion of Spin/PASM coding.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
Keep me posted on the XMOS code:
With 8 threads per Chip X 4 chips = Lotsa I/O.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
Post Edited (James Michael Huselton) : 11/19/2009 2:09:30 AM GMT
Mine only took around a week I think, I ordered them on the 4th and by the 13th I had them all hooked-up and running and posted. Wasn't such a black Friday after all.
Color may be nice but these things are viewable in bright sunlight.
Since then I have done a little on it on and off, improved the low level driver and added synchronization for drawing then updating automatically. I have also done a small 5x7 font for 21x8 text plus the Parallax font as you saw. I won't be able to do much with it in the next few weeks though as I will be over in the US, looks like I won't have time to drop in on Parallax out in the backwoods though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Do you think the blue and white version from the same seller would also work in serial mode?
I had a quick look at the data sheet, there is not as much detail on serial mode although there is some brief mention of it.
Unless you tell me it certainly won't work I'm happy to take a minor gamble and try one...
cheers
tubular
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Carl
Post Edited (COlsen) : 11/19/2009 2:52:51 PM GMT
Thanks for any guidance on this detail. Probably rtfm, huh? I've not yet worked in this area of needing to work graphics and put text up too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
This is a snippet to draw a character from the font table. Don't mind the funny {end} type statements, I stuck them in late at night to overcome "indentation blindness".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I've ordered one to play with too.
In your program ST9720.spin, sdo, sck and scs appear to be pins. If so, do the first two attach to LCD pins 5 and 6? What about scs?
I'm trying to figure out the Prop-to-LCD wiring. If scl and sda aren't used, and I couldn't tell if used by the program, it wasn't clear how the LCD was driven.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
SCL and SDA are standard definitions along with RXD and TXD as the Prop uses these for program loading but they are not used in the demo. Use the latest code ST9720_demo and you will find the SCS is disabled as I found I didn't need it. Refer to a previous post where I have the connection sheet and the SDI (SDO) and SCLK (SCK) which are just the SERIAL DATA and SERIAL CLOCK lines from the Prop. These lines are output only, no need for pullups or anything. Could it be simpler?
http://forums.parallax.com/attachment.php?attachmentid=65151
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
If I use this display for text only,
how many characters can I get per line and how many lines can be displayed?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Hi William,
Look back at one of my posts where I discuss that a little. ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
This has me thinking about a text 'terminal' program. I just spent all day writing one for a 20x4 display and the pocketerm has one for a vga display, but I'm not sure if such a thing exists for other displays?
A simple terminal is:
1) n number of lines
2) if you feed in characters they print one after the other till you get to the bottom of the screen.
3) when you reach the bottom of the screen at the end of that line all the lines scroll up
4) lines can either wrap or not wrap. (I've used both, currently I'm not wrapping, but only scrolling when a CRLF arrives)
5) the backspace character (08) goes back one character (unless it was on the first column).
You can get fancy and move the cursor to x,y and do inverse characters and the like, but a basic terminal is still very helpful. An array of the characters is part of the code (and necessary if you want to do backspace). eg this is the code for a 20x4 to scroll up:
(with squarebrackets in text as the forum interprets them as italics!)
Redraw is a bit of a fiddle on a 20x4 as the lines go 1,3,2,4. Display[noparse]/noparse is an 80 element array.
A 20x4 display is about $16-$18. Yours is $20 for 21x8, so the price per character is nearly half. Very tempting. And the two lines makes interfacing easy. And Kudos to you for delving into the Chinglish datasheets and discovering the 2 line solution.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/build
Post Edited (Dr_Acula) : 11/21/2009 12:10:57 PM GMT
Peter, I have a DE-LM106 (QY-12864BG) and it has virtually the same datasheet except it has pin 15=CS1 and 16=CS2. The block diagram shows 1 x S6B0107 and 2 x S6B0108 chips. The CS1 goes to one S6B0108 & CS2 goes to the other. There is no mention of it doing serial. I will have to try sometime.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Here's a bit of stuff on the chip www.arduino.cc/playground/Code/GLCDks0108
I'm busy packing for my flight at the moment and finishing off a lot of work (too much) so I won't be sleeping tonight. Still on this forum though
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
From that info, the connections are then
A0 to LCD-5
A1 to LCD-6,
with the other pins on the LCD connected to Gnd (1, 15, 20), +5v (2, 4, 19) or are no-connects (pins 3, 7..14 and 16..18). Would you say these are your connections?
So, one could use only four wires between the Prop board and LCD for the 'write-only' connection. Simple.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*