ECE243 Practice Question Website


Main Assembly Programming Input/Output Memory Computer Architecture Advanced Topics

Assembly Programming Questions





Question 38

Every rotation of a motor causes a switch to be pushed. The switch, like most mechanical switches, ‘clatters’ or bounces when the contacts come together, causing an interval when a single press causes multiple closures. This bouncing can continue for just under 3 milliseconds.
The switch is linked into the memory map of a 68000 processor at bit 0 of location $FFFFF000. It is connected so that the bit will read a ‘1’ when the switch is open, and a ‘0’ when closed and not bouncing. The bouncing will cause alternating zeros and ones.
For ease of any analysis you do, assume that every instruction takes 1 usec., regardless of addressing mode.

What is the approximate limit to the rate at which the motor can turn and your program from Question 37 still correctly count the pushes of the switch?

Answer

300 Hz to 330 Hz [1/(3 msec)]