POWER-ON RESET
Both devices have a power-on reset function to ensure the output is at a known state upon power-up. In the DAC8830 and DAC8831, at power-up, the DAC latch and Input Registers contain all 0s until new data are loaded from the input serial shift register. Therefore, after power-up, the output from pin V OUT of the DAC8830 is 0 V. The output from pin V OUT of the DAC8831 is 0 V in unipolar mode and – V REF in bipolar mode.
However, the serial register of the DAC8830 and DAC8831 is not cleared on power-up, so its contents are undefined. When loading data initially to the device, 16 bits or more should be loaded to prevent erroneous data appearing on the output. If more than 16 bits are loaded, the last 16 are kept; if less than 16 are loaded, bits will remain from the previous word. If the device must be interfaced with data shorter than 16 bits, the data should be padded with 0s at the LSBs.
时序介绍有一句话:The low-to-high transition of CS transfers the contents of the input shift register to the input register...In the DAC8830, the contents of the input register are transferred into the DAC latch immediately when the input
register is loaded, and the DAC output is updated at the same time.意思是说,CS的低到高变化,会把输入移位寄存器的值送到输入寄存器,而输入寄存器的更新会使DAC立即输出相应的电压。
而POWER-ON RESET 这里有一句:However, the serial register of the DAC8830 and DAC8831 is not cleared on power-up, so its contents are undefined.姑且认为这里的serial register就是上述的输入移位寄存器。又联想到STM32上电后,PA4端口(CS)默认的是低电平,当我给他Set High时,DAC就会把输入移位寄存器里未知的内容送入输入寄存器,从而DAC输出一个未知的电压值。
这样理解的话倒是说的通,但是有没有办法避免这个问题?
However, the serial register of the DAC8830 and DAC8831 is not cleared on power-up, so its contents are undefined. When loading data initially to the device, 16 bits or more should be loaded to prevent erroneous data appearing on the output.