Hello, I'm Nikolai Ehrhardt from Germany,
I got problems with the timing of the AD5686,
I'm giving a falling flank on the Sync line, then the ATmega168 starts to transmit the dataword via USART in MSPIM beginning with 0011 for LDAC independant commands. But the DAC does not receive or work with the data. The Outputs keep low.
Greets & Thanks
I got it now. In my eyes the timing diagramm is not true. the sync flank has to come before the cycle starts.
Following code works, I saw more people having problems, that weren't solved:
//for (int i; i <= 5; i++) _delay_us(1);
USART_Transmit_3byte (0b00110001, 0b10100001, 0b10000001); // this is a function that does 3 transmits in a //row, nothing special.
while ( !( UCSR0A & (1<<UDRE0)) );
for (int i; i <= 35; i++) _delay_us(1);
PORTC ^= (1<<PC3);
I'm using ATmega168 with MSPIM a cycle of 8Mhz and a baud of 250000
I'm moving this to the Precision DAC community. Someone there should be able to answer your question.