⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isr_uart2_rx.s

📁 该文件包含30F的电机控制程序
💻 S
字号:
;START_HEADER
;
; dsPIC30F6014 Demo Source File
; (c) Copyright 2005 Microchip Technology, All rights reserved
;
; --------------------------------------------------------------------------
; File Revision History:
; --------------------------------------------------------------------------
;
; $Log: isr_uart2_rx.s,v $
; Revision 1.3  2005/04/04 23:43:43  VasukiH
; Updates to comments in file header
;
; Revision 1.2  2005/04/04 23:15:09  VasukiH
; Updates for MPLAB C30 v1.30 compatiblity
;
; Revision 1.1.1.1  2003/08/23 00:38:32  VasukiH
; First import of demo source into CVS Repository
;
;
;
; --------------------------------------------------------------------------
;
; Software and Development Tools Info:
; --------------------------------------------------------------------------
; Tool                          Version
; --------------------------------------------------------------------------
; MPLAB IDE                     7.0
; MPLAB C30 Toolsuite           1.30
; dsPICDEM(TM) Processor Board  1.10
; --------------------------------------------------------------------------
;
; File Notes:
; 1. The Uart receiver ISR captures numeric entries and initiates
;    a DTMF tone output to the code via the DCI.
;
;END_HEADER


.include "p30fxxxx.inc"


.global __U2RXInterrupt
.section  .text
__U2RXInterrupt:
        push    w0                      ;Save w0
        clr     w0                      ;Clear w0

        mov.b   U2RXREG, WREG           ;Transfer received byte to w0

        btsc    DCIUnavailable, #1      ;Check if DCI is already transmitting a tone
                                        ;or a sequence of tones

        bra     exit_U2_rxisr           ;If yes, then exit ISR ignoring the key-press

        setm    DCIUnavailable          ;Else, make the DCI unavailable to further interrupts

        clr     DtmfPauseFlag           ;Since UART RX is used only for single tone generation
                                        ;as opposed to a tone-sequence, clear the pause flag
                                        ;that transmits extra silence between two different tones.

        rcall   _sub_dci_kickoff        ;Call subroutine to translate a numeric
                                        ;entry into DTMF tones
                                        ;(W0 contains parameter to the subroutine)
exit_U2_rxisr:
        pop     w0                      ;Restore w0
        bclr    IFS1, #U2RXIF           ;Clear the interrupt flag.
        retfie                          ;Return from Interrupt

.end                                    ;EOF



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -