I am trying to implement Darryl Taylors interrupt driven timer code.

http://www.picbasic.co.uk/forum/showthread.php?t=190

I have changed the code so it counts the time in milliseconds between 2 inputs instead of days/hours/mins/secs - also the corrosponding lines as well.

LCD output lines....

Original code
LCDout $FE,2, dec Days,"d-",dec2 Hours,":",dec2 Minutes,":",dec2 Seconds

Myline
LCDout $FE,2, dec Ticks," ms"

Ticks now counts 1000/second up to 5000 max - 5secs

The problem I have is with the LCD output. If Ticks value is say 1100, then LCD will only show '11 ms' zeros are always missing. An ouput from other values, for example, 2875 reads fine, ie '2875 ms'

I have tried dec2, dec3, dec4 etc but I'm not 100% sure what dec means and why the zeros are not displayed. There is probably a very simple solution - I hope

Cheers
Adam