Micro Eng wrote: > switching gears to a diff project.... > > I am using a 4.9152MHz crystal, and part of what I need to do is do some > timing delays like 30 seconds, 1 hour, a day and 30 days. > > So I figured the easiest way is to have registers that decremented for > minute, for hour, for day, etc. > > HOWEVER....looking at the prescaler values for say TMR0, if I use this > crystal (that someone else said...use this and it will work fine) each > state > cycle is .813uS (approx) and if I use the 1:256 prescale I get > 208.33mS for > each tic for TMR0 and since its just an 8bit value, I can't get one > second, > best I can get is 1/32 of a second. Setting TMR0 to count 240 gets you a nice round 50 mS. Every 20 of these is a second.... > And of course thats fine, I get the > TMR0 interupt and dec a register,etc. Now also someone mentioned to me > about using the CCP but I don't quite follow how that might help Since you didn't mention which PIC.... No comment. > > > _________________________________________________________________ > Join the world s largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- * | __O Thomas C. Sefranek tcs@cmcorp.com |_-\<,_ Amateur Radio Operator: WA1RHP (*)/ (*) Bicycle mobile on 145.41, 448.625 MHz ARRL Instructor, Technical Specialist, VE Contact. http://hamradio.cmcorp.com/inventory/Inventory.html http://www.harvardrepeater.org -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads