DAC output

Questions on other types of hardware and getting it talking to the ARM CPU
Post Reply
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

DAC output

Post by YahooArchive »

The LPC2138 of the ARMweb and the LPC1756 of the SuperPRO support a single 10
bit DAC.

(these details in the User manual for the repsective CPU)

First the pin select register has to be programmed for AOUT

in LPC2138
#define PINSEL1 *&HE002C004
PINSEL1 = (PINSEL1 and &HFFF3FFFF) or &H40000

in LPC1756
#define PINSEL1 *&H4002C004
PINSEL1 = (PINSEL1 and &HFFCFFFFF) or &H200000

Then you can write to the DAC register

#define DACR *&HE006C000 ' for 2138
#define DACR *&H4008C000 ' for 1756

DACR = value << 6

This will provide 700 uA of current and rates up to 1 Msample

In addition the LPC1756 has support for DMA and timer based loading.

Post Reply