I'm trying to calculate a pulse width with the rfPIC12f675 using IOC. My pulse width will range from 3ms-7ms, and so i'm aiming to detect up to 4000 different values.
2 issues come into play.
1. (Most important issue) Timer1 is seperated into two 8bit addresses, TMR1H and TMR1L (i believe). Where TMR1H is the upper 8bits or the timer, and TMR1L is the lower 8bits of the timer. How can I "combine" these 2 addresses so that I can subtract the rising edge time from the falling edge time?
2. Using IOC, how can I check if the IOC went from low to high, than high to low on a specific port. I realize I can use GP2 for edge detecting setting for rise edge and falling edge, but I have 2 ports with incoming pulse widths, and thus have just decided to use IOC for both ports.
Bookmarks