LCD: Minor changes.
This commit is contained in:
10
avr/lcd.asm
10
avr/lcd.asm
@@ -138,17 +138,17 @@ LCD_SetCursor:
|
|||||||
brcc LCD_SetCursor_error
|
brcc LCD_SetCursor_error
|
||||||
mov r16, r2
|
mov r16, r2
|
||||||
andi r16, 0x07
|
andi r16, 0x07
|
||||||
ori r16, 0xb0
|
ori r16, 0xb0 ; Set Page Start Address for Page Addressing Mode
|
||||||
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
|
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
|
||||||
brcc LCD_SetCursor_error
|
brcc LCD_SetCursor_error
|
||||||
mov r16, r1
|
mov r16, r1
|
||||||
andi r16, 0x0f
|
andi r16, 0x0f ; Set Lower Column Start Address
|
||||||
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
|
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
|
||||||
brcc LCD_SetCursor_error
|
brcc LCD_SetCursor_error
|
||||||
mov r16, r1
|
mov r16, r1
|
||||||
andi r16, 0xf0
|
|
||||||
swap r16
|
swap r16
|
||||||
ori r16, 0x10
|
andi r16, 0x0f
|
||||||
|
ori r16, 0x10 ; Set Higher Column Start Address
|
||||||
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
|
rcall twiSendByteExpectAck ; (R16, R17, R18, R22)
|
||||||
brcc LCD_SetCursor_error
|
brcc LCD_SetCursor_error
|
||||||
|
|
||||||
@@ -579,7 +579,7 @@ lcdGetCharMatrix_l2:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
; TODO: set adressing mode??
|
||||||
lcdInitCommandsBegin: ; 28 bytes
|
lcdInitCommandsBegin: ; 28 bytes
|
||||||
.db LCD_CMD_MODE, 0xa8, ((LCD_PAGE_COUNT*8)-1), 0x8d, 0x14, 0xaf, 0xa1, 0xc8
|
.db LCD_CMD_MODE, 0xa8, ((LCD_PAGE_COUNT*8)-1), 0x8d, 0x14, 0xaf, 0xa1, 0xc8
|
||||||
lcdInitCommandsEnd:
|
lcdInitCommandsEnd:
|
||||||
|
|||||||
Reference in New Issue
Block a user