LCD: Minor changes.

This commit is contained in:
Martin Preuss
2023-02-02 00:41:35 +01:00
parent 8082fe5226
commit d2fa4dfb86

View File

@@ -138,17 +138,17 @@ LCD_SetCursor:
brcc LCD_SetCursor_error
mov r16, r2
andi r16, 0x07
ori r16, 0xb0
ori r16, 0xb0 ; Set Page Start Address for Page Addressing Mode
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
brcc LCD_SetCursor_error
mov r16, r1
andi r16, 0x0f ; Set Lower Column Start Address
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
brcc LCD_SetCursor_error
mov r16, r1
andi r16, 0x0f
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
brcc LCD_SetCursor_error
mov r16, r1
andi r16, 0xf0
swap r16
ori r16, 0x10
andi r16, 0x0f
ori r16, 0x10 ; Set Higher Column Start Address
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
brcc LCD_SetCursor_error
@@ -579,7 +579,7 @@ lcdGetCharMatrix_l2:
ret
; TODO: set adressing mode??
lcdInitCommandsBegin: ; 28 bytes
.db LCD_CMD_MODE, 0xa8, ((LCD_PAGE_COUNT*8)-1), 0x8d, 0x14, 0xaf, 0xa1, 0xc8
lcdInitCommandsEnd: