How to lcdout TMR1 ?

jnilo

New Member
TMR1 is a word variable that stores a 16bit timer. However when I write:
lcdout #TMR1
only the dec value of TMR1L shows up on the LCD screen.
Why is that ? How can I display the full TMR1 variable in decimal ?
 
It works great but it's a bit of black magic to me How come a normal word variable can be easily "lcdouted" and not timer1 ?
Many thanks anyway !
Jacques
 
It depends on the compiler... I looks like a bug to me... I have just given you a workaround..

TMR1 is TMR1H and TMR1L pair.... With C compilers they can cast ( change its size ) and force it into a word...

I have no idea how Vladimir does it!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…