L_DDINP2 equ 10000000b+46h ; LCD "Input" DD RAM addr2.
L_DDGATE equ 10000000b+4Fh ; LCD "Gate" DD RAM addr.
;-------------------------------------------------------------------------
; Register file (= Work area) definitions.
;
; Notes: Lower byte is located first on long length variables.
; $ $+1 $+2
; (Intel format. Ex: 186A0h -> A0 86 01)
;-------------------------------------------------------------------------
org 0Ch
; ----- General.
I ds 4 ; General loop counter.
X ds 4 ; Source register for long word calc.
EX ds 4 ; Extra source register for mul/div.
Y ds 4 ; Destination register for long word calc.
EY ds 4 ; Extra dest. register for mul/div.
; ----- For count procedure.
CNTMODE ds 1 ; Temporary input buffer.
DSPMODE ds 1 ; Display mode.
EXT_PSC ds 1 ; External prescaler mode.
INT_PSC ds 1 ; Internal prescaler mode.
RESMODE ds 1 ; Resolution mode.
GATETIME ds 2 ; Gate time in milliseconds.
RTC_OLD ds 1 ; RTCC previous value.
RTC_NEW ds 1 ; RTCC new value.
CNT ds 3 ; Count value.
; ----- For LCD procedure.
LCD_RSEL ds 1 ; LCD register select.
LCD_DATA ds 1 ; LCD command or character data.
LCD_STRBUF ds MAXDIGIT ; LCD string buffer.
LCD_DPOINT ds 1 ; LCD decimal point location.
LCD_FXMPTR ds 1 ; LCD fixed message pointer.
; ----- For calculation procedure.
MDLOOPCT ds 1 ; Loop counter for mul/div.
CALCTMP1 ds 5 ; Temporary buffer for calculation.
CALCTMP2 ds 5 ; Temporary buffer for calculation.
; ----- For wait procedure.
WAIT1 ds 1 ; For large loop.
WAIT2 ds 1 ; For small loop.
;-------------------------------------------------------------------------
; Program entry.
;-------------------------------------------------------------------------
org 0
goto main
nop
nop
nop
goto main
;-------------------------------------------------------------------------
; String tables.
;-------------------------------------------------------------------------
s_kHz
retlw ’ ’ ; "kHz".
retlw ’k’ ;
retlw ’H’ ;
retlw ’z’ ;
retlw 0 ;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] 下一页
本文关键字:单片机 PIC单片机,单片机-工控设备 - PIC单片机