Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to lcdout TMR1 ?

Status
Not open for further replies.

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!
 
Status
Not open for further replies.

Latest threads

Back
Top