![]() |
LPCOpen Platform for LPC18XX/43XX microcontrollers
18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
|
Data Structures | |
| struct | LPC_DAC_T |
| DAC register block structure. More... | |
Macros | |
| #define | DAC_VALUE(n) ((uint32_t) ((n & 0x3FF) << 6)) |
| #define | DAC_BIAS_EN ((uint32_t) (1 << 16)) |
| #define | DAC_CCNT_VALUE(n) ((uint32_t) (n & 0xffff)) |
| #define | DAC_DBLBUF_ENA ((uint32_t) (1 << 1)) |
| #define | DAC_CNT_ENA ((uint32_t) (1 << 2)) |
| #define | DAC_DMA_ENA ((uint32_t) (1 << 3)) |
| #define | DAC_DACCTRL_MASK ((uint32_t) (0x0F)) |
Enumerations | |
| enum | DAC_CURRENT_OPT_T { DAC_MAX_UPDATE_RATE_1MHz = 0, DAC_MAX_UPDATE_RATE_400kHz } |
| Current option in DAC configuration option. More... | |
Functions | |
| void | Chip_DAC_Init (LPC_DAC_T *pDAC) |
| Initial DAC configuration. More... | |
| void | Chip_DAC_DeInit (LPC_DAC_T *pDAC) |
| Shutdown DAC. More... | |
| void | Chip_DAC_UpdateValue (LPC_DAC_T *pDAC, uint32_t dac_value) |
| Update value to DAC buffer. More... | |
| void | Chip_DAC_SetBias (LPC_DAC_T *pDAC, uint32_t bias) |
| Set maximum update rate for DAC. More... | |
| STATIC INLINE void | Chip_DAC_ConfigDAConverterControl (LPC_DAC_T *pDAC, uint32_t dacFlags) |
| Enables the DMA operation and controls DMA timer. More... | |
| STATIC INLINE void | Chip_DAC_SetDMATimeOut (LPC_DAC_T *pDAC, uint32_t time_out) |
| Set reload value for interrupt/DMA counter. More... | |
| STATIC INLINE IntStatus | Chip_DAC_GetIntStatus (LPC_DAC_T *pDAC) |
| Get status for interrupt/DMA time out. More... | |
| #define DAC_BIAS_EN ((uint32_t) (1 << 16)) |
If this bit = 0: The settling time of the DAC is 1 microsecond max, and the maximum current is 700 microAmpere If this bit = 1: The settling time of the DAC is 2.5 microsecond and the maximum current is 350 microAmpere
Definition at line 62 of file dac_18xx_43xx.h.
| #define DAC_CCNT_VALUE | ( | n | ) | ((uint32_t) (n & 0xffff)) |
Value to reload interrupt DMA counter
Definition at line 64 of file dac_18xx_43xx.h.
| #define DAC_CNT_ENA ((uint32_t) (1 << 2)) |
DCAR Time out count enable
Definition at line 69 of file dac_18xx_43xx.h.
| #define DAC_DACCTRL_MASK ((uint32_t) (0x0F)) |
DCAR DACCTRL mask bit
Definition at line 73 of file dac_18xx_43xx.h.
| #define DAC_DBLBUF_ENA ((uint32_t) (1 << 1)) |
DCAR double buffering
Definition at line 67 of file dac_18xx_43xx.h.
| #define DAC_DMA_ENA ((uint32_t) (1 << 3)) |
DCAR DMA access
Definition at line 71 of file dac_18xx_43xx.h.
| #define DAC_VALUE | ( | n | ) | ((uint32_t) ((n & 0x3FF) << 6)) |
After the selected settling time after this field is written with a new VALUE, the voltage on the AOUT pin (with respect to VSSA) is VALUE/1024 ? VREF
Definition at line 56 of file dac_18xx_43xx.h.
| enum DAC_CURRENT_OPT_T |
Current option in DAC configuration option.
Definition at line 78 of file dac_18xx_43xx.h.
Enables the DMA operation and controls DMA timer.
| pDAC | : pointer to LPC_DAC_T |
| dacFlags | : An Or'ed value of the following DAC values:
|
Definition at line 129 of file dac_18xx_43xx.h.
| void Chip_DAC_DeInit | ( | LPC_DAC_T * | pDAC | ) |
Shutdown DAC.
| pDAC | : pointer to LPC_DAC_T |
Definition at line 60 of file dac_18xx_43xx.c.
Get status for interrupt/DMA time out.
| pDAC | : pointer to LPC_DAC_T |
Definition at line 153 of file dac_18xx_43xx.h.
| void Chip_DAC_Init | ( | LPC_DAC_T * | pDAC | ) |
Initial DAC configuration.
- Maximum current is 700 uA
- Value to AOUT is 0
| pDAC | : pointer to LPC_DAC_T |
Definition at line 51 of file dac_18xx_43xx.c.
| void Chip_DAC_SetBias | ( | LPC_DAC_T * | pDAC, |
| uint32_t | bias | ||
| ) |
Set maximum update rate for DAC.
| pDAC | : pointer to LPC_DAC_T |
| bias | : Using Bias value, should be:
|
Definition at line 77 of file dac_18xx_43xx.c.
Set reload value for interrupt/DMA counter.
| pDAC | : pointer to LPC_DAC_T |
| time_out | : time out to reload for interrupt/DMA counter |
Definition at line 143 of file dac_18xx_43xx.h.
| void Chip_DAC_UpdateValue | ( | LPC_DAC_T * | pDAC, |
| uint32_t | dac_value | ||
| ) |
Update value to DAC buffer.
| pDAC | : pointer to LPC_DAC_T |
| dac_value | : value 10 bit to be converted to output |
Definition at line 66 of file dac_18xx_43xx.c.
1.8.3.1