EasyManua.ls 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 #188 background imageLoading...
Page #188 background image
188
GPIO_graceInit();
/* initialize Config for the MSP430 2xx family clock systems (BCS) */
BCSplus_graceInit();
/* initialize Config for the MSP430 10-bit Analog to Digital Converter (ADC)
*/
ADC10_graceInit();
/* initialize Config for the MSP430 System Registers */
System_graceInit();
/* initialize Config for the MSP430 WDT+ */
WDTplus_graceInit();
LCD_init();
LCD_clear_home();
LCD_goto(0, 0);
LCD_putstr("MSP430 ADC + DMA:");
LCD_goto(0, 1);
LCD_putstr("A1:");
while(1)
{
adc_avg = 0;
P1OUT |= BIT0;
ADC10CTL0 &= ~ENC;
while (ADC10CTL1 & BUSY);
ADC10CTL0 |= (ENC | ADC10SC);
for(s = 0; s < no_of_samples; s++)
{
adc_avg += adc_pointer[s];
}
adc_avg = (adc_avg / no_of_samples);
lcd_print(12, 1, adc_avg);
delay_ms(100);
P1OUT &= ~BIT0;
delay_ms(100);
};
}
void GPIO_graceInit(void)
{
/* USER CODE START (section: GPIO_graceInit_prologue) */
/* User initialization code */
/* USER CODE END (section: GPIO_graceInit_prologue) */
/* Port 1 Output Register */
P1OUT = 0;
/* Port 1 Direction Register */
P1DIR = BIT0;

Table of Contents

Other manuals for Texas Instruments MSP430

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
Program Memory TypeFlash
Clock SpeedUp to 25 MHz (depending on the specific device)
Flash MemoryUp to 512 KB (depending on the specific device)
RAMUp to 66 KB (depending on the specific device)
Operating Voltage1.8V - 3.6V (depending on the specific device)
ADC10-bit or 12-bit SAR ADC
Communication InterfacesUART, SPI, I2C, USB
DMAYes (depending on the specific device)
Operating Temperature-40°C to +85°C
Architecture16-bit RISC
Low Power ModesMultiple (LPM0 to LPM4)

Related product manuals