actually i'm doing a code in counting duty cycle below is my code but there are still errors, could anyone can help me to modified it? pls and thank you
#include <REG8252.H> unsigned char pulse_low=0,pulse_high=0,pulse=0; unsigned int overflow_count=0, int_count=1; sbit INT1=P3^3; unsigned long pulse_width; void main() { TMOD=0x90; while(1) { TF1=0; while(INT1=1); TR1=1; TH0=0x00; TL0=0x00; IT1=1; IE=0x8c; while(int_count!=0); pulse_low=TL1; pulse_high=TH1; pulse=(TH1<<8)+TL1; pulse_width=(overflow_count)*65536+pulse; }} Void timer1_int()interrupt 3 { overflow_count++; } Void int1_()interrupt 2 { TR1=0; int_count--; }