Cant display 8 on my digit display when given the time interval!!

Reading the start of your code, you have if I = 10 then I = 0, when I should read I= 1. you don't have a case 0 and two lines up, you are making sure that I ++ so I automatically starts at 1. and you might as well go with Dis(I) instead of x=I; and then dis(x);