📄 sfrdef.inc
字号:
; ? ? ? ? ? ? ? 0 f(Xin)/16 (at low-speedmode f(Xcin)/16); ? ? ? ? ? ? ? 1 f(Xin)/2 (at low-speedmode f(Xcin)/2); ? ? ? ? ? ? 滥哪Timer Y count source selection bit; ? ? ? ? ? ? 0 f(Xin)/16 (at low-speedmode f(Xcin)/16); ? ? ? ? ? ? 1 f(Xin)/2 (at low-speedmode f(Xcin)/2); ? ? ? ? ? 滥哪哪哪Timer 12 count source selection bit; ? ? ? ? ? 0 f(Xin)/16 (at low-speedmode f(Xcin)/16); ? ? ? ? ? 1 f(Xcin); 滥哪聊哪聊哪聊哪聊哪哪哪哪哪Not used (return 0 when read) InitTCSS .EQU 03H ;X ,Y IS 2;1,2 IS 16 b_TXsource .equ 0,TCSS b_TYsource .equ 1,TCSS b_T12source .equ 2,TCSS ; 3850 group MCUs do not have the built-in IIc-bus S0 .EQU 002BH ;IIC data shift register S0D .EQU 002CH ;IIC address register S1 .EQU 002DH ;IIC status register S1D .EQU 002EH ;IIC control register S2 .EQU 002FH ;IIC clock control register S3D .EQU 0030H ;IIC Start/Stop condition control register ADCON .EQU 0034H ;AD/DA control register; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?0 ?X ?X ?X ?ADCON 0034H; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? 滥哪聊哪聊 Analog input pin select bits; ? ? ? ? ? b2,b1,b0; ? ? ? ? ? 0,0,0 P30/AN0; ? ? ? ? ? 0,0,1 P31/AN1; ? ? ? ? ? 0,1,0 P32/AN2; ? ? ? ? ? 0,1,1 P33/AN3; ? ? ? ? ? 1,0,0 P34/AN4; ? ? ? ? 滥哪哪哪哪哪哪 Not used (return 0 when read); ? ? ? 滥哪哪哪哪哪哪哪哪 A-D conversion completion bit; ? ? ? 0 : conversion in program; ? ? ? 1 : conversion completion; 滥哪滥哪滥哪哪哪哪哪哪哪哪哪哪 Not used (return 0) ADcomp .equ 4,ADCON AD1 .EQU 0035H ;A-D conversion register1; 谀哪履哪履哪履哪履哪履哪履哪履哪?; 砨7 砨6 砨5 砨4 砨3 砨2 砨1 砨0 ?ADL (0035H) Read_only; 滥哪聊哪聊哪聊哪聊哪聊哪聊哪聊哪? AD2 .EQU 0036H ;A-D conversion register2; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ? ? ? ? ? 砨9 砨8 ?ADH (0036H); 滥履聊履聊履聊履聊履聊履聊哪聊哪?; ? ? ? ? ? ?; 媚哪聊哪聊哪聊哪聊哪聊哪哪哪哪哪 become 0 at reading; 滥哪哪?A-D conversion mode set bit; 0 : AD conversion result of becomes the 10-bit A-D mode; 1 : AD conversion result of becomes the 8-bit A-D mode; Note: Read address 0036h hefore 0035h MISRG .EQU 0038H ;; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?X ?0 ?0 ?1 ?0 ?MISEG (001BH); 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? ? 滥 OSCillation stabilizing time set after STP instruction; ? ? ? ? ? ? ? 0 SET automatically; ? ? ? ? ? ? ? 1 not SET automatically; ? ? ? ? ? ? 滥 Middle-speed mode automatic switch set bit; ? ? ? ? ? ? 0 Not SET automatic; ? ? ? ? ? ? 1 automatic Switching enable; ? ? ? ? ? 滥哪哪 Middle-speed mode automatic switch wait time set bit; ? ? ? ? ? 0. 4.5 to 5.5 machine cycles; ? ? ? ? ? 1. 6.5 to 7.5 machine cycles; ? ? ? ? 滥哪哪哪哪 Middle-speed mode automatic switch start bit(depend on program); ? ? ? ? 0 envalid; ? ? ? ? 1 Automatic Switch Start; 滥哪哪哪哪哪哪哪 Not used,disable writer (return 1 when read) InitMISRG .EQU 01H WDTCON .EQU 0039H ;Watchdog timer control register; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?x ?x ?x ?x ?x ?x ? 0039H; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? 滥哪聊哪聊哪聊哪聊哪聊 watchdog timer H; ? ? (for read-out of high-order 6 bit); ? 滥哪哪哪哪哪哪哪哪哪哪哪哪 STP instruction disable bit; ? 0 : STP instruction enable; ? 1 : STP instruction disable; 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪 watchdog timer H count source select bit; 0 : watchdog timer L underflow; 1 : f(Xin)/16 or f(Xcin)/16 InitWDTCON .EQU 7FH INTEDGE .EQU 003AH ;Interrupt edge selection register; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?0 ?0 ?0 ?0 ? INTEDGE ;interrupt edge sele; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? ? 滥?INT0 action edge selecation bit; ? ? ? ? ? ? 滥哪哪?INT 1 action edge selecation bit; ? ? ? ? ? 滥哪哪哪哪?INT 2 action edge selecation bit; ? ? ? ? 滥哪哪哪哪哪哪?INT 3 action edge selecation bit; ? ? ? 滥哪哪哪哪哪哪哪哪?Reserved (don't writer 1 to this bit); 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪?not used (return 0 when read); 0 : faling edge action 1: Rising edge action InitINTEDGE .EQU 00H CPUM .EQU 003BH ;CPU mode register; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?1 ?1 ?0 ?0 ? CPUM 003B ;CPU mode register; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? 滥哪聊哪哪?Sing-chip mode; ? ? ? ? ? 滥哪哪哪哪哪哪?Stack page selection bit; ? ? ? ? ? 1 : 1 page 0 : 0 page; ? ? ? ? 滥哪哪哪哪哪哪哪哪?Fix this bit to 1; ? ? ? 滥哪哪哪哪哪哪哪哪哪哪?Port Xc switch bit; ? ? ? 0: I/O port 1: XCin-XCout OSC; ? ? 滥哪哪哪哪哪哪哪哪哪哪哪哪 main Clock (Xin-Xout) Stop Bit; ? ? 0: Oscillating 1: Stoped; 滥哪聊哪哪哪哪哪哪哪哪哪 Main clock division ratio Selection Bit; 0,0 %=f(Xin)/2 (high-speed mode); 0,1 %=f(Xin)/8 (middle-speed mode); 1,0 %=f(XCin)/2 (Low-speed mode); 1,1 Not available InitCPUM .EQU 00001100B ;04H IREQ1 .EQU 003CH ;Interrupt request register 1; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?0 ?0 ?0 ?0 ? IREQ1 ;interrupt edge sele; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? ? 滥?INT 0 interrupt request bit; ? ? ? ? ? ? 滥哪哪?3851 SCL/SDA interrupt request bit; ? ? ? ? ? 滥哪哪哪哪?INT1 interrupt request bit; ? ? ? ? 滥哪哪哪哪哪哪?INT2 interrupt request bit; ? ? ? 滥哪哪哪哪哪哪哪哪?INT3 interrupt request bit; ? ? 滥哪哪哪哪哪哪哪哪哪哪?3851 IIC interrupt reguest bit; ? 滥哪哪哪哪哪哪哪哪哪哪哪哪?Timer X interrupt request bit; 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪?Timer Y interrupt request bit InitIREQ1 .EQU 00H tx_request .EQU 6,IREQ1 ty_request .EQU 7,IREQ1 IREQ2 .EQU 003DH ;Interrupt request register 2; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?0 ?0 ?0 ?0 ?IREQ2 ;interrupt request register2; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? ? 滥?Timer1 Interrupt request bit; ? ? ? ? ? ? 滥哪哪?Timer2 Interrupt request bit; ? ? ? ? ? 滥哪哪哪哪?Serial I/O Reception Interrupt request bit; ? ? ? ? 滥哪哪哪哪哪哪?Serial I/O Transmit Interrupt request bit; ? ? ? 滥哪哪哪哪哪哪哪哪?CNTR0 Interrupt request bit; ? ? 滥哪哪哪哪哪哪哪哪哪哪?CNTR1 Interrupt request bit; ? 滥哪哪哪哪哪哪哪哪哪哪哪哪?AD converter Interrupt request bit; 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪?Not used (return 0 when read); 0: No interrupt request 1: interrupt request issued t1_request .EQU 0,IREQ2 t2_request .EQU 1,IREQ2 Rxd_request .EQU 2,IREQ2 Txd_request .EQU 3,IREQ2 InitIREQ2 .EQU 00H ICON1 .EQU 003EH ;Interrupt control register 1; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?1 ?0 ?0 ?0 ?0 ?0 ?0 ?ICON1 ;interrupt control register1; 滥履聊履聊履聊履聊履聊履聊履聊履? 0: disable 1: enable; ? ? ? ? ? ? ? 滥?INT 0 interrupt enable bit; ? ? ? ? ? ? 滥哪哪?3851 SCL/SDA interrupt enable bit; ? ? ? ? ? 滥哪哪哪哪?INT1 interrupt enable bit; ? ? ? ? 滥哪哪哪哪哪哪?INT2 interrupt enable bit; ? ? ? 滥哪哪哪哪哪哪哪哪?INT3 interrupt enable bit; ? ? 滥哪哪哪哪哪哪哪哪哪哪?3851 IIC interrupt enable bit; ? 滥哪哪哪哪哪哪哪哪哪哪哪哪?Timer X interrupt enable bit; 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪?Timer Y interrupt enable bit InitICON1 .EQU 10000000B ICON2 .EQU 003FH ;Interrupt control register 2; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?0 ?1 ?0 ?0 ?ICON2 ;interrupt control register2; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? ? 滥?Timer1 Interrupt enable bit; ? ? ? ? ? ? 滥哪哪?Timer2 Interrupt enable bit; ? ? ? ? ? 滥哪哪哪哪?Serial I/O Reception Interrupt enable bit; ? ? ? ? 滥哪哪哪哪哪哪?Serial I/O Transmit Interrupt enable bit; ? ? ? 滥哪哪哪哪哪哪哪哪?CNTR0 Interrupt enable bit; ? ? 滥哪哪哪哪哪哪哪哪哪哪?CNTR1 Interrupt enable bit; ? 滥哪哪哪哪哪哪哪哪哪哪哪哪?AD converter Interrupt enable bit; 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪?Not used (return 0 when read) InitICON2 .EQU 00000011B CommRxdCON2 .EQU 00000111B ;chen CommTxdCON2 .EQU 00001011B ;chen
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -