Reference no: EM13347590
Analog Measurements
Prepare an assembly program for the correctly measures the wind direction, to a precision of 45° (N, NW, W, SW, S, SE, E, NE), using the MSP430's ADC.
Your program will output the direction using four LEDs, one each for N, E, S, and W. If the wind direction is out of the N, only the N LED can light. If the wind direction is out of the NW, both the N and W LEDs with be ON.
Note that the actual circuit interfacing to the wind vane can use the 3.6V supply on the Launchpad board itself. This seems that voltage readings provided in the table on the subsequent page need to be appropriately scaled. As per the table, a 10 kohm resistor will be used in the voltage divider.
As only one wind vane is available for use, test your code using a pot connected between ground and 3.6 V (the supply voltage for your board). The wind vane can be available in 310 for final check-out. Pots, LEDs, and resistors will be provided in 310.