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.
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..
|