You are on page 1of 2

#include<reg51.

h>

sbit SW=P1^7;

sbit IND=P1^0;

sbit WAVE=P2^5;

void timer(void)interrupt 1

WAVE=~WAVE;

void main()

SW=1;

TMOD=0x02;

TH0=0xA4;

TR0=1;

IE=0x82;

while(1)

IND=SW;

You might also like