DPS: 0, 使用缺省数据指针DPTR0
1,使用另一个数据指针DPTR1
*/
//-----------------------------------
sfr WAKE_CLKO = 0x8F; //附加的 SFR WAK1_CLKO
/*
7 6 5 4 3 2 1 0 Reset Value
PCAWAKEUP RXD_PIN_IE T1_PIN_IE T0_PIN_IE LVD_WAKE _ T1CLKO T0CLKO 0000,0000B
b7 - PCAWAKEUP : PCA 中断可唤醒 powerdown。
b6 - RXD_PIN_IE : 当 P3.0(RXD) 下降沿置位 RI 时可唤醒 powerdown(必须打开相应中断)。
b5 - T1_PIN_IE : 当 T1 脚下降沿置位 T1 中断标志时可唤醒 powerdown(必须打开相应中断)。
b4 - T0_PIN_IE : 当 T0 脚下降沿置位 T0 中断标志时可唤醒 powerdown(必须打开相应中断)。
b3 - LVD_WAKE : 当 CMPIN 脚低电平置位 LVD 中断标志时可唤醒 powerdown(必须打开相应中断)。
b2 -
b1 - T1CLKO : 允许 T1CKO(P3.5) 脚输出 T1 溢出脉冲,Fck1 = 1/2 T1 溢出率
b0 - T0CLKO : 允许 T0CKO(P3.4) 脚输出 T0 溢出脉冲,Fck0 = 1/2 T1 溢出率
*/
//-----------------------------------
sfr CLK_DIV = 0x97; //CLOCk Divder - - - - - CLKS2 CLKS1 CLKS0 xxxx,x000
//-----------------------------------
sfr BUS_SPEED = 0xA1; //Stretch register - - ALES1 ALES0 - RWS2 RWS1 RWS0 xx10,x011
/*
ALES1 and ALES0:
00 : The P0 address setup time and hold time to ALE negative edge is one clock cycle
01 : The P0 address setup time and hold time to ALE negative edge is two clock cycles.
10 : The P0 address setup time and hold time to ALE negative edge is three clock cycles. (default)
11 : The P0 address setup time and hold time to ALE negative edge is four clock cycles.
RWS2,RWS1,RWS0:
000 : The MOV X read/write pulse is 1 clock cycle.
001 : The MOV X read/write pulse is 2 clock cycles.
010 : The MOV X read/write pulse is 3 clock cycles.
011 : The MOV X read/write pulse is 4 clock cycles. (default)
100 : The MOV X read/write pulse is 5 clock cycles.
101 : The MOV X read/write pulse is 6 clock cycles.
110 : The MOV X read/write pulse is 7 clock cycles.
111 : The MOV X read/write pulse is 8 clock cycles.
*/
//--------------------------------------------------------------------------------
//新一代 1T 8051系列 单片机 中断特殊功能寄存器
//有的中断控制、中断标志位散布在其它特殊功能寄存器中,这些位在位地址中定义
//其中有的位无位寻址能力,请参阅 新一代 1T 8051系列 单片机 中文指南
// 7 6 5 4 3 2 1 0 Reset Value
sfr IE = 0xA8; //中断控制寄存器 EA ELVD EADC ES ET1 EX1 ET0 EX0 0x00,0000
//-----------------------
sbit EA = IE^7;
sbit ELVD = IE^6; //低压监测中断允许位
sbit EADC = IE^5; //ADC 中断允许位
sbit ES = IE^4;
sbit ET1 = IE^3;
sbit EX1 = IE^2;
sbit ET0 = IE^1;
sbit EX0 = IE^0;
//-----------------------
sfr IE2 = 0xAF; //Auxiliary Interrupt - - - - - - ESPI ES2 0000,0000B
//-----------------------
// 7 6 5 4 3 2 1 0 Reset Value
sfr IP = 0xB8; //中断优先级低位 PPCA PLVD PADC PS PT1 PX1 PT0 PX0 0000,0000
//--------
sbit PPCA = IP^7; //PCA 模块中断优先级
sbit PLVD = IP^6; //低压监测中断优先级
sbit PADC = IP^5; //ADC 中断优先级
sbit PS = IP^4;
sbit PT1 = IP^3;
sbit PX1 = IP^2;
sbit PT0 = IP^1;
sbit PX0 = IP^0;
//-----------------------
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
本文关键字:单片机 STC单片机(,单片机-工控设备 - STC单片机(