I made some changes, please check. interrupt will occur every 0.0262144 seconds for 20mhz clock
so, I count by 262144 until > one second (10000000), then I remove one second (10000000) and continue to add by 262144 again. I put it beside my PC clock, but it still seems that I am loosing time, don't know why. Matt. On Apr 8, 2:06 pm, mattschinkel <[email protected]> wrote: > > If you take 301/2048 as a basis, you are 100% accurate (in the sense > > that the software does not add any deviation) with little processing. > > > Joep > > This calculation seems good for a 20mhz oscillator, but what if > someone uses another osc speed? I did my calculation based on the > oscillator, so later, I can make a init procedure to do the > calculation for any osc speed. > > 20_000_000 is a decimal number, that's why I used decimal. by using > large variables I could calculate for a random osc such as 21.3234 > mhz. > > > How do you expect this can be tested? > > Vasile > > Good question. At first, I just want to make sure the calculations are > 100% correct. If all calculations are correct, it should only depend > on the accuracy of the osc. > > Matt. > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/jallib?hl=en. -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
