EB005- LCD and assembly
Posted: Wed Nov 19, 2008 3:30 am
Guys,
I am attempting to display a character on the LCD using assembly language. The program use the following initialization codes:
0x33
0x32
0x2c
0x06
0x0c
0x01
0x02
This appears to work and I get a flashing cursor at postion zero.
The following code is use to send a "H" to the display.
;**** Data 'A'(48)
;****MSB
movlw 14 ; MSB first
movwf PORTB
movlw 34
movwf PORTB ; Pulse E high
movlw 14
movwf PORTB ; then low
call Sdelay
;****LSB
movlw 18 ; LSB second
movwf PORTB
movlw 38
movwf PORTB
movlw 18
movwf PORTB
call Sdelay
The "H" is not displayed and the cursor remains a position zero.
If you have a quick answer, I would appreciate it. If there is a reference I can read, let me know and I will use it.
Thanks,
Jack Griffin
I am attempting to display a character on the LCD using assembly language. The program use the following initialization codes:
0x33
0x32
0x2c
0x06
0x0c
0x01
0x02
This appears to work and I get a flashing cursor at postion zero.
The following code is use to send a "H" to the display.
;**** Data 'A'(48)
;****MSB
movlw 14 ; MSB first
movwf PORTB
movlw 34
movwf PORTB ; Pulse E high
movlw 14
movwf PORTB ; then low
call Sdelay
;****LSB
movlw 18 ; LSB second
movwf PORTB
movlw 38
movwf PORTB
movlw 18
movwf PORTB
call Sdelay
The "H" is not displayed and the cursor remains a position zero.
If you have a quick answer, I would appreciate it. If there is a reference I can read, let me know and I will use it.
Thanks,
Jack Griffin