This content is originally created by EEWORLD forum user tiankai001. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source. Msp430 MCU Development Record (14) Phenomenon: This time, when my colleague was debugging AD conversion, he found that the collected AD conversion value was unstable, and the collected voltage value was high and low. After checking the circuit, no problem was found, and the voltage of the sampling circuit was very stable. Test: The circuit used in the product he is making now is the same as the circuit of the product I made before, and the program also adds some functions based on my program. AD conversion uses my previous program. I asked him if he changed the AD conversion, and he said he changed some register bit configurations. I checked his modified AD conversion program and found that the main register configurations were basically unchanged. The only change was the configuration of the sampling and holding time. The sampling and holding time he chose was very short, 8 clock cycles. I previously chose a sampling and holding time of 64 clock cycles. So here lies the problem. The sampling and holding time is too short, resulting in unstable voltage values. Verification: Appropriately increase the sampling and holding time. As the sampling and holding time increases, the collected voltage value becomes more and more stable. However, the sampling and holding time cannot be too long. Too long will affect the working efficiency of the microcontroller and increase power consumption. Remarks: If the sampling and holding time in AD conversion is too short, the collected voltage value will be unstable and have large errors.
|