Download Getting Started with Stellaris ARM Cortex-M

Transcript
Stellaris®ARM®Cortex ™-M3 Lab Manual
131
11.5 Experiment 18
11.5.1
Objective
Measure the ambient temperature using onboard LM35 and send the temperature values in
degrees Celsius over the UART for display in the terminal program.
11.5.2
Program Flow
Figure 11.6
Block diagram for Experiment 18
The aim of this experiment is to sample the ambient temperature using LM35 sensor, scale
it and send the value over UART0 for display on the serial monitor. This experiment also
aims to evaluate the ADC module along with the UART module. Figure 11.6 shows to the
block diagram of the setup required for this experiment. The algorithm to be followed for
the program is:
• Enable the system clock, UART and the ADC module.
• Sample the temperature using ADC Channel 7.
• Scale the 10-bit value accordingly.
• Transmit the temperature value over the UART for display on Serial Monitor.
A suggested program flow is shown in Figure 11.7.