background image
宏晶科技:www.MCU-Memory.com   Mobile:13922805190(姚永平)   Tel:0755-82948409    Fax: 0755-82944243
宏晶科技:专业单片机 / 存储器供应商   www.MCU-Memory.com   STC12C5410AD 系列 1T 8051 单片机中文指南
141
    MOV   PSW,#08H
    ACALL OutData
    POP   PSW
    POP   ACC
    RETI
;======SUB CODE================================
uart_sub SEGMENT CODE
        RSEG  uart_sub
        USING 0
;******************************************************************
;initial the display RAM data
;if want to display other,then you may add other data to this RAM
;Com0:   Com0Data0,Com0Data1,Com0Data2
;Com1:   Com1Data0,Com1Data1,Com1Data2
;Com2:   Com2Data0,Com0Data1,Com0Data2
;*******************************************************************
InitComData:                      ;it will display "11111111"
    MOV Com0Data0,#24H
    MOV Com0Data1,#49H
    MOV Com0Data2,#92H
    MOV Com1Data0,#92H
    MOV Com1Data1,#24H
    MOV Com1Data2,#49H
    MOV Com2Data0,#00H
    MOV Com2Data1,#00H
    MOV Com2Data2,#00H
    RET
;********************************************************************
;reverse the display data
;********************************************************************
RetComData:
    MOV  R0,#Com0Data0              ;get the first data address
    MOV  R7,#9
RetCom_0:
    MOV  A,@R0
    CPL  A
    MOV  @R0,A
    INC  R0
    DJNZ R7,RetCom_0
    RET