RTEMS: Working with DACC

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Working with DACC
Board Support Packages » ARM » Atmel/Microchip SAM E70, S70, V70 and V71 » Contributed Code

The DACC driver provides the interface to configure and use the DACC peripheral.
The DACC(Digital-to-Analog Converter Controller) converts digital code to analog output. The data to be converted are sent in a common register for all channels. It offers up to 2 analog outputs.The output voltage ranges from (1/6)ADVREF to (5/6)ADVREF.

To Enable a DACC conversion,the user has to follow these few steps:

- Select an appropriate reference voltage on ADVREF
- Configure the DACC according to its requirements and special needs, which could be broken down into several parts:
  1. Enable DACC in free running mode by clearing TRGEN in DACC_MR;
  2. Configure Refresh Period through setting REFRESH fields in DACC_MR; The refresh mechanism is used to protect the output analog value from decreasing.
  3. Enable channels and write digital code to DACC_CDR,in free running mode, the conversion is started right after at least one channel is enabled and data is written .

For more accurate information, please look at the DACC section of the Datasheet.

Related files :
dac_dma.c
dac_dma.h