
WARNING: Do not try to read the Periodh/l registers directly.Īssembly Example 1: Setting the timer to run for 1000 clock cycles, and stop when it times out By writing to either one of the snapshot registers (the written value is ignored), the current value of Periodh and Periodl, will be copied into the corresponding snapshot registers, which can then be read as in example 2 below. Instead, the Counter Snapshot is used to copy the current time remaining, which can then be safely read by the user. Reading the time remaining in the timer can not be done by reading the Periodh/l registers. The continue bit determines whether the timer will then wait until 1 is written to the start bit again, or continue running immediately. When a timeout occurs, the timer's counter is reset to the period, regardless of the "continue" bit. When a timeout occurs, the Timeout bit in the Control Register will stay as 1 until the user writes 0 to the status register. Both those registers are only 16-bits, even though they take up 32-bits of the address space. The full 32-bit period of the timer is given by the combination of "Periodh" and "Periodl". The timer counts downwards on a 100MHz clock, and runs in terms of clock cycles (a period of 100000000 will cause the timer to timeout in 1 second). Write 0 to status register to clear timeout bit (see address map above) Timer1 use IRQ line 0 Timer2 use IRQ Line 2 None (though a period must be written before running the timer, or it will immediately timeout)

Periodh - upper 16 bits of Timeout period Periodl - lower 16 bits of Timeout period Otherwise it will just reload the timeout period, but not start) Tiner 1: 0xFF202000 and Timer2: 0xxFF202020Ġ - Timeout (1 if timer has timed out - write 0 to this address to clear)ġ - cont (if this bit is 1, timer will restart and continue when it times out, DeviceĦ 32-bit mapped registers (only lower 16 bits used) A user loads the timer with the number of clock cycles they'd like to wait, and then polls the "Timeout" bit or optionally enables an interrupt to indicate to the processor that the period has elapsed. And the best part is that it's free.The timer is a peripheral that allows the user to measure real-time as a number of clock cycles. No matter what your needs are, you will be satisfied with this ingenious program. This should surely be enough time to count even the longest duration of minutes.Ĭool Timer is a slick and versatile application and smooth addition to the standard Windows programs.


Only need an alarm on certain days? Again, Cool Timer has you covered.It will automatically unmute the system volume before the alarm goes off. Accidentally mute your volume before the alarm goes off? No worries, this could happen to anyone.You can also use your own sounds for the timer, as long as they are in one of the supported formats, which are mp3 and WAV It comes with three built-in sounds with the alarm that are guaranteed to be cool.Three different modes: stopwatch, alarm clock, and countdown timer.However, if these are not enough for you, there is also a paid version which has even more features. There is a free version, and even that one has many features.It has many features and an attractive design. Thankfully, Cool Timer is the solution you have been looking for. But the built-in Windows timer can leave a lot to be desired.
