Jun 8, 2012 #1 E 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?
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?
Jun 9, 2012 #2 R rajudp Advanced Member level 2 Joined May 27, 2006 Messages 643 Helped 123 Reputation 246 Reaction score 96 Trophy points 1,308 Location India Activity points 4,055 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);
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);