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

Flowchart, ALP to preform of two 16-bit numbers in register addressing mode...

ALP to preform of two 16-bit numbers in register addressing mode

Program to add 8-bit series numbers-assembly language, Program: Write a pr...

Program: Write a program to perform addition of a series of 8-bit numbers. The series have 100 (numbers). Solution : In the first program, we have been implemented the add

8086, Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to inv...

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of ax register

Minecraft/Terminal issues, I am running a small minecraft server off of my ...

I am running a small minecraft server off of my old mac mini, and am having a big issue. My computer isn''t very good, and even just running this server is an issue. I use a comma

Mlil-arithmetic instruction-microprocessor, MLIL: Unsigned Multiplication ...

MLIL: Unsigned Multiplication Byte or Word: This instruction multiplies an unsigned byte or word by the contents of the AL. The unsigned byte or word can be in any one of the gene

Assembly help, use">http://www.raritanval.edu/uploadedFiles/faculty/cs/full...

use">http://www.raritanval.edu/uploadedFiles/faculty/cs/full-time/Brower/CISY256/2013Spring/CISY256%20Assembly%20Project.pdf use microsoft visual 2010 and http://www.asmirvine.c

The pentium pro-micro processor, The Pentium Pro    Introduced in the ...

The Pentium Pro    Introduced in the year 1995, the Pentium Pro reflected  still  more  design  breakthroughs.  The Pentium Pro may process 3 instructions in a single clock cy

8086 assembly language, write and run a programme using 8086 assembly langu...

write and run a programme using 8086 assembly language that interchange the lower four bits of AL registered with upper four bits.

Programming with an assembler-microprocessor, Programming with an assembler...

Programming with an assembler The procedure of hand-coding 8086 programs is somewhat tiresome; hence generally a programmer may find it hard to get a correct listing of the mac

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