Microcontroller Applications: 3-Digit 7-Segment Display and Temperature Sensor Interfacing, Lab Reports of Microcomputers

Instructions for completing lab assignments in ece 4510/5950 microcontroller applications course during fall 2008. Assignments include creating a schematic diagram and writing c code for a 3-digit 7-segment display unit and temperature sensor interfacing using a 9s12dp512 microcontroller.

Typology: Lab Reports

Pre 2010

Uploaded on 07/23/2009

koofers-user-m7v
koofers-user-m7v 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 4510/5950 MICROCONTROLLER APPLICATIONS
Fall 2008
Prelab Assignment for Lab Eight
Task One
Ports A, B, and M are assigned for this task. You should make your own decisions on using them
in a particular way to build a 3-digit 7-segment display unit to the 9S12DP512 microcontroller.
The CPU clock must be set to 24MHz.
Draw a detailed schematic diagram for Task One. It should include IC part numbers, IC pin
numbers and H2 Connector pin numbers, respectively. All signal lines should be labeled.
Develop a C program module for Task One. The program should display decimal numbers in an
decrementing fashion from 212 to 0 at the display rate of approx. 1.5Hz. The program should run
in an infinite cycle. You are to decide how to implement the necessary delay between values to be
displayed.
Task Two
Part i.
Please refer to the Data Sheets of the LM35 Temperature Sensor and the Op Amp Application
Notes that are posted on the Design Clinic Section of the Class Web Page. Draw a detailed
schematic diagram for Task Two, Part i. It should include IC part numbers, IC pin numbers, and
values for the passive parts, respectively. All signal lines should be labeled.
Part ii.
Port K, Bit 0 (PK.0) is assigned for interfacing the DIP-Switch. The designated ATD1 input
channel is AN09. The conversion length should be 10 bits. The conversion sequence should be
three conversions per each conversion command. Your program should calculate the average of
the three values. You should make your own decisions on setting up the ATD1 clock prescaler and
sample time values, respectively. The ATD1 conversion synchronization method should be based
upon ATD1 interrupts.
For setting up the relevant registers please refer to the document S12ATD10B8CV2, the register
definition file, and the Instructor's Notes. In order to protect the microcontroller's analog input, you
should make sure that your sensor interface circuit will never produce output voltages
outside of the 0V- +5V range!
Draw a detailed schematic diagram for Task Two, Part ii. All signal lines should be labeled.
Develop a C program for Task Two, Part ii. The temperature sensor output voltages should be
sampled at approx. 30ms intervals. The 30ms delays should be based upon TOF interrupts. If the
signal from the DIP-Switch is low then the temperature values should be displayed in F. They
should be displayed in C, otherwise.
Task Three
Revise your C program for Task Three to run it from the Flash.

Partial preview of the text

Download Microcontroller Applications: 3-Digit 7-Segment Display and Temperature Sensor Interfacing and more Lab Reports Microcomputers in PDF only on Docsity!

ECE 4510/5950 MICROCONTROLLER APPLICATIONS

Fall 2008

Prelab Assignment for Lab Eight

Task One

Ports A, B , and M are assigned for this task. You should make your own decisions on using them in a particular way to build a 3-digit 7-segment display unit to the 9S12DP512 microcontroller. The CPU clock must be set to 24MHz. Draw a detailed schematic diagram for Task One. It should include IC part numbers, IC pin numbers and H2 Connector pin numbers, respectively. All signal lines should be labeled. Develop a C program module for Task One. The program should display decimal numbers in an decrementing fashion from 212 to 0 at the display rate of approx. 1.5Hz. The program should run in an infinite cycle. You are to decide how to implement the necessary delay between values to be displayed.

Task Two Part i.

Please refer to the Data Sheets of the LM35 Temperature Sensor and the Op Amp Application Notes that are posted on the Design Clinic Section of the Class Web Page. Draw a detailed schematic diagram for Task Two, Part i. It should include IC part numbers, IC pin numbers, and values for the passive parts, respectively. All signal lines should be labeled.

Part ii. Port K , Bit 0 ( PK.0 ) is assigned for interfacing the DIP-Switch. The designated ATD1 input channel is AN09. The conversion length should be 10 bits. The conversion sequence should be three conversions per each conversion command. Your program should calculate the average of the three values. You should make your own decisions on setting up the ATD1 clock prescaler and sample time values, respectively. The ATD1 conversion synchronization method should be based upon ATD1 interrupts. For setting up the relevant registers please refer to the document S12ATD10B8CV2 , the register definition file, and the Instructor's Notes. In order to protect the microcontroller's analog input, you should make sure that your sensor interface circuit will never produce output voltages outside of the 0V- +5V range! Draw a detailed schematic diagram for Task Two, Part ii. All signal lines should be labeled.

Develop a C program for Task Two, Part ii. The temperature sensor output voltages should be sampled at approx. 30ms intervals. The 30ms delays should be based upon TOF interrupts. If the signal from the DIP-Switch is low then the temperature values should be displayed in F. They should be displayed in C, otherwise.

Task Three

Revise your C program for Task Three to run it from the Flash.