is this the right way to do it ?

Hi, I'm planninng on interfacing with a digital potentiometer AD5231 Datasheet and Product Info | Analog Devices

the datasheet says that it needs 24bit messages to set up the pot value.
first 8 bits are for command then it needs 10 bit for the pot value

using shiftOut is it possible to send say 1024 it like this

shift0ut(datapin, clockpin, MSB, commandByte);
shiftOut(datapin, clockpin, MSB, highByte(1024));
shiftOut(datapin, clockpin, MSB, lowByte(1024));

thanks for any advise

E

1024 is an eleven bit number, but otherwise, yes, that looks like the way to go.

opps sorry...I meant 1023 of ourse....

thanks for the answer.

E