程序中:lcd_data_num和lcd_data_head是什么作用?是确定LCD数据在00H-1FH的中位置吗?可是mov a,@0 mov lcd_address,a 这两句不是LCD地址清0吗,也就是说数据从00H开始存放。我晕了,我理解不对吗?
;================================================
;=========== lcd display macro ===================
;================================================
lcd_display macro bank_lcd,lcd_data_head,lcd_data_num
bank bank_lcd
mov a,@lcd_data_num ;
mov lcd_data_head,a
mov a,@0
mov lcd_address,a
mov a,@lcd_data_head+1
mov r4,a
bank bank_lcd
$display_next:
mov a,r0 ;get data
mov lcd_data,a
inc lcd_address
swapa r0
mov lcd_data,a
inc lcd_address
inc r4
djz lcd_data_head
jmp $display_next
bs lcd_control,lcden ;enable lcd
nop
endm |