after getting over the previous problem i was having with not knowing the power requirements of my new graphic LCD, I have run into another slight hixk, and i was wondering if anyone would be able to offer any advice.
Firstly the data sheet for the LCD can be found at www.ben-howes.co.uk/GraphicLCD.pdf
I have written the followinf code to try set up the display, and with any luck make some of the screen striped.
Nothing appears to happen on the screen. I am using a 40x1 (A.0 firmware) hence the ^ $80 on the pins assigment.
As for initialising the screen, i have followed the flow chart in the data sheet to the letter!
can anybody suggest where im going wrong with it?
Ben
Firstly the data sheet for the LCD can be found at www.ben-howes.co.uk/GraphicLCD.pdf
I have written the followinf code to try set up the display, and with any luck make some of the screen striped.
Code:
'' Pin Configurations
' EN 1 is on portc pin 2
' EN 2 is on portc pin 5
' R/W is on portc pin1
' A0 is on portc pin0
'outpins= d0-7
Symbol DisData = b0
INIT:
pause 1
high portc 6
pauseus 1
low portc 6
pauseus 1
high portc 6
pins = %10101110 ^ $80 ' Display: OFF
gosub Both
pins = %11000000 ^ $80 ' Start display on line 1
gosub Both
pins = %10100100 ^ $80 ' Static Drive: OFF
gosub Both
pins = 0 ' Start At Column 0
gosub Both
pins = %10111011 ^ $80 ' page 1
gosub Both
pins = %10101001 ^ $80 ' 1/32 duty
gosub Both
pins = %10100000 ^ $80 ' ADC: rightward output
gosub Both
pins = %11101110 ^ $80 ' Read Modify Write: off
gosub Both
pins = %10101111 ^ $80 ' Display: ON!
gosub Both
Main:
high portc 0
pins = %10101010 ^ $80
for b10 = 1 to 60
gosub Both
pauseus 10
next b10
End
LeftScreen:
high portc 2
pauseus 1
low portc 2
return
pauseus 1
RightScreen:
high portc 5
pauseus 1
low portc 5
pauseus 1
return
Both:
high portc 2
high portc 5
pauseus 1
low portc 2
low portc 5
pauseus 1
return
As for initialising the screen, i have followed the flow chart in the data sheet to the letter!
can anybody suggest where im going wrong with it?
Ben
Last edited: