MOV f INT_PSC, w ; Get message address.
call get_ipmptr ;
MOV wf LCD_FXMPTR ; Display internal prescaler mode.
call dsp_fixstr ;
; *** Display Input channel (Ext. prescaler mode) ***
MOV lw L_DDINP2 ; Set cursor to "Input".
call set_LCD ; (Core)
MOV lw s_xpsOFF ; Set message address.
MOV f EXT_PSC, f ;
btfss status, z ;
MOV lw s_xpsON ;
MOV wf LCD_FXMPTR ; Display input channel.
call dsp_fixstr ;
; *** Return from subroutine ***
return
;-------------------------------------------------------------------------
; Display "Gate Open".
; Input : None.
; Output: None.
; W register will be broken.
;-------------------------------------------------------------------------
dsp_gon
; *** Display message ***
MOV lw L_DDGATE ; Set cursor to "Gate".
call set_LCD ;
bsf LCD_RSEL, L_SELDR ; Select data register.
MOV lw ’*’ ; Set gate sign.
call set_LCD ;
clrf LCD_RSEL ; Set to default.
; *** Return from subroutine ***
return
;-------------------------------------------------------------------------
; Display "Gate Close".
; Input : None.
; Output: None.
; W register & variable LCD_DATA will be broken.
;-------------------------------------------------------------------------
dsp_goff
; *** Display message ***
MOV lw L_DDGATE ; Set cursor to "Gate".
call set_LCD ;
bsf LCD_RSEL, L_SELDR ; Select data register.
MOV lw ’ ’ ; Clear gate sign &
MOV wf LCD_DATA ; wait.
call set_LCDcmd ;
MOV lw 100 ;
call wait_ms ;
clrf LCD_RSEL ; Set to default.
; *** Return from subroutine ***
return
;-------------------------------------------------------------------------
; Display frequency.
; Input : CNT (Count value)
; RESMODE (Resolution mode)
; Output: None.
; W register, variable X, EX, Y, EY, LCD_DPOINT & LCD_FXMPTR
; will be broken.
;-------------------------------------------------------------------------
dsp_freq
; *** Set cursor location of LCD & convert count data to string ***
MOV lw L_DDFREQ ; Set cursor to "frequency".
call set_LCD ;
MOV f CNT+0, w ; Change count data to
MOV wf X+0 ; string.
MOV f CNT+1, w ;
上一页 [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单片机