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 #323 background imageLoading...
Page #323 background image
323
unsigned char adc1 = 0;
unsigned char adc2 = 0;
unsigned char adc3 = 0;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
/* 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 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
SW_I2C_init();
LCD_init();
LCD_goto(0, 0);
LCD_putstr("A0:");
LCD_goto(9, 0);
LCD_putstr("A1:");
LCD_goto(0, 1);
LCD_putstr("A2:");
LCD_goto(9, 1);
LCD_putstr("A3:");
while(1)
{
adc0 = PCF8591_read(AOut_enable | Four_Channel_ADC |
Auto_Increment_Disable | AIN0);
lcd_print(4, 0, adc0);
adc1 = PCF8591_read(AOut_enable | Four_Channel_ADC |
Auto_Increment_Disable | AIN1);
lcd_print(13, 0, adc1);
adc2 = PCF8591_read(AOut_enable | Four_Channel_ADC |
Auto_Increment_Disable | AIN2);
lcd_print(4, 1, adc2);
adc3 = PCF8591_read(AOut_enable | Four_Channel_ADC |
Auto_Increment_Disable | AIN3);
lcd_print(13, 1, adc3);
PCF8591_write(AOut_enable, adc0);
delay_ms(400);
};
}
void GPIO_graceInit(void)
{

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