help with dac 8552

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times

help with dac 8552

Post 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.
Attachments
dac8552.pdf
(1.03 MiB) Downloaded 234 times

RLOPES780
Posts: 119
Joined: Tue Apr 07, 2015 11:01 am
Been thanked: 3 times

Re: help with dac 8552

Post by RLOPES780 »

I would just like an example code to do this

Thankful;

Ricardo.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: help with dac 8552

Post by Benj »

Hi Ricardo,

Here is a very basic example.
DAC_Example.fcfx
(7.72 KiB) Downloaded 240 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.

Post Reply