UroBoros
Advanced Member level 2
- Joined
- May 5, 2004
- Messages
- 642
- Helped
- 19
- Reputation
- 38
- Reaction score
- 8
- Trophy points
- 1,298
- Location
- Cochin - India
- Activity points
- 6,463
little endian keil
Hai,
In Timer2 ISR I have a unsigned intiger variable.
How I can I equate the lower byte of the variable to TL2 and upper byte to TH2.
so that I can treat the variable as timer value
I think keil has got a method.not sure.
Please suggest
Thanks for the reply
Sorry for the mistake. my question was totally confusing.
Actually on the external interrupt from port3.6,I want to read the timer 2 value into a variable.(TH2 and TL2).
suppose I declare a variable
unsigned int timer2_val;
How can I move TL2 and TH2 into lower and upper nibble of timer2_val, so that I can treat Timer2 value as a single variable.
I am a beginner in C.
Thanks again
Picstudent
Hai,
In Timer2 ISR I have a unsigned intiger variable.
How I can I equate the lower byte of the variable to TL2 and upper byte to TH2.
so that I can treat the variable as timer value
I think keil has got a method.not sure.
Please suggest
Thanks for the reply
Sorry for the mistake. my question was totally confusing.
Actually on the external interrupt from port3.6,I want to read the timer 2 value into a variable.(TH2 and TL2).
suppose I declare a variable
unsigned int timer2_val;
How can I move TL2 and TH2 into lower and upper nibble of timer2_val, so that I can treat Timer2 value as a single variable.
I am a beginner in C.
Thanks again
Picstudent