Question
A microprocessor scans the status of an output I/O device every 20 ms.This is accomplished by means of a timer alerting the processor every 20
A microprocessor scans the status of an output I/O device every 20 ms.This is accomplished by means of a timer alerting the processor every 20 ms.The interface of the device includes two ports: one for status and one for data output. How long does it take to scan and service the device given a clocking rate of 8 MHz? Assume for simplicity that all pertinent instruction cycles take 12 clock cycles.
Question: How would I draw a timing diagram for this? Im a little confused on how to do that. I solved the problem already and the answers are below. Thanks
ANSWER:
Time to scan the device: (Time taken to scan the device) = (Number of instructions x clock cycles per instruction)
Frequency of processor = 8 MHz 1 M =10^6.
Clock cycle = 1 / frequency.
(Substitute the value 8 x 10^6)
Time for one clock cycle = 1 / 8 x 10^6
=0.125 x 10^-6
=0.125us
The number of clock cycles of an instruction cycle takes 12. The time taken for 12 clock cycles is 12 x 0.125 = 1.5us.
Time take for clock cycles per instruction = 1.5us.
In order to check the status of the device only one input instruction is required. Then there are two other instructions that will take place which will be when the device is examining the register contents and an output instruction when the device is ready to output information. Total number of instructions = 3.
Substitute 3 in the number of instructions and 1.5us for clock cycles.
Time taken = 3 x 1.5us
= 4.5us.
Time taken to scan and service device would be 4.5us.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started