Hi all. I'm new to pics so please excuse this relatively basic question. PIC: 16f648a with 20MHz xtal Aim: To measure the charge time of an RC pair using the comparator and timer1 modules. Issue: What is the relationship between ticks and uC frequency? Or more simply, how do I convert the tmr1 value to seconds? These are my ponderings :) Assuming no prescaling does one tick occur for every cycle? t(s) = 1 / xtal Which with prescaling would lead to something like... t(s) = prescaler / xtal So with prescaler 1:8... t(s) = ( 8 / 20 * 10^6 ) = 0.4us Am I somewhere over the plate or stuck out in the carpark? Rob -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads