I'm pretty sure there are PICs with a full 8-bit port worth of IOC capable pins and some devices lets you set it up so it only triggers on rising or falling (and not both).
But since this is still a fairly low frequency input I guess you could just poll the port, periodically (like 10 times per second) and XOR the port with the result from the previous poll. Any bits set in the result have changed. Increment your 8 counters based on state of each bit. This has the drawback of incrementing the counter twice for each pulse but there are ways around that too of course.
/Henrik.
Bookmarks