4 years, 7 months ago.

What kind of value has to be in spi.write ?

I want to sset a voltage to AD5668 and i wanted to know if we could write an integer between 0 and 65535 in spi.write() or does it have to be an hexadecimal ?

As long as you have initialized SPI as 16-bit format then yes, you can do this.

posted by Bill Bellis 13 Mar 2017

1 Answer

4 years, 7 months ago.

Hexadecimal, binary or integer representation are all just different ways of providing the same value.

Ok so it is possible for me to do so ?

int value;
printf("which value ? ");
scanf("%d",&value);
spi.write(value); ?
posted by Yann De Baudus 13 Mar 2017