

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


page 1 of 2
For setting up the relevant ECT Module registers please refer to the document ECT_16B8C Block User Guide V01.02 and the Instructor's Notes posted on the Class Web Page.
Port T (PT.7 โ PT.0) is designated as the ECT special function port pins. Port H (PH.7 โ PH.0) is designated as the parallel output port. Port A (PA.7โฆPA.0) is designated as input port for this lab.
The designated output port bit is Port H Bit 4 (PH.4). The LED should flash at the rate approx. 3.0Hz.
The PH.0 signal should be buffered by a suitable chip to provide enough current for the LED. Draw a detailed schematic diagram for Task One. It should include an IC part number, IC pin numbers, and H1 Connector pin numbers. All signal lines should be labeled.
You should develop a C program to flash the LED at the specified rate. The program should run in an infinite loop. The timing should be based upon Timer Overflow (TOF) Interrupts.
The Output Compare function should be implemented using Timer Channel 3 (PT.3). It should output a signal at 440 Hz, 50% duty cycle (A above middle C on a piano).
49 = โ
โโโ^ n โ โโ โ F n for n=1:
See http://en.wikipedia.org/wiki/Piano_key_frequencies
The PT.3 signal should be buffered by a suitable chip. Draw a detailed schematic diagram for Task Two. It should include an IC part number, IC pin numbers, and H1 Connector pin numbers. All signal lines should be labeled.
Develop a C program that will generate the output signal specified above. The program should run in an infinite loop. TC3 interrupts should be used to create the output signal.
The two input signals should be driven by DIP-Switches. The designated input port bits are PA. and PA.0, respectively. The status of the input signals should be read at approx. 100ms intervals. The output signal should be generated using Timer Channel 3. The conditions are as follows:
page 2 of 2
Port A signals should be buffered by a suitable chip to pass the signals from the DIP-switch module to Port A (and for protection). The input signals to the buffer chip should exhibit either low (0V), or high (5V) logic levels. No intermediate voltage levels are permitted. In addition, you should also guarantee CMOS-compatible High signal levels at PA.1 and PA.0.
(Question: Could you use an 8-input dip switch and make all the frequencies that relate to a piano?)
The Flash memory area starts at 0x4000. Instructions on programming your C code to the Flash will be given in the lab (and it is also posted on the Class Web Page). You will also be given the know how to restore the D-Bug12 Monitor program after you have completed Task Four.