This seems redundant to me
Code:
    if PIP = 0 then increment
    if PIP = 1 then display
increment:
It could be
Code:
    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.