SPI Graphics LCD driver
Moderators: David Barker, Jerry Messina
SPI Graphics LCD driver
I have to write to a GLCD over a distance of about 2'. Also do not want to use to many pins on my PLC board so I purchased the SPI driven GLCD board from MIcroE
SF is ideal as I can rewrite the GLCD code to send the pin data directly via SPI to the GLCD expander board.
Now before I embark on it I have to ask has any one else done it yet?
Or if I put up with the lost pins how far can I go with a ribbon cable?
SF is ideal as I can rewrite the GLCD code to send the pin data directly via SPI to the GLCD expander board.
Now before I embark on it I have to ask has any one else done it yet?
Or if I put up with the lost pins how far can I go with a ribbon cable?
Hi Tim,
read http://www.sfcompiler.co.uk/forum/viewtopic.php?t=578
I'm in vacations and I do not have access to my computer. I can send you everything once I'll be back at home next monday.
I have a working GLCD lib via MikroE spi module for the KS0108 driver.
ps. I do not have even access to my mails, so I can not answer. I'll be back at home on Sunday by night. Hope it's not too late for you.
Regards
octal
read http://www.sfcompiler.co.uk/forum/viewtopic.php?t=578
I'm in vacations and I do not have access to my computer. I can send you everything once I'll be back at home next monday.
I have a working GLCD lib via MikroE spi module for the KS0108 driver.
ps. I do not have even access to my mails, so I can not answer. I'll be back at home on Sunday by night. Hope it's not too late for you.
If you do not use SPI you can use a simple ribbon cable. Personnaly when I worked on the GLCD Module for the KS0108 with three CS pins (module is on the wiki), I used a flat ribbon cable (I reused a PC HDD cable) of about 4" without any pb. I think that with a lower quality cable you can still go up to 2 or 3" if you do not send too much data quickly.TimB wrote:
Or if I put up with the lost pins how far can I go with a ribbon cable?
Regards
octal
Hi Octal
I will wait until Sunday
The data through put is not really great just some text and a graphic that changes on a key input.
Pretty small graphic around 40x40 pixels
As for the ribbon cable I need 1' to 2' which is 12-24 inches, so I doubt it will work.
Its a quick job so I might even get a read made module with pic on board.
I will wait until Sunday
The data through put is not really great just some text and a graphic that changes on a key input.
Pretty small graphic around 40x40 pixels
As for the ribbon cable I need 1' to 2' which is 12-24 inches, so I doubt it will work.
Its a quick job so I might even get a read made module with pic on board.
1-wire Serial Graphic LCD
Here is a pic of my serial (one-wire) graphic LCD on an EP4 dev board:
It does everything that the on-board graphic LCD will do plus the following:
1. Requires only one port pin (plus 5V and GND connections) instead of 14 pins (use hardware OR software USART).
2. Communicates using RS-232 at 9600-115200 baud (TTL or true RS232 levels).
3. Fully adjustable backlight, 255 brightness levels.
4. Can draw dots, lines, boxes, rectangles, circles, and ellipses.
It does everything that the on-board graphic LCD will do plus the following:
1. Requires only one port pin (plus 5V and GND connections) instead of 14 pins (use hardware OR software USART).
2. Communicates using RS-232 at 9600-115200 baud (TTL or true RS232 levels).
3. Fully adjustable backlight, 255 brightness levels.
4. Can draw dots, lines, boxes, rectangles, circles, and ellipses.
It is based on a PIC18F and is laid out on a 1in. x 2in. PCB. There isn't really a whole lot to the schematic - it is mostly in the firmware. The description below should give you a good idea.
Commands are short and simple, eg. to clear the screen requires a single byte. To draw a rectangle, a sequence of 5 bytes is required - the first byte indicates that it is a rectangle, followed by 4 bytes indicating the top left corner (x1,y1) and the bottom right corner (x2,y2). This is about the longest command sequence - all others are 4 bytes or less. Strings (up to 40 characters at a time) are sent out with a single terminating byte. The controller handles line wrapping etc. To set the backlight, a control byte followed by a value of 0-255 will set the backllight brightness from full OFF to full ON. The value of the brightness (plus a few other parameters) is stored in EEPROM so it is retained on power down.
The longest cable I have used is about 2ft. (60cm.). It allows a graphic LCD to be added to just about any MCU application - including 8-pin devices and those with small amounts of FLASH. Great for evaluating compilers and yet have graphics capabilities.
Commands are short and simple, eg. to clear the screen requires a single byte. To draw a rectangle, a sequence of 5 bytes is required - the first byte indicates that it is a rectangle, followed by 4 bytes indicating the top left corner (x1,y1) and the bottom right corner (x2,y2). This is about the longest command sequence - all others are 4 bytes or less. Strings (up to 40 characters at a time) are sent out with a single terminating byte. The controller handles line wrapping etc. To set the backlight, a control byte followed by a value of 0-255 will set the backllight brightness from full OFF to full ON. The value of the brightness (plus a few other parameters) is stored in EEPROM so it is retained on power down.
The longest cable I have used is about 2ft. (60cm.). It allows a graphic LCD to be added to just about any MCU application - including 8-pin devices and those with small amounts of FLASH. Great for evaluating compilers and yet have graphics capabilities.