2020-10-14 19:09:54 +02:00
|
|
|
;hd44780 lcd test procedure
|
|
|
|
|
2020-10-18 14:47:46 +02:00
|
|
|
LCD_INSTR_REG: EQU %00000000
|
|
|
|
LCD_DATA_REG: EQU %00000001
|
2020-10-14 19:09:54 +02:00
|
|
|
|
|
|
|
;reset procedure
|
|
|
|
ld a,%00111000
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_INSTR_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%00001000
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_INSTR_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%00000001
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_INSTR_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
|
|
|
|
;init procedure
|
|
|
|
ld a,%00111000
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_INSTR_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%00001110
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_INSTR_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
|
|
|
|
;write characters to display
|
|
|
|
ld a,%01000100
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%01100001
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%01101110
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%01101001
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%01100101
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%01101100
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%01100101
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
ld a,%00100001
|
2020-10-18 14:47:46 +02:00
|
|
|
out (LCD_DATA_REG),a
|
2020-10-14 19:09:54 +02:00
|
|
|
|
|
|
|
halt
|
|
|
|
|