Hi,
I'm using a 20x2 PICAXE and a 16x1 display (VHC16100) (removed from a samsung fax machine) and i put it to work with this code:
the display show five strange/unreadable characters
but if i change the bold line above to:
then what i see displayed is: "AAAAA"... and that's correct!
so, what can i do to read (properly) the values stored by EEPROM?
thank you
I'm using a 20x2 PICAXE and a 16x1 display (VHC16100) (removed from a samsung fax machine) and i put it to work with this code:
Code:
#No_Table
EEPROM 0,("hello")
gosub init
main:
b1=1
gosub wrins
pause 1000
b1=10
gosub wrins
pause 2000
b1=14
gosub wrins
pause 500
for b3=0 to 4
[B]read b3,b1[/B]
gosub wrchr
pause 500
next
pause 5000
b1=1
gosub wrins
pause 2500
goto main
init:
let pinsB = 0 ' Clear all output lines
let b4 = 0 ' Reset variable b3
let dirsB = 252 ' Set pins 2-7 as output lines (Stamp only).
pause 200 ' Wait 200 ms for LCD to reset.
let pinsB = 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 pinsB = 32 ' Set to 4-bit operation.
pulsout 3,1 ' Send data.
pulsout 3,1 ' Send data again.
let pinsB = 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 pinsB = 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 pinsB = 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 pinsB = 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 pinsB = b2 & 240 ' Mask the high nibble of b2
pulsout 3,1 ' Pulse enable pin to send data.
high 2 ' Back to character mode
return
the display show five strange/unreadable characters
but if i change the bold line above to:
Code:
(...)
b1="A"
(...)
then what i see displayed is: "AAAAA"... and that's correct!
so, what can i do to read (properly) the values stored by EEPROM?
thank you