|
|
A bit of background info on how the 8 bit timers work on the H8 might be useful at this point, it's not too hard:
They're basically automatic counters. The speed at which they count is determined by a few status bits, and can be set to various divisions of the internal clock.
There are two values, called compare-matches, A and B. You can set status flags to do combinations of the following things when the counter reaches A or B, or 'overflows' i.e. goes from 255 back to 0:
- Set the output high
- Set the output low
- Toggle the output
- Reset the counter
- Fire an interrupt
Oh, and there's two of them 0 and 1. The 8 bit Timer 0's output is wired to the speaker on the RCX.
Simple really. Read the freindly manual (from Hitachi here), it's full of goodies 
|
|