Program for measures the wind direction-vane, Assembly Language

Assignment Help:

You are to create an assembly program for the MSP430 that 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, S, E, and W. If the wind direction is out of the N, only the N LED will 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 will use the 3.6V supply on the

Launchpad board itself. This means that voltage readings provided in the table on the following page need to be appropriately scaled. As per the table, a 10kohm 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 will be available in 310 for final check-out. Pots, LEDs, and resistors will be provided in 310.

Your program must use at least one subroutine. You are free to choose which functionality to place in the subroutine.

Extra Credit:

(1) Correctly measure all 16 directions possible by the vane. Develop some mechanism for visually displaying the added directions.

(2) Store the voltages corresponding to the specific directions as constants in a memory array (see example below). Have your code cycle through this array until a match is found.

ORG 0xD000

DC 0x1234, 0xABCD, ... ;replace w/ calculated voltages

Wind Vane

The wind vane is the most complicated of the three sensors. It has eight switches, each connected to a different resistor. The vane's magnet may close two switches at once, allowing up to 16 different positions to be indicated. An external resistor can be used to form a voltage divider, producing a voltage output that can be measured with an analog to digital converter, as shown below.

The switch and resistor arrangement is shown in the diagram to the right.

Resistance values for all 16 possible positions are given in the table.

Resistance values for positions between those shown in the diagram are the result of two adjacent resistors connected in parallel when the vane's magnet activates two switches simultaneously.

2042_anemometer.png


Related Discussions:- Program for measures the wind direction-vane

Average of odd numbers, write an assembly language program to find average ...

write an assembly language program to find average of odd numbers from an array of 8 bit numbers

8086 program, program to arrange a given set of numbers in descending order...

program to arrange a given set of numbers in descending order

Prepare the assembly code sequence, Problem (a) Prepare the assembly c...

Problem (a) Prepare the assembly code sequence for each of the four styles (accumulator, memory-memory, stack, load/store) of machine for the code fragment: A = B + C;

Solotuon, using 8086 assembly language that interchange upper four bits to ...

using 8086 assembly language that interchange upper four bits to lower four bits. assume that data store in byte memory and it written back to same location. and assume the data as

input and output, Description: LC3 allows input from keyboard and out...

Description: LC3 allows input from keyboard and output to display on the screen. This lab will exercise the input/output capability using LC-3 Assembly language. Procedure

Dijkstra Implementation in Assembly Language x86, I am assigned to implemen...

I am assigned to implement dijkstra algorithm in assembly language. I am not a novice in assembly. I need help implementing it.Kindly if anyone then please.

Mmm development board, Write an account of your findings and produce a repo...

Write an account of your findings and produce a report containing all aspects of the above. Include a step-by-step 'simple User Guide' so that your program can be operated as inten

Flag register-microprocessor, Flag Register : 8086 has a 16-bit flag r...

Flag Register : 8086 has a 16-bit flag register which is divided into 2 parts, viz. (a)machine control flagsand (b)condition code or status flags. The condition code flag regi

Interrupt-microprocessor, Interrupt When the CPU detects an interrupt s...

Interrupt When the CPU detects an interrupt signal, it stops activity of current and jumps to a special routine, known an interrupt handler. This handler then detects why the i

.., Sum of series of 10 numbers and store result in memory location total

Sum of series of 10 numbers and store result in memory location total

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd