Write the software for the transmitting computer

Assignment Help Mechanical Engineering
Reference no: EM131089921

The objective of this exercise is to develop a message-passing facility that spans across two computers (Figure 14.24). A fully interlocked synchronization method will be implemented. The message is a simple 8-bit byte that is passed from the output port of Computer 1 to the input port of Computer 2. The following hardware connections are fixed. You may assume both computers initialize together, where Computer 1 initializes its PT7 to 0 and Computer 2 initializes its PT6 to 0.
Figure 14.24

When Computer 1 wishes to transmit to Computer 2, it puts the data first on its Port H outputs. Next, Computer 1 makes a rising edge on PT7, signifying that new data are available. Computer 1 will then wait for a rising edge on PT6, signifying that the data have been accepted. Next, Computer 1 makes its PT7 low. Last, it waits for a low signal on its PT6 input line.

a) Write the software for the transmitting Computer 1. The transmission will occur in the background using input capture interrupts. You may use a FIFO queue without writing the three routines: InitFifo, PutFifo,and GetFifo.You may ignore FIFO full errors. There are three routines you will write.

1. void Ritual(void) that clears the FIFO, makes the PT7 output low, and arms/enables the input capture interrupts as appropriate;

2. void PutMsg(unsigned char data) function that is called by the main program (that you do not write); if a current message is in progress, then these data are entered in the FIFO; if there is no current message in progress, then one is started with the new data;

3. void IC6Handler(void) interrupt handler called by the input capture on PT6.

When Computer 2 wishes to receive from Computer 1, it first waits for a rising edge on its PT7 input. Then it gets the data from its Port H inputs. Next, Computer 2 makes a rising edge on its PT6 output, signifying that the data has been accepted. Computer 2 will then wait for a falling edge on its PT7 input. Last, it makes a low signal on its PT6 line
b) Write the software for the receiving Computer 2. The reception will occur in the background using input capture interrupts. You may use a FIFO queue without writing the three routines: InitFifo, PutFifo, and GetFifo. You may ignore FIFO-full errors. There are three routines you will write.

1. void Ritual(void) that clears the FIFO, makes the PT6 output low, and arms/enables the input capture interrupts as appropriate;

2. unsigned char data GetMsg(void) function that is called by the main program (that you do not write); if the FIFO is empty, then this routine will call the get() routine over and over until data are available;

3. void IC7Handler(void) interrupt handler called by the input capture on PT7.

Reference no: EM131089921

Questions Cloud

Give the api mode 1 frame $42 will receive from its xbee mod : Give the API mode 1 frame $42 will receive from its Xbee module.
Organization labor relations professionals : There is a written Course Project,. It should be 15-20 pages in length (excluding the cover and reference pages). Your work must be double spaced with 1-in. margins and should use one of the five approved style formats (APA or MLA are preferred). ..
What is the second shift : What is "the second shift?" What is the "leisure gap?" Hochschild mentions that she did an earlier study similar to that in The Second Shift. Why did she choose to do another study of the same issues? (i.e., what were the problems/limitations of he..
What is the difference between homogamy and endogamy : What is the difference between homogamy and endogamy? Between heterogamy and exogamy? Why is the question of who marries whom of interest to sociologists
Write the software for the transmitting computer : Write the software for the transmitting Computer 1. The transmission will occur in the background using input capture interrupts. You may use a FIFO queue without writing the three routines: InitFifo, PutFifo,and GetFifo.You may ignore FIFO full e..
An evaluation of consumer behaviour : 1. Introduction or background to the research problem or issue, including an identification of the gap in the current research 2. Research question and, if possible, a thesis statement answering the question
Counseling and performance improvement plan : Assignment Description: HR Manager Role Play: Delivering a Performance Appraisal with Counseling and Performance Improvement Plan
Paper based on personal perceptions : Prepare a paper based on personal perceptions of what you consider as fair and equitable compensation. Use critical thinking to discuss issues from two perspectives, employee's and employer's.
Process for conducting a job analysis : Assignment Description: Imagine that you are the Human Resources Director for a medical clinic. For this assignment, please design a recruiting plan for a new Registered Nurse. The plan you propose should address all of the following three element..

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  The angle between the velocity of the charge and the field

a charge of -8.1 microc is traveling at a speed of 8.7 106 ms in a region of space where there is a magnetic field. the

  What is the compression ratio of the cycle

an air-standard otto cycle uses 0.1 kg of air and has a clearance of 17%. THe intake conditions are 98 kPa and 37 C and the energy released during combustion is 1600 KJ/kg. What is the compression ratio of the cycle?

  The upper block just begins to slip when the amplitude is

the two blocks in the figureoscillate on a frictionless surface with a period of 1.7 s. the upper block just begins to

  How long did the electric heating system run that night how

a passive solar house that is losing heat to the outdoors at an average rate of 50000 kjh is maintained at 22 c at all

  In kidney dialysis a persons blood is passed through a bath

in kidney dialysis a persons blood is passed through a bath that contains several ions and molecules. the blood is

  High-tension line has an electrical resistance

A 25-mm-diameter, high-tension line has an electrical resistance of 10-4  !1/m and is transmitting a current of 1000 A. If ambient air at 10°C and 5 m/s is in cross flow over the line, what is its surface temperature?

  During the expansion some of the water evaporates but no

ten grams of liquid water at 95 c are contained in the insulated container shown. the pin holding the frictionless

  Coefficient of performance of the heat

Determine (a) the coefficient of performance of the heat pump. (b) the coefficient of performance of a reversible heat pump operating between hot and cold reservoirs at 708F and 308F, respectively, and the corresponding rate at which energy wo..

  Describe the process to assess a buildings exposure to wind

Describe in detail - using hand drawn imagery and text, describe the information required to be detailed in a site plan. analysis describe the process to assess a buildings exposure to wind loads and what forms of bracing are used to counteract thes..

  Calculate the maximum bending stresses ss

If the allowable bending stress in the steel plates is as 14,000 psi and that in the wood is σaw = 900 psi, find qmax. (Assume that the moment at B, M0, remains at 300 ft-lb.)

  Determine the coefficient of performance of the machine

An air-conditioner using R-134a as the working as the working fluid maintains a space at a constant temperature of 23 degrees celsius while rejecting heat to the outside at 37 degrees celsius. The rate of heat gain in the space is 5.0kW.

  Find the q values and plot the feed lines a feed is 60

we are separating ethanol and water. all percentages are mol. find the q values and plot the feed lines. a feed is 60

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd