#include "reg52.h"
#include <intrins.h>
#include <absacc.h>
#define uint unsigned int
#define uchar unsigned char
/*操作地址0xffff; t0地址0x3fff; t1地址0x7fff; t2地址0xbfff;*/
sbit led1=P1^3; //指示灯1
sbit led2=P1^4; //指示灯2
sbit bell=P1^1;
unsigned char xdata *p; //p用来做地址访问指针
#define COM8254 XBYTE[0xffff]
#define T08254 XBYTE[0x3fff]
#define T18254 XBYTE[0x7fff]
#define T28254 XBYTE[0xbfff]
void delay(uint n)
{
uint i,j;
for(i=0;i<100;i++)
{
for(j=0;j<n;j++)
{}
}
}
void main()
{bell=1;
//P1=0x00;
COM8254=0x35;
T08254=0xf4;
T08254=0x01;
while(1)
{
}
}
电路图是这样,
------解决方案--------------------
看不到图……
------解决方案--------------------
没看到你是怎么实现的 主函数里面什么也没做