Ingavr and acetronics thanks for replying!Have you any idea how to make it working to count simultaneously the 2 channels?
COUNT is not design to count on 2 pin at the time. You can use Interrupt on PORTB change. Once in the interrupt routine, read the whole PORTB, keep only the upper bit and see wich is LOW, increment a counter variable and TADA.
OR without interrupt routine, poll the interrupt flag and do the same as above.
HTH
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks