Page 1 of 1

help with dac 8552

Posted: Tue May 15, 2018 7:40 pm
by RLOPES780
I want to use the 16 bit dac8552.
Its serial input is 24 bits 8 commands + 16 data.
I would like a sample writing code by sending these 24 bits.
Because the first byte is command and the other 16 are data.
So the data range from 0 to 65535. My question is also how do I turn this into 2 bytes. Second byte data set and third byte data set?

Thankful;

Ricardo.

Re: help with dac 8552

Posted: Wed May 16, 2018 2:33 pm
by RLOPES780
I would just like an example code to do this

Thankful;

Ricardo.

Re: help with dac 8552

Posted: Wed May 16, 2018 2:40 pm
by Benj
Hi Ricardo,

Here is a very basic example.
DAC_Example.fcfx
(7.72 KiB) Downloaded 285 times
I've created a macro called Send Command with two parameters, an 8-bit command and a 16-bit data value.

This is then split up into three bytes and sent to the SendByte macro. This could be replaced with a SPI macro call or a bit banged routine to output the data a bit at a time.