Trying to load a DAC using Pascal's SPI library. Using WinAVR and a ATmega32.
. . .
DAC_SELECT(); // my enable line to load the DAC
. . .
Problem . . . unless I enable the SPI interrupt I can't get it to send out ANY data.
If I enable the SPI interrupt it will send out one byte skip over the next spiSendByte() and execute the DAC_SELECT() statement. (Global interrupts are enabled). N.B. the data (value) is actually sent out starting at the same time as the DAC_SELECT line goes high. DAC_SELECT should be enabled AFTER the all the data has been sent out. So, the DAC never "sees" this 2nd byte!
His code spi code appears to be able to send multiple bytes, in that there is a spiTransferComplete flag that manages the whole operation.
I suspect there is something fundamental I am not doing correctly as I also have problems running his timer functions without interrupts.
Normally all most of my S/W problems are with interrupt routines, but now it seems the other way!
Really appreciate it if someone could suggest where I am going wrong.