This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Timer 0 as counter

Can anyone please send me the code for counting pulses using timer 0 as counter in 'C'language.

Parents
  • The C code is void main() { unsigned int Fpulse_count; while(1) { THO=0x00; TL0=0x00; P3=0xFF; TR0=1; if(TF!=1) { Fpulse_count++; } countpulses=TH0*256+TL0; }

    I have tried to arrange it in proper order but it is posting like this.

    Kindly reply on this only.

Reply
  • The C code is void main() { unsigned int Fpulse_count; while(1) { THO=0x00; TL0=0x00; P3=0xFF; TR0=1; if(TF!=1) { Fpulse_count++; } countpulses=TH0*256+TL0; }

    I have tried to arrange it in proper order but it is posting like this.

    Kindly reply on this only.

Children