In the past quite a few people have tried to use GLCDs with Picaxe, with mixed success. One issue I guess is the Picaxe's processing speed (or lack thereof) when driving the low-level GLCD interface. On the other hand there are serially interfaced GLCD but they tend to be pricey - given that you can pick up a decent parallel one for around US$15.
So I thought I'll create an interface driver chip for such a GLCD. I'm about two thirds done and it looks pretty good. Since Rev-Eds LED044 hasn't been available for quite a while I hope they don't mind. I plan to make the HEX file freely available so anybody with a PIC programmer can burn his/her own. If there is enough interest I may also offer pre-programmed chips for those who don't have that option. The chip is a simple PIC16F886 with minimal external components (running on its internal oscillator), i.e. the same as the Picaxe 28X1. It supports 128x64 pixel monochrome GLCDs that are based on Samsung KS017 or KS018 compatible controllers (this is a very common type anyway).
The Picxaxe talks to the driver through standard serial at 9600 baud.
At the moment it supports drawing of dots, lines, circles, rectangles, boxes (filled rectangles), and clearing the screen. Text output still needs a little debug. Here is a video of the current demo program running on a Picaxe 28X1 (needs only around 200 bytes of code space):
http://www.pdamusician.com/electronics/glcd01.avi
Please let me know if you are interested in further development of this, and also if you have any ideas for additional features (only thing to keep in mind, I am not planning to support any other GLCD controllers right now).
Wolfgang
P.S.: Here is the Picaxe demo program that is shown in the video, so you can see how the communication to the controller works:
So I thought I'll create an interface driver chip for such a GLCD. I'm about two thirds done and it looks pretty good. Since Rev-Eds LED044 hasn't been available for quite a while I hope they don't mind. I plan to make the HEX file freely available so anybody with a PIC programmer can burn his/her own. If there is enough interest I may also offer pre-programmed chips for those who don't have that option. The chip is a simple PIC16F886 with minimal external components (running on its internal oscillator), i.e. the same as the Picaxe 28X1. It supports 128x64 pixel monochrome GLCDs that are based on Samsung KS017 or KS018 compatible controllers (this is a very common type anyway).
The Picxaxe talks to the driver through standard serial at 9600 baud.
At the moment it supports drawing of dots, lines, circles, rectangles, boxes (filled rectangles), and clearing the screen. Text output still needs a little debug. Here is a video of the current demo program running on a Picaxe 28X1 (needs only around 200 bytes of code space):
http://www.pdamusician.com/electronics/glcd01.avi
Please let me know if you are interested in further development of this, and also if you have any ideas for additional features (only thing to keep in mind, I am not planning to support any other GLCD controllers right now).
Wolfgang
P.S.: Here is the Picaxe demo program that is shown in the video, so you can see how the communication to the controller works:
Code:
#PICAXE 28X1
symbol GLCD_DOT = 0
symbol GLCD_LINE = 1
symbol GLCD_V_LINE = 2
symbol GLCD_H_LINE = 3
symbol GLCD_RECTANGLE = 4
symbol GLCD_BOX = 5
symbol GLCD_CICRLE = 6
symbol GLCD_FILL = 7
symbol GLCD_SET_FONT = 8
symbol GLCD_WRITE_CHAR = 9
symbol GLCD_WRITE_TEXT = 10
symbol FONT_5x8 = 0
symbol FONT_5x7 = 1
symbol FONT_3x6 = 2
symbol GLCD_TX_PIN = 0 ' output pin 0
symbol GLCD_RX_PIN = pin0 ' input pin 0
symbol GLCD_BUSY = pin1 ' input pin 1
symbol GLCD_BAUDRATE = T9600_16
setfreq em16 ' to get to 9600 baud
for w0 = 1 to 4
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_FILL, 255)
pause 2000
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_FILL, 0)
pause 2000
next w0
w1 = 0x1234
for w0 = 1 to 1000
random w1
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_DOT, b2, b3, 1)
'gosub wait_for_GLCD
next
pause 6000
gosub clear_screen
for b0 = 1 to 30 step 2
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_CICRLE, 63, 32, b0, 1)
gosub wait_for_GLCD
next
pause 6000
gosub clear_screen
for b0 = 0 to 63 step 7
b1 = b0 + 63
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_LINE, b0, 0, b1, 63, 1)
gosub wait_for_GLCD
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_LINE, b1, 0, b0, 63, 1)
gosub wait_for_GLCD
next
pause 6000
gosub clear_screen
for b0 = 0 to 63 step 5
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_H_LINE, 0, 127, b0, 1)
gosub wait_for_GLCD
next
pause 6000
gosub clear_screen
for b0 = 0 to 110 step 10
b1 = b0 / 2
b2 = b0 + 15
b3 = b1 + 7
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_RECTANGLE, b0, b1, b2, b3, 1)
gosub wait_for_GLCD
next
pause 6000
for b0 = 0 to 110 step 10
b1 = b0 / 2
b2 = b0 + 15
b3 = b1 + 7
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_BOX, b0, b1, b2, b3, 1)
gosub wait_for_GLCD
next
pause 6000
gosub clear_screen
end
wait_for_GLCD:
do
loop while GLCD_BUSY > 0
return
clear_screen:
serout GLCD_TX_PIN, GLCD_BAUDRATE, (GLCD_FILL, 0)
gosub wait_for_GLCD
pause 100
return
Last edited: