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.
help with dac 8552
Moderator: Benj
- 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
Hi Ricardo,
Here is a very basic example.
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.
Here is a very basic example.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel