Forum Discussion
Altera_Forum
Honored Contributor
10 years agoNios SPI read
Hi everybody, I'm using the alt_avalon_spi_command Altera function to write on a DAC and i have problem when i tried to read what i have wrote before. The DAC requiert 1 instruction byte (r/w+7 a...
Altera_Forum
Honored Contributor
10 years agoTry: alt_avalon_spi_command(DAC34_SPI_BASE,0,1,(0x80+adress),2,rdata,NULL)
The datasheet for the DAC, Table 1. Instruction Byte of the Serial Interface says: Bit7: R/W Identifies the following data transfer cycle as a read or write operation. A high indicates a read operation from DAC34H84 and a low indicates a write operation to DAC34H84.