I have connected a 16x2 display to a 20M2 picaxe on a axe118 project board as per the picaxe manual 3, page 36 "Connnecting The LCD (OPTION 3)"
and loaded the following programe
and get no responce on the LCD screen just the top row of 16 black squares
I have checked the wiring several times and is correct
any help would be appreciated :
and loaded the following programe
Code:
EEPROM 0,("Hello there everybody!") ; store the text in the EEPROM memory
gosub init ‘ initialise LCD
start:
let b1 = 1 ; set b1 to ;clear display’ instruction
gosub wrins ; send instruction to LCD
for b3 = 0 to 22 ; setup a for...next loop
read b3, b1 ; read letter from EEPROM into variable b1
gosub wrchr ; send character to LCD
next b3 ; next loop
let b1 = 12 ; set b1 to ‘hide cursor’ instruction
gosub wrins ; send instruction to LCD
main:
let b1 = 24 ; set b1 to ‘scroll display left’ instruction
gosub wrins ; send instruction to LCD
pause 250 ; pause for 0.25s
goto main ; loop
init: let pins = 0 ; Clear all output lines
let b4 = 0 ; Reset variable b3
[COLOR="#FF0000"] let dirs = 252 ; Set pins 2-7 as output lines (Stamp only).[/COLOR]
pause 200 ; Wait 200 ms for LCD to reset.
let pins = 48 ; Set to 8-bit operation.
pulsout 3,1 ; Send data by pulsing ‘enable’
pause 10 ; Wait 10 ms
pulsout 3,1 ; Send data again
pulsout 3,1 ; Send data again
let pins = 32 ; Set to 4-bit operation.
pulsout 3,1 ; Send data.
pulsout 3,1 ; Send data again.
let pins = 128 ; Set to two line operation
pulsout 3,1 ; Send data.
let b1 = 14 ; Screen on, cursor on instruction
gosub wrins ; Write instruction to LCD
return
wrchr:
let pins = b1 & 240 ; Mask the high nibble of b1 into b2.
high 2 ; Make sure RS is high
pulsout 3,1 ; Pulse the enable pin to send data.
let b2 = b1 * 16 ; Put low nibble of b1 into b2.
let pins = b2 & 240 ; Mask the high nibble of b2
high 2 ; Make sure RS is high
pulsout 3,1 ; Pulse enable pin to send data.
return
wrins:
let pins = b1 & 240 ; Mask the high nibble of b1 into b2.
pulsout 3,1 ; Pulse the enable pin to send data.
let b2 = b1 * 16 ; Put low nibble of b1 into b2.
let pins = b2 & 240 ; Mask the high nibble of b2
pulsout 3,1 ; Pulse enable pin to send data.
high 2 ; Back to character mode
return
#no_data
and get no responce on the LCD screen just the top row of 16 black squares
I have checked the wiring several times and is correct
any help would be appreciated :
Last edited: