This seems redundant to me
It could beCode:if PIP = 0 then increment if PIP = 1 then display increment:
Another possible improvement would be to consider using an interrupt to capture the change in state of PIP. Without that, you could miss / misread the timing since the code could be updating the display and doing a pause thereby losing time before you poll the PIP pin.Code:if PIP = 1 then display increment:
Bookmarks