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

  A thin circular cylindrical shell subjected to internal

a thin circular cylindrical shell subjected to internal pressure p isnbspsimultaneously compressed by an axial load p

  Carbon dioxide enters an adiabatic compressor at 100 kpa

carbon dioxide enters an adiabatic compressor at 100 kpa and 300 k actual inlet conditions at a rate of 0.5 kgs and

  Estimate the power required for each of four engines if

a large 600-m-long 100-m-diameter cigar-shaped dirigible is planned for cruises for retired engineers. as a first

  Determine the mass flow rate of fuels in grams per second

determine the mass flow rate of fuels in grams per second from the gasoline tank to the cars fuel injection systems and

  What are the mole and mass fraction of water at the air

consider the interface between atmospheric air and a body of water both at 17 degc.a. what are the mole and mass

  Calculate rate of heat loss per foot and thermal resistance

Calculate the rate of heat loss per foot and the thermal resistance for a 6-in. schedule 40 steel pipe covered with a 3-in. thick layer of 85% magnesia. Superheated steam at 300°F flows inside the pipe (hc = 30 Btu/h ft2 °F) and still air at 60°F is ..

  Two circular aluminum pipes of equal length l 24 in are

two circular aluminum pipes of equal length l 24 in are loaded by torsional moments t. pipe 1 has outside and inside

  Air enters an evaporative cooler at 95 kpa 35 degrees

air enters an evaporative cooler at 95 kpa 35 degrees celcius and 30 relative humidity and exits saturated. determine

  Optimus prime is flying straight up at 67 ms when he

optimus prime is flying straight up at 67 ms when he accidentally drops his mega-ray blaster and it falls 76 m to the

  Consider the variation of specific heat with temperature

A gas turbine power plant operating on an ideal Brayton cycle has a pressure ratio of 7. Determine the back work ratio of this cycle, if the temperature of air at the compressor and the turbine inlet are 300 K and 1300 K respectively. (Consider the v..

  The magnitude and direction of the resultant force

Consider the cylindrical weir of diameter 3 m and lenght 6m.if fluid on the left has specific gravity of 1.6,and on the right has a specific gravity of 0.8,find the magnitude and direction of the resultant force

  Generated by connecting these element in various combination

You are given a 10-mH inductor and 2 capacitors,of 5.0 and 2.0-MF capacitance .list the resonant frequencies that can be generated by connecting these element in various combinations

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