📄 sfrdef.inc.bak
字号:
; MCU M38503E4SP; Special Function Register; Dec.24.2001;****************************************** **************************;1-vcc 42-p30/an0--room;2-vref 41-p31/an1--tube;3-avss 40-p32/an2--outtube ---compi;4-p44/int3/pwm--------l1 39-p33/an3--choose1 26/35---autokey;5-p43/int2/scmp2------l2 38-p34/an4--choose2 fast----cool/heat;6-p42/int1------------remote 37-p00/sin2--c7;7-p41/int0------------l34 36-p01/sout2-c6;8-p40/cntr1-----------l5 35-p02/sclk2-rememberT;9-p27/cntr0/srdy1-----buzzy0 34-p03/srdy2-rememberM;10-p26/sclk-----------c1 33-p04-------comp;11-p25/txd------------txd 32-p05-------HIGHfan;12-p24/rxd------------rxd 31-p06-------midfan;13-p23----------------c2 30-p07-------LOWfan;14-p22----------------c3 29-p10-------ofan;15-cnvss 28-p11-------4v;16-p21/xcin-----------c4 27-p12-------heat-5v(hrp r3)di(mts r30);17-p20/xcout----------c5 26-p13-------swing1 as soon as power on,5v(50.60)di(small)(obligate,now nothing);18-reset 25-p14-------swing2;19-xin 24-p15-------swing3;20-xout 23-p16-------swing4;21-vss 22-p17-------buzzy1---it is for di 1v1(r28)---5v 1v2(r29) .IO;*************************************************************** port0 .EQU 0000H Initport0 .EQU 00000000B RoomFAN_Enable .EQU 0E0H displaycom7 .EQU 0,port0 displaycom6 .EQU 1,port0 p5_scl .equ 2,port0 ;eeprom Pin 6 p5_sda .equ 3,port0 ;eeprom Pin 5 Comp .equ 4,port0 H_fan .equ 5,port0 M_fan .equ 6,port0 L_fan .equ 7,port0 p0dir .EQU 0001H ; port0 direction register ;Initp0dir .EQU 11111111B ; Out_Port For LED Select Initp0dir .EQU 11111111B p5m_scl .equ 2,p0dir ;eeprom p5m_sda .equ 3,p0dir ;eeprom port1 .EQU 0002H Initport1 .EQU 00000000B Out_FanHigh .equ 0,port1 Four_valve .equ 1,port1 hrp_yeah .equ 2,port1 Swing_Motor1 .equ 3,port1 ;blue Swing_Motor2 .equ 4,port1 Swing_Motor3 .equ 5,port1 Swing_Motor4 .equ 6,port1 select_onepulltwo .equ 7,port1 StepperPort .equ 10000111B p1dir .EQU 0003H ; Out_Port For Key and EEProm Initp1dir .EQU 01111011B port2 .EQU 0004H Initport2 .EQU 00H b_Buzzer0 .EQU 7,port2 displaycom1 .EQU 6,port2 Txd_Comm .EQU 5,port2 Rxd_Comm .EQU 4,port2 displaycom2 .EQU 3,port2 displaycom3 .equ 2,port2 displaycom4 .equ 1,port2 displaycom5 .equ 0,port2 p2dir .EQU 0005H Initp2dir .EQU 11101111B; chen port3 .EQU 0006H RoomADCon .EQU 00H PipeADCon .EQU 01H COMPCurrentcon .EQU 02H choose1Con .equ 03H choose2Con .equ 04H fulizi .equ 2,port3 p3dir .EQU 0007H Initp3dir .EQU 00000100B port4 .EQU 0008H Initport4 .EQU 00000011B ;displayl5 .EQU 0,port4 ;displayl34 .EQU 1,port4 displayl34 .EQU 0,port4 displayl5 .EQU 1,port4 b_remoteBit .EQU 2,port4 displayl2 .equ 3,port4 displayl1 .equ 4,port4 p4dir .EQU 0009H ;Out_port for motor driver Initp4dir .EQU 11111011B B_Remote .equ 2,p4dir .ENDIO TB_RB .EQU 0018H ;Transmit/receive Buffer 1 SIO1STS .EQU 0019H ;Serial 1 Status register TBE .EQU 0,SIO1STS ;1 fa song huan chongqi kong RBF .EQU 1,SIO1STS ;1JIE SHOU HUAN CHONG QI MAN TSC .EQU 2,SIO1STS ;1ZHENG ZAI FA SONG YI WEI OE .EQU 3,SIO1STS ;1 yi chu PE .EQU 4,SIO1STS ;1ji ou jiaoyan cuo wu FE .EQU 5,SIO1STS ;1 zhen chucuo SE .EQU 6,SIO1STS ; zong de chu cuo SIO1CON .EQU 001AH ;Serial 1 Control register UART1CON .EQU 001BH ;UART1 control register BAUDRG .EQU 001CH ;Baud rate generater chen InitSIO1CON .equ 10110000B ;chen InitUART1CON .EQU 02H ;chen InitBAUDRG .EQU 52 ;4M/16/4800=52;chen PWMCON .EQU 001DH ;PWM control register PREPWM .EQU 001EH ;PWM prescaler PWM_Reg .EQU 001FH ;PWM Register PRE12 .EQU 0020H ;Prescaler 12 InitPRE12 .EQU 9 Timer1 .EQU 0021H InitTimer1 .EQU 49 ;4000000/16/4/100=1.6ms Timer2 .EQU 0022H InitTimer2 .EQU 249; 32 ; Timer 2 = 4,000,000/16/20= 4000; 250us Txymode .EQU 0023H ;TimerXY mode register; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?X ?0 ?0 ?1 ?x ?0 ?0 ? 0023H; 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? 滥哪聊腡imerX oprating mode; ? ? ? ? ? ? b1 b0; ? ? ? ? ? ? 0 0 :timerx mode; ? ? ? ? ? ? 0 1 :Pulse output mode; ? ? ? ? ? ? 1 0 :Event counter mode; ? ? ? ? ? ? 1 1 :Pulse width measurement mode; ? ? ? ? ? 滥哪哪哪哪 CNTR0 action edge switch bit; ? ? ? ? ? 0:interrupt at falling edge; ? ? ? ? ? Count at rising edge event counter mode; ? ? ? ? ? 1:interrupt at rising edge; ? ? ? ? ? Count at falling edge event counter mode; ? ? ? ? 滥哪哪哪哪哪哪腡imer X stop bit; ? ? ? ? 0: count start; ? ? ? ? 1: count stop; ? ? 滥哪聊哪哪哪哪哪哪哪哪 Timer Y operatiing mode bits; ? ? b5 b4; ? ? 0 0 : Timer mode; ? ? 0 1 : Pulse output mode; ? ? 1 0 : Event counter mode; ? ? 1 1 : Pulse width measurement mode; ? 滥哪哪哪哪哪哪哪哪哪哪哪哪 CNTR1 active edge swich bit; ? 0 :interrupt at falling edge; ? Count at rising edge in event count; ? 1 :Interrupt at rising edge; ? Count at falling edge in event count; 滥哪哪哪哪哪哪哪哪哪哪哪哪哪哪 Timer Y count stop bit; 0: count start; 1: count stop InitTxymode .EQU 85h;81H ;20050820 Start_timerX .EQU 3,Txymode Start_timerY .EQU 7,Txymode bstart_timerx .EQU 0,Txymode PREX .EQU 0024H ;Prescaler X InitPREX .EQU 9 TimerX .EQU 0025H InitTimerX .EQU 49;99 ;timerX = 4 exp 6/2/10/100=2000 PREY .EQU 0026H ;Prescaler Y InitPREY .EQU 24 TimerY .EQU 0027H InitTimerY .EQU 19 ;4 EXP 6/2/25/20 = 0.25MS TCSS .EQU 0028H ;Timer Count select register; 谀哪履哪履哪履哪履哪履哪履哪履哪?; ?0 ?0 ?0 ?0 ?0 ?0 ?1 ?0 ?TCSS (0028H); 滥履聊履聊履聊履聊履聊履聊履聊履?; ? ? ? ? ? ? ? 滥Timer X count source selection bit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -