Solved! Go to Solution.
I found the problem.
There was an insufficient voltage on the board of the "SPI 12bit DAC" and the debugger work so slow that I couldn't see any change in the transmit register.
With an oscilloscope I tested that the SPI on the evaluation board work correctly.
Thanks to all.
I found the problem.
There was an insufficient voltage on the board of the "SPI 12bit DAC" and the debugger work so slow that I couldn't see any change in the transmit register.
With an oscilloscope I tested that the SPI on the evaluation board work correctly.
Thanks to all.
My SPI Bean is configured to use polling-drive.
The DAC need a signal (work low) to allow the conversion of the data, so I use a general purpose bit to enable the conversion:
Bit1_PutVal(0); (I also tried to set it to 1 before the SendChar and put it low after, but without results)
In the datasheet of the DAC:
Data Hold time (Min) : 80 ns
Clock Pulse Width Hight (Min) : 90 ns
Clock Pulse Width Low (Min) : 120 ns
Load Pulse Width (Min) : 120 ns
LSB Clock Into Input Register
to load DAC Register Time (Min) : 0 ns
now The SPI bean is configured to use 0,267 Micro s
I also tried to use others clock configuration without good results