/*500ms闪烁。
#include "reg52.h"
#include "demo.h"
#include "water_led.h"
#include "interrupt.h"
#include "define.h"
#include "intrins.h"
uint i;
sbit led2=P2^2;
int main ()
{
led2=1;
i=0;
timer_interrupt_0_1 (); //?¨ê±?÷?D??0,50ms
while (1);
}
void ET0_1 () interrupt 1
{
i++;
led2=1;
if(i==10)
{
led2=0;
i=0;
}
}
*/
#include "stc15.h"
#define uint unsigned int
sbit a=P1^1;
unsigned int b;
unsigned int c;
/*输出2.5khz的方波
int main ()
{
a=1;
TMOD=0x00;
TH0=(65535-50000)/256;
TL0=(65535-50000)%256;
ET0=1;
EA=1;
TR0=1;