Calculating LED Toggle Frequency and Adjusting Timer Period for a 32-bit MIPS Processor with Memory-Mapped I/O"Mips

36 views Asked by At

Suppose you have a 32 bit mips processor that can communicate with a 16 bit timer using memory mapped I/O. Suppose you have configured the timer to have prescaling 1:8. The timer runs at 16MHz. The timer period register is set to value 1000. Each time the timer finishes its count (wrap around when counted up to 1000), a led light is toggled between on and off. That is, the first time the timer wraps, the led light is turned on, the second time it wraps, the LED light is turned off, etc.

a) How many times per second is the LED light turned on? b) What value should the period register have, to make the led light twinkle twice as fast?

I get that the answer for a is 1000 and b is 500. However I do not really understand why. Could someone explain this?

0

There are 0 answers