marcos.placona
Senior Member
Hi guys, I guess some of you may remember of my last post on this displays (http://www.picaxeforum.co.uk/showthread.php?t=9494). I'm posting here an update on what I have so far. I got the LCD's back, and it turns out there was nothing wrong with them.
Strangely, I've just tried the same circuit, and now they work
Well, in parts. It displays the cursor, but doesn't display any text on screen.
I used part of hippy's code, and made some changes to same variables the LCD needs. It starts fine now, but still doesn't display text.
I've made a video to show you how it stands up to now....
http://www.youtube.com/watch?v=ScAiFPifGVQ
As per my code, it looks like this now:
Any help would be appreciated.
At least no I know it's something on my code
UPD: I tried to also put an END after the inside the display function, but this just makes the cursor fade away
Strangely, I've just tried the same circuit, and now they work
Well, in parts. It displays the cursor, but doesn't display any text on screen.
I used part of hippy's code, and made some changes to same variables the LCD needs. It starts fine now, but still doesn't display text.
I've made a video to show you how it stands up to now....
http://www.youtube.com/watch?v=ScAiFPifGVQ
As per my code, it looks like this now:
Code:
; __
; Input 2 -o| |o- Input 1
; Serial Out -o| |o- Input 0
; Serial In -o| |o- Input 7
; Reset -o| |o- Input 6
; 0V -o| |o- +V
; Output 0 -o| |o- Output 7
; Output 1 -o| |o- Output 6
; Output 2 -o| |o- Output 5
; Output 3 -o| |o- Output 4
; --
SYMBOL RS = 0 ; 0 = Command 1 = Data
SYMBOL E = 2 ; 0 = Idle 1 = Active
SYMBOL DB4 = 4 ; LCD Data Line 4
SYMBOL DB5 = 5 ; LCD Data Line 5
SYMBOL DB6 = 6 ; LCD Data Line 6
SYMBOL DB7 = 7 ; LCD Data Line 7
SYMBOL RSCMDmask = %00000000 ; Select Command register
SYMBOL RSDATmask = %00000100 ; Select Data register
SYMBOL get = b11
SYMBOL byteo = b12
SYMBOL rsbit = b13
' Nibble commands - To initialise 4-bit mode
EEPROM 0,( $33 ) ; set interface
EEPROM 1,( $32 ) ; set interface
' Byte commands - To configure the LCD
EEPROM 2,( $29 ) ; set lines
EEPROM 3,( $14 ) ; set bias OSC
EEPROM 4,( $78 ) ; set contrast
EEPROM 5,( $00 ) ; set power, icon, contrat
EEPROM 6,( $6D ) ; set follower
EEPROM 7,( $0F ) ; set fidplay on/off
EEPROM 8,( $01 ) ; Clear Screen
EEPROM 9,( $06 ) ; entry mode set
'Text to display
EEPROM 10,("Hello")
'Must pause in order to initialize
pause 40
PowerOnReset:
{
GOSUB InitialiseLcd
}
display:
{
FOR get = 10 TO 14
READ 10,byteo
GOSUB SendDataByte
NEXT
}
InitialiseLcd:
{
'Function set
READ 0,byteo
GOSUB SendInitCmdByte
pause 30
'Function set
READ 1,byteo
GOSUB SendInitCmdByte
pause 30
'set line
READ 2,byteo
GOSUB SendInitCmdByte
pause 30
'Internal OSC Frequency
READ 3,byteo
GOSUB SendInitCmdByte
pause 30
'Contrast Set
READ 4,byteo
GOSUB SendInitCmdByte
pause 30
'Power / contrast control
READ 5,byteo
GOSUB SendInitCmdByte
pause 30
'Follower Control
READ 6,byteo
GOSUB SendInitCmdByte
pause 30
'Display on / off
READ 7,byteo
GOSUB SendInitCmdByte
pause 30
'Clear Display
READ 8,byteo
GOSUB SendInitCmdByte
pause 200
'Function set
READ 9,byteo
GOSUB SendInitCmdByte
pause 30
RETURN
}
SendInitCmdByte:
{
PAUSE 50 ; Delay 50mS
}
SendCmdByte:
{
rsbit = RSCMDmask ; Send to Command register
}
SendDataByte:
{
pins = byteo & %11110000 | rsbit ; Put MSB out first
PULSOUT E,1 ; Give a 10uS pulse on E
pins = byteo * %00010000 | rsbit ; Put LSB out second
PULSOUT E,1 ; Give a 10uS pulse on E
rsbit = RSDATmask ; Send to Data register next
RETURN
}
At least no I know it's something on my code
UPD: I tried to also put an END after the inside the display function, but this just makes the cursor fade away
Last edited: