View previous topic :: View next topic |
Author |
Message |
Guest
|
setting RTCC_DIV_2 and RTCC_DIV_4 |
Posted: Sun Mar 27, 2005 2:01 am |
|
|
Hi all
I am using Timer0 to set the sampling frequency. I have to work with 7 different frequency values. There are 7 different "if" statement and every statement uses its own sampling rate.
Forexample:1Khz,2Khz,3Khz,6Khz,8Khz,12Khz,16Khz so every time I need to set the setup_timer_0(RTCC_INTERNAL|RTCC_DIV_?); value. How can i do this with only one variable. Like a for
RTCC_DIV_2 and after that if i need RTCC_DIV_8, i shift a 2 bits.Is it possible??
Thanks
Best Regards |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sun Mar 27, 2005 8:25 am |
|
|
Read the datasheet on setting up the timers. You can do it manually. Beaware that there are only a few divide bys allowed. Read the datasheet and this will become more clear. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|