Tom, You are right but how to get it closer? Andre -----Original Message----- At 04:59 PM 8/5/03 -0700, you wrote: >Denny, > >This is for power inverter that from 0-360 must be 16.66 ms >16,66/360=46.27us but we are getting 46.25us > >Andre Andre, you have some interesting numbers here. You don't like the error from this: 46.25us * 360 = 0.016650000 ; reciprocal = 60.060060060 when you say you want this: 46.27us * 360 = 0.016657200 ; reciprocal = 60.034099368 but this seems like this might be closer: 46.296296us * 360 = 0.016666666667 ; reciprocal = 60.00000000 *If* you are trying to produce 60.00000 Hz, it *looks* like 46.27us is not the correct value either. Of course, there is probably plenty we don't know about what you are trying to do. I was suspicious of round off error when you called out 16.66 ms in your last email. Just curious. Tom -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics