Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( a ) In this question, you may invent your own instruction set as long as it is reasonable for your program. You should also

(a) In this question, you may invent your own instruction set as long as it is reasonable
for your program. You should also comment your program properly.
The City Observatory is building an automatic system to issue bad weather
warning to the citizen. There is a rainfall meter and a wind speed meter to
measure the amount of rainfall (in mm) and the wind speed (in ms). The
control and status register of rainfall meter (RFCSR) has the following format:
Bit 0 Error bit, the rainfall meter is in error if bit=1
Bit 1 Ready bit, bit =1, the rainfall meter is ready
Bit 2 Data available, bit=1, data available in RFBR, automatically
cleared when RFBR has been read
Bit 3 Set this bit to start reading the rainfall meter.
Similarly, the control and status register of windspeed meter (WSCSR):
Bit 0 Error bit, the windspeed meter is in error if bit=1
Bit 1 Ready bit, bit =1, the windspeed meter is ready
Bit 2 Data available, bit=1, data available in WSBR, automatically
cleared when WSBR has been read
Bit 3 Set this bit to start reading the windspeed meter.
The buffer registers for rainfall meter and widspeed meter are RFBR and WSBR
respectively. The value return is the multiple of 0.1mm and 0.1ms. For example,
if 5 is read on the rainfall meter, the rainfall is 0.5mm.
The 7-segment LED display is used to display the weather condition, It is controlled
by the buffer register LEDBR. The value (from 0 to 9) written to LEDBR will be
displayed on the LED. If the value 10 is written, a hyphen (-) will be displayed.
Write an assembly language program that uses Programmed IO to read the
rainfall and windspeed meters continuously. [10]
If there is an error in either meter, display a "-" on the LED. Otherwise,
(b)(i) The above program uses programmed I/O. If interrupt-driven I/O is used
instead, describe what the process will be (no program needed), including
how the CPU services the interrupt, information saving and return. [3]
(ii) With reference to the program in part (a), if interrupt driven I/O is used,
which part of the program will not be needed anymore. [2]
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions