|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
#include <AT89X51.H>
#include <stdio.h>
char ss;
void receive (void) interrupt 4
{
if (RI)
{
scanf("%s",&ss);
RI = 0;
}
if (TI)
{
printf("hello world!\n");
TI = 0;
}
else
return;
}
void main(void)
{
PCON=0x80;
SCON=0x50; //串行口模式1
TMOD=0x20; //定时器16位模式,定时器1为波特率发生器
TCON=0x40; //开启定时器
TH1=0x0F3; //定时器1波特率为4800
TL1=0x0F3;
IE=0x92; //定时器0中断允许,串行通信中断使能
while (1)
{
//ss ='b';
if (ss == 'b')
{
TI = 1;
P3_7 = 0;
}
else
P3_7 = 1;
}
}
为什么编译通过,,就是不能debug,,他说:could not load file,,,,debug aborted
请各位大大帮帮忙啊
|
|