![]() |
LPCOpen Platform
v1.03
LPCOpen Platform for NXP LPC Microcontrollers
|
Example description
This example shows how to use DAC peripheral with 3 modes: POLLING mode, INTERRUPT mode or DMA mode.
DAC will be initialized with maximum current is 700uA. This allows a maximum update rate of 1Mhz DAC updated values have range from 0 to 0x3FF. So AOUT output voltage will change from: Vss to VDD. This example configures pin P4_4 as analog function for DAC output through ENAIO2 register. Run and observe AOUT signal by oscilloscope.
Use UART to monitor this demo.
Special connection requirements
Build procedures:
LPC18xx/43xx example quickstart for Keil uVision4
LPC18xx/43xx example quickstart for IAR EWARM
LPC18xx/43xx example quickstart for Code Red Xpresso
Supported boards and board setup:
Hitex 1850 evaluation boards
Hitex 4350 evaluation boards
Keil 1857 evaluation boards
Keil 4357 evaluation boards
Submitting LPCOpen issues:
Community support for LPCOpen
Macros | |
| #define | DATA_SIZE 0x400 |
Functions | |
| static void | App_DMA_Test (void) |
| static void | App_Interrupt_Test (void) |
| static void | App_Polling_Test (void) |
| void | DAC_IRQHandler (void) |
| DAC interrupt handler sub-routine. | |
| void | DMA_IRQHandler (void) |
| DMA interrupt handler sub-routine. | |
| int | main (void) |
| Main routine for DAC example. | |
Variables | |
| static char | WelcomeMenu [] |
| static char | SelectMenu [] |
| static volatile uint8_t | channelTC |
| static volatile uint8_t | dmaChannelNum |
| static volatile uint8_t | DAC_Interrupt_Done_Flag |
| static volatile uint8_t | Interrupt_Continue_Flag |
| uint32_t | DMAbuffer |
| void DAC_IRQHandler | ( | void | ) |
| void DMA_IRQHandler | ( | void | ) |
| int main | ( | void | ) |
|
static |