[A83] Re: Detecting clock frequency


[Prev][Next][Index][Thread]

[A83] Re: Detecting clock frequency







> Did you try it yet with different types of batteries?
> And ones with much power, or low power?

Only got the one set ot batt's at hand, ATM. I did try heating them up
slightly, and this pushed the reported speed up to 6.2Mhz (from about 5.9Mhz
cold).

> (maybe you could write a program to determine how much
> timer interrupts occur in a second?)

The one problem here is (AFAIK) that the timer interrupt is triggered by the
CPU clock. Ie - If the CPU clock slows down, so does the frequency of the
interrupts.

The first method I tried before coming to the solution I posted, was to see how
many LCD operations I could peform between two timer interrupts, but the
routine which waited on the LCD driver busy signal was too inaccurate; it would
over-shoot a lot due to the time taken to check the busy bit in the first
place! This program solves that problem by reducing the overhead to an absolute
minimum (about 7 T-states, I think), and incrmements in units of 4 T-states (a
NOP) until it hits the right speed.

I might go and grab some ultra heavy-duty batts later on and see how that
affects the reported speed, but I would really love to know what it reports for
a SE in 15Mhz mode... hopefully 15mhz!




References: