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 #187 background image
187
ADC10 with Direct Memory Access (DMA)
The concept of Direct Memory Access (DMA) or Data Transfer Controller (DTC) is usually found in 32-
bit ARM-Cortex-based micros and in some highly advanced DSP microcontrollers. In recent times, a
few new generation 8-bit and 16-bit devices have emerged with DMA hardware feature. The DMA
hardware may look a bit complicated for those who are new to it but it is practically very simple. Just
consider what you have been doing all these times without DMA. Consider an ADC for an example.
Without DMA, the ADC senses its channel(s) and saves sensed data on an ADC result register waiting
to be read and continue the same operation over and over again. This process involves the CPU very
often as sensing/extracting analog data, storing it and starting ADC conversion all needs CPU’s
attention. Thus, the CPU bus is always busy with these engagements. With DMA the process becomes
more automatic and intelligent. The DMA controller automatically transfers AD conversion data to
specified memory location(s) using its separate data bus. In the whole process the CPU is not involved
much. Conversions take place and the conversion results are immediately transferred. Thus, the
process becomes both autonomous and fast.
Please note that the DMA bus is only available for ADC to memory or in other words peripheral to
memory transfers. It cannot be used for other peripherals like USCI, USI, etc. or for memory-memory
transfers. However, it is not a big issue for now.
Code Example
#include <msp430.h>
#include "delay.h"
#include "SW_I2C.h"
#include "PCF8574.h"
#include "lcd.h"
#define no_of_samples 16
unsigned int adc_pointer[no_of_samples];
void GPIO_graceInit(void);
void BCSplus_graceInit(void);
void ADC10_graceInit(void);
void System_graceInit(void);
void WDTplus_graceInit(void);
void lcd_print(unsigned char x_pos, unsigned char y_pos, unsigned int value);
void main(void)
{
unsigned char s = 0;
unsigned int adc_avg = 0;
/* Stop watchdog timer from timing out during initial start-up. */
WDTCTL = WDTPW | WDTHOLD;
/* initialize Config for the MSP430 GPIO */

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