Maker Pro
Maker Pro

LPC11C24 MCU to control DAC8718

Hello,

I am trying to use an LPC11C24 microcontroller to send digital values to a DAC8718 (http://www.ti.com.cn/cn/lit/ds/symlink/dac8718.pdf) to convert to an analog voltage value. I am attempting to communicate via SPI and I am using mbed.h with the SPI.h capability to send an arbitrary stream of bits to the DAC. However I am not seeing any output on the DAC output. I am communicating via a PCAN-USB dongle. Here is my code:

#include "mbed.h"

CAN can(NC, NC);
DigitalOut chipsel(P2_0);


int main() {
// Init CAN
can.frequency(125000);
// Main loop
SPI device(P2_3, P2_2, P2_1);
device.frequency(1000000);
device.format(16,2); // 16 bits
chipsel = 0;
chipsel = 1;
float response;

while(1) {
response = device.write(0xFFFF);
}

}

What am I doing wrong and what should I do to record output on the DAC?

Thanks, I appreciate this very much.

Drake
 
Start by looking at the SPI interface.
I don't know the NXP microcontrollers, but sending 0xffff to see if data is being sent is not a good idea as it will just hold the data line high. It will be better to send something like 0xc134 that will send 0's and 1' causing the data line up and down on the scope.

Do you see the clock signal? If not you are most likely not setting up correctly.

Have a look at this very simple example:
http://www.nxp.com/documents/application_note/AN10369.pdf
 
Top