timer0 counter ccs c compiler

Status
Not open for further replies.

eray81

Junior Member level 3
Joined
Jan 1, 2012
Messages
29
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,461
Hi ,
I want to use timer0 as counter for a dc motor encoder. But for the CCS C compiler i dont know how to do it? How can i use timer0 as external pulse counter?
 

try this
setup_timer_0(RTCC_EXT_H_TO_L|RTCC_DIV_1|RTCC_8_bit);
or

setup_timer_0(RTCC_EXT_L_TO_H|RTCC_DIV_1|RTCC_8_bit);
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…