Hi Galfonz,
I'm using a DAC34H84 of Texas instruments.
The write spi function does not have any problem.
{0x00,0x01,0x8C} ===> 0x00 is the instruction byte (w+adress register); 0x01 is the MSB of the 16 bits of data and 0x8C is the LSB.
So look only this function
void read_dac84h84_spi(){
alt_u8 adress=0x04;
alt_u8 rdata[2];
alt_avalon_spi_command(DAC34_SPI_BASE,0,1,(0x10+ad ress),2,rdata,NULL); arg0=master spi id, arg1= slave spi id, arg2=write lentgh,arg3=write data pointer,arg4=read lentgh,arg5=read data pointer,arg6=flags
printf("Register %d : %X%X\n",adress,rdata);//
return;}
Best regards