O'Reilly logo

Microcontroller Programming and Interfacing Texas Instruments MSP430 by Daniel J. Pack, Steven F. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

336 10. SYSTEM LEVEL DESIGN
putchar(’W’); //LCD displays: WSW
putchar(’S’);
putchar(’W’);
P4OUT = 0x0b; //illuminate LED 11 (B)
}
//W - LED12 (C)
if((wind_dir_float > 2.372)||(wind_dir_float <= 2.578))
{
putcommand(0x14); //move cursor to right
putchar(’W’); //LCD displays: W
P4OUT = 0x0c; //illuminate LED 12 (C)
}
//WNW - LED13 (D)
if((wind_dir_float > 2.578)||(wind_dir_float <= 2.784))
{
putcommand(0x14); //move cursor to right
putchar(’W’); //LCD displays: WNW
putchar(’N’);
putchar(’W’);
P4OUT = 0x0d; //illuminate LED 13 (D)
}
//NW - LED14 (E)
if((wind_dir_float > 2.784)||(wind_dir_float <= 2.991))
{
putcommand(0x14); //move cursor to right
putchar(’N’); //LCD displays: NW
putchar(’W’);
P4OUT = 0x0e; //illuminate LED 14 (E)
}
//NNW - LED15(F)
if((wind_dir_float > 2.991)||(wind_dir_float < 3.197))
{
putcommand(0x14); //move cursor to right
putchar(’N’); //LCD displays: NNW
putchar(’N’);

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required