
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Homework assignment 5 for the ece 4510/5530 microcontroller applications course, due on october 13, 2008. Students are required to implement a digital i/o signal interface using the adapt9s12dp512 board, with specific timing requirements for input signal en# and output data lines d7-d0. The assignment includes creating a flowchart and a syntactically correct c program segment, without interrupts or hardware interface.
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Fall 2008 Homework Assignment # Total: 50 pts. Due 3:30pm, Monday, October 13, 2008
You are to implement a digital I/O signal interface assuming the Adapt9S12DP Board as follows. Input signal EN# (active low) is driven by some peripheral device. Initially, EN# is at high level. Output data lines D7-D0 should be at 0xF0 , initially. As soon as a high-to-low transition on EN# is detected by the microcontroller system, D7- D0 must be changed to 0x0F for approx. 75μs and then return to 0xF0 for approx. 35μs. At the end of the 35μs time period the system should again check the status of EN#. If EN# is low at that point then the system should generate another full waveform of 110μs on D7-D0. If EN# is high then D7-D0 should stay at 0xF0 , instead. From this point on the system should wait for the next high-to-low transition on EN#. Then the process repeats as outlined above. Only Ports T and H are available for this interface. Output Compare on TC4 should be used to generate the required timings. However, no interrupts are allowed. The CPU clock has been set to 8MHz. No hardware interface is required in this assignment.
1. Explain your approach for the solution to the problem by means of a flow chart. That should include considerations to meet the timing requirements. You should also give your bit maps for Ports T and H. (10pts.) 2. Develop a syntactically correct C program segment (embedded assembly code is not allowed) for this interface. You may assume that your program will have sufficient time to initialize output signals D7-D0 to 0xF0 before the peripheral device is ready to drop signal EN#. Choose data, and variable locations for your program such that it could run on the system in the Lab but you are not required to prove that it has actually run. Turn in your .c and .lst files, respectively, and comment on your code for full credit. (40pts.)