EasyManuals Logo

Texas Instruments MSP430 User Manual

Texas Instruments MSP430
413 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #298 background imageLoading...
Page #298 background image
298
void main(void)
{
unsigned int LX = 0x0000;
unsigned int tmp = 0x0000;
/* Stop watchdog timer from timing out during initial start-up. */
WDTCTL = WDTPW | WDTHOLD;
/* initialize Config for the MSP430 GPIO */
GPIO_graceInit();
/* initialize Config for the MSP430 2xx family clock systems (BCS) */
BCSplus_graceInit();
/* initialize Config for the MSP430 USCI_B0 */
USCI_B0_graceInit();
/* initialize Config for the MSP430 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
BH1750_init();
LCD_init();
LCD_clear_home();
LCD_goto(0, 0);
LCD_putstr("MSP430G USCI I2C");
LCD_goto(0, 1);
LCD_putstr("Lux:");
while(1)
{
tmp = get_lux_value(cont_H_res_mode1, 20);
if(tmp > 10)
{
LX = tmp;
}
else
{
LX = get_lux_value(cont_H_res_mode1, 140);
}
lcd_print(11, 1, LX);
delay_ms(200);
}
}
void GPIO_graceInit(void)
{
/* USER CODE START (section: GPIO_graceInit_prologue) */
/* User initialization code */

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals