I didn't know there was an PIC18F877 and I can't seem to find a datasheet for it so I would guess you're using the 16F877 but that doesn't have a 16bit TMR0 so you'd need to clarify that a bit.
But generally speaking, you read the TMR0L first which latches the high byte of the timer/counter into TMR0H for you to read./Henrik.Code:myCount VAR WORD myCount.BYTE0 = TMR0L ' Get low byte and latch content of high byte myCount.BYTE1 = TMR0H ' Get high byte




Bookmarks