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

Clearing my doubts...

I was thinking whether its feasible to use a 8-bit counter with auto-reload to capture the number of peaks detected within 100ms.

Parents
  • I know how to configure the timer already. Whenever theres is a pulse, an interrupts will occurs and copy the values of RCAP2H and RCAP2L. But i do not know how to make it such that when it recorded 4 pulses, it will stop and later loop back again. I know i have to use the DJNZ instruction, but where do i put the DJNZ instruction?

    Can someone pls advice me on what to do?

Reply
  • I know how to configure the timer already. Whenever theres is a pulse, an interrupts will occurs and copy the values of RCAP2H and RCAP2L. But i do not know how to make it such that when it recorded 4 pulses, it will stop and later loop back again. I know i have to use the DJNZ instruction, but where do i put the DJNZ instruction?

    Can someone pls advice me on what to do?

Children