资源预览内容
第1页 / 共7页
第2页 / 共7页
第3页 / 共7页
第4页 / 共7页
第5页 / 共7页
第6页 / 共7页
第7页 / 共7页
亲,该文档总共7页全部预览完了,如果喜欢就下载吧!
资源描述
#ifndef _STC15F2K60S2_H_#define _STC15F2K60S2_H_/注意: STC15W4K32S4系列的芯片,上电后所有与PWM相关的IO口均为/ 高阻态,需将这些口设置为准双向口或强推挽模式方可正常使用/相关IO: P0.6/P0.7/P1.6/P1.7/P2.1/P2.2/ P2.3/P2.7/P3.7/P4.2/P4.4/P4.5/包含本头文件后,不用另外再包含REG51.H/内核特殊功能寄存器 / 复位值 描述sfr ACC = 0xE0; /0000,0000 累加器Accumulatorsfr B = 0xF0; /0000,0000 B寄存器sfr PSW = 0xD0; /0000,0000 程序状态字sbit CY = PSW7;sbit AC = PSW6;sbit F0 = PSW5;sbit RS1 = PSW4;sbit RS0 = PSW3;sbit OV = PSW2;sbit P = PSW0;sfr SP = 0x81; /0000,0111 堆栈指针sfr DPL = 0x82; /0000,0000 数据指针低字节sfr DPH = 0x83; /0000,0000 数据指针高字节/I/O 口特殊功能寄存器sfr P0 = 0x80; /1111,1111 端口0sbit P00 = P00;sbit P01 = P01;sbit P02 = P02;sbit P03 = P03;sbit P04 = P04;sbit P05 = P05;sbit P06 = P06;sbit P07 = P07;sfr P1 = 0x90; /1111,1111 端口1sbit P10 = P10;sbit P11 = P11;sbit P12 = P12;sbit P13 = P13;sbit P14 = P14;sbit P15 = P15;sbit P16 = P16;sbit P17 = P17;sfr P2 = 0xA0; /1111,1111 端口2sbit P20 = P20;sbit P21 = P21;sbit P22 = P22;sbit P23 = P23;sbit P24 = P24;sbit P25 = P25;sbit P26 = P26;sbit P27 = P27;sfr P3 = 0xB0; /1111,1111 端口3sbit P30 = P30;sbit P31 = P31;sbit P32 = P32;sbit P33 = P33;sbit P34 = P34;sbit P35 = P35;sbit P36 = P36;sbit P37 = P37;sfr P4 = 0xC0; /1111,1111 端口4sbit P40 = P40;sbit P41 = P41;sbit P42 = P42;sbit P43 = P43;sbit P44 = P44;sbit P45 = P45;sbit P46 = P46;sbit P47 = P47;sfr P5 = 0xC8; /xxxx,1111 端口5sbit P50 = P50;sbit P51 = P51;sbit P52 = P52;sbit P53 = P53;sbit P54 = P54;sbit P55 = P55;sbit P56 = P56;sbit P57 = P57;sfr P6 = 0xE8; /0000,0000 端口6sbit P60 = P60;sbit P61 = P61;sbit P62 = P62;sbit P63 = P63;sbit P64 = P64;sbit P65 = P65;sbit P66 = P66;sbit P67 = P67;sfr P7 = 0xF8; /0000,0000 端口7sbit P70 = P70;sbit P71 = P71;sbit P72 = P72;sbit P73 = P73;sbit P74 = P74;sbit P75 = P75;sbit P76 = P76;sbit P77 = P77;sfr P0M0 = 0x94; /0000,0000 端口0模式寄存器0sfr P0M1 = 0x93; /0000,0000 端口0模式寄存器1sfr P1M0 = 0x92; /0000,0000 端口1模式寄存器0sfr P1M1 = 0x91; /0000,0000 端口1模式寄存器1sfr P2M0 = 0x96; /0000,0000 端口2模式寄存器0sfr P2M1 = 0x95; /0000,0000 端口2模式寄存器1sfr P3M0 = 0xB2; /0000,0000 端口3模式寄存器0sfr P3M1 = 0xB1; /0000,0000 端口3模式寄存器1sfr P4M0 = 0xB4; /0000,0000 端口4模式寄存器0sfr P4M1 = 0xB3; /0000,0000 端口4模式寄存器1sfr P5M0 = 0xCA; /0000,0000 端口5模式寄存器0sfr P5M1 = 0xC9; /0000,0000 端口5模式寄存器1sfr P6M0 = 0xCC; /0000,0000 端口6模式寄存器0sfr P6M1 = 0xCB; /0000,0000 端口6模式寄存器1sfr P7M0 = 0xE2; /0000,0000 端口7模式寄存器0sfr P7M1 = 0xE1; /0000,0000 端口7模式寄存器1/系统管理特殊功能寄存器sfr PCON = 0x87; /0001,0000 电源控制寄存器sfr AUXR = 0x8E; /0000,0000 辅助寄存器sfr AUXR1 = 0xA2; /0000,0000 辅助寄存器1sfr P_SW1 = 0xA2; /0000,0000 外设端口切换寄存器1sfr CLK_DIV = 0x97; /0000,0000 时钟分频控制寄存器sfr BUS_SPEED = 0xA1; /xx10,x011 总线速度控制寄存器sfr P1ASF = 0x9D; /0000,0000 端口1模拟功能配置寄存器sfr P_SW2 = 0xBA; /0xxx,x000 外设端口切换寄存器/中断特殊功能寄存器sfr IE = 0xA8; /0000,0000 中断控制寄存器sbit EA = IE7;sbit ELVD = IE6;sbit EADC = IE5;sbit ES = IE4;sbit ET1 = IE3;sbit EX1 = IE2;sbit ET0 = IE1;sbit EX0 = IE0;sfr IP = 0xB8; /0000,0000 中断优先级寄存器sbit PPCA = IP7;sbit PLVD = IP6;sbit PADC = IP5;sbit PS = IP4;sbit PT1 = IP3;sbit PX1 = IP2;sbit PT0 = IP1;sbit PX0 = IP0;sfr IE2 = 0xAF; /0000,0000 中断控制寄存器2sfr IP2 = 0xB5; /xxxx,xx00 中断优先级寄存器2sfr INT_CLKO = 0x8F; /0000,0000 外部中断与时钟输出控制寄存器/定时器特殊功能寄存器sfr TCON = 0x88; /
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号