请教 C8051F系列单片机的引脚配置问题;
sfr P1 = 0X90 ;
sfr P1MDIN =0xF2;
sfr P1MDOUT=0xA5;
sfr P1SKIP =0xD5;
void IO_INIT(void)
{
P1MDOUT |= 0x46;
P1MDIN |= 0x10;
}
#define CS_L P1 &= ~0x04 //do {CS = 0;}while(0)
#define CS_H P1 |= 0x04 //do {CS = 1;}while(0)
#define SI_L P1 &= ~0x40 //do {SI = 0;}while(0)
#define SI_H P1 |= 0x40 //do {SI = 1;}while(0)
#define CLK_L P1 &= ~0x02 //do {CLK= 0;}while(0)
#define CLK_H P1 |= 0x02 //do {CLK= 1;}while(0)
//sbit CLK= P1^1;
//sbit CS = P1^2;
sbit SO = P1^4;
//sbit SI = P1^6;
四个IO口 其中 SO为 输入口 ,其余都为推挽输出IO口
|