Introduction - If you have any usage issues, please Google them yourself
Software A/D can achieve the accuracy is limited, measuring voltage range is 2-15V, and low-speed (approximately 1 KHz), but only a capacitance and resistance of a temptation, I think you will prawns to the heart. For certain occasions is useful. The principle is the use of 470 K resistor pairs .1 uF capacitor charging, as I use P0.0 detection voltage, When the voltage is lower than 1/3 VCC, P0.0 read into the I/O level to 0, When the charging voltage over 1/3 VCC, P0.0 read into the I/O level to 1. By measuring this process, the time spent, we will be able to judge the input voltage (need conversion). The preparation procedures used to achieve timer 0
Packet : 19854835soft_ad_c.rar filelist
soft_ad.c