I was wondering if it is possible to count items passing in a belt with this microprocessor by connecting it to the belt.
The belt would generate impulses when the items are passing by. I'm not sure but maybe i can have an interrupt procedure to add the values to an accumulator register, but wouldn't the cpu be busy for at least 1 tick while processing the interrupt, thus being blind to some items passing by in the belt?
Or is there a safe number of ticks, even for the fastest belt, between two successive items?