MSP430 Microcontroller Basics

9.10: Operation of SD16_A

9.10 Operation of SD16_A

I give a few examples of the SD16_A in action. The first input is a straightforward voltage from a potential divider. This is a single-ended signal and I therefore chose differential inputs for the next example. The final case is a cute application to make a self-dimming LED.

9.10.1 Simple, Single-Ended Input to SD16_A

Listing 9.10 shows a straightforward program to take a block of independent readings with the SD16_A in a F2003. The circuit is the same as in Figure 9.17a, with a potential divider connected to P1.1. This pin can be used as either A 0- or A 4+ and is routed to the SD16_A by setting the SD16AE.1 bit. The measurement is single-ended rather than differential so I use channel 4 and ground its negative input A 4-. This can be taken from pin P1.2 so I ground it internally by keeping SD16AE.2 clear.

Listing 9.10: Program sd16led3.c to store 32 independent readings from the SD16_A in an array and light an LED if the result is in the upper half of the input range
// <i class="emphasis">sd16led3.c - lights LED for high input voltage using SD16A</i>// <i class="emphasis">SD16A channel A4+ on P1.1, A4- int gnd, "single" convs (actually 4)</i>// <i class="emphasis">Store a block of readings for statistical analysis</i>// <i class="emphasis">Homemade analog demo board for MSP430F20xx:</i>// <i class="emphasis">10k on P1.5, 20k variable on P1.6, junction to P1.1 with 10nF cap</i>// <i class="emphasis">100n cap on P1.3 for Vref, LED active...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: DC-DC Converter Chips
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.