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

  Package design

Package Design Brief: Assume you are the packaging engineer for a large consumer products company. In this company, the Packaging Design Briefs are initiated by the marketing group and forwarded to the Package Engineering group.

  Mechanical engineering questions

Define dynamic viscosity, Determine the centroid, Pressure due to the height of liquid, Advantage of changing the liquid, Calculate the total moment about the hinge of the seal gate.

  Automatic control

DOF system and Find the differential equation describing the system

  Write a paper on boyle''s law

Write a paper on Boyle's law and describe Compression and Combustion stroke . Also explain Charles's law and illustrate SI engine and CI engine.

  Verify the law for parallelogram of forces

To Verify the law for parallelogram of forces, law for triangle of forces and law of polygon of forces. These laws are very useful to calculate unknown forces in very short time.

  Discharge pressure of the compressor

What is the discharge revised discharge pressure of the compressor.

  The Case for Global Accounting Standards

The role of IFRS in both developing and developed capital markets.

  Wind turbine

Wind turbines are becoming more and more common as a method of energy production, wind turbines by their very nature are dynamic and are subject to and create their own internal and external kinematics and kinetics.

  Advanced design methodologies

8 x product engineering and design review (week 2 – 12), ~3 pages per item which must contain a brief description of the product then delve into concepts such as materials selection, manufacturing methods, life cycle analysis, recyclability and overa..

  Design of absorption column and the cooler

Design of absorption column and the cooler. Process design of other units should be completed along with pipe sizes.

  Determine the maximum total bending moment

Determine maximum total bending moment (static plus dynamic) of the beam under steady-state conditions.

  Force of the water on the gate

Determine the magnitude of the horizontal and vertical components of the force of the water on the gate.

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