Quote Originally Posted by kevj View Post
I'm asking if I create a 16 bit variable, and populate it by saying "myVar = TRM1", will it automatically plug the TMR1H and TMR1L values together and stick them into myVar?
And if I add 100 to that value, then populate the timer registers again by plugging this variable back in like this "TMR1 = myVar", will the binary values of the 2 8-bit registers get split correctly and put back into TMR1H and TMR1L as appropriate?
Ok, I got you...
It may depend on the PIC, not sure, the datasheets will tell.
But...
I'm looking at the 18F4620 datasheet, there's a section in there under Timer 1 that talks about 8 bit vs 16 bit Timer 1 writes.
Basically, you can't go TMR1 = var, you do actually have to use 2 8bit writes. You can't directly access TMR1H, it gets buffered in the 16 bit R/W mode. (section 12.2 of the 18F4620 datasheet)