Noman Yousaf
Full Member level 4
- Joined
- Nov 19, 2003
- Messages
- 208
- Helped
- 3
- Reputation
- 6
- Reaction score
- 2
- Trophy points
- 1,298
- Location
- Lahore Pakistan
- Activity points
- 1,763
hi
i want to get 16 bit data from timer/counter1 (as event counter) to portb and c in CCS.
how can i do it?
i did it by timer 0 as counter.
by following
SETUP_TIMER_0(RTCC_EXT_H_TO_L|RTCC_8_BIT|RTCC_DIV_2);
SET_TIMER0(0);
WHILE(1)
{
OUTPUT_B(GET_TIMER0());
}
one more problem i faced, in protuse, it increases after every 2 pulses to T0CLK pin.
i want to get 16 bit data from timer/counter1 (as event counter) to portb and c in CCS.
how can i do it?
i did it by timer 0 as counter.
by following
SETUP_TIMER_0(RTCC_EXT_H_TO_L|RTCC_8_BIT|RTCC_DIV_2);
SET_TIMER0(0);
WHILE(1)
{
OUTPUT_B(GET_TIMER0());
}
one more problem i faced, in protuse, it increases after every 2 pulses to T0CLK pin.