| 数据搜索系统,热门电子元器件搜索 |
|
AN4073 数据表(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4073 数据表(HTML) 9 Page - STMicroelectronics |
|
9 / 32 page ![]() DocID022945 Rev 5 9/32 AN4073 Firmware techniques for improving the conversion accuracy 31 Figure 3. Averaging of N-X ADC sample algorithm Total conversion time = (number of samples * ADC conversion time) + computation time. Computation time = time taken to read the results, sort the N ADC samples, delete the X most dispersed samples, add the rest of the ADC samples together and calculate the average by dividing the total by N-X. Note: Refer to Appendix B for more details about the code source used. MS31177V1 Start Initialize ADC, variables, I/O and select the analog channel to be used, (Buff[N]) Configure the ADC to convert once after each trigger Set the ADC Start of Conversion bit Read the ADC output registers after End of Conversion Add read value to Buff[++] No. of conversions = N? Sort the N ADC sample (sort Buff[N]) End Yes No Delete X/2 sample from the top of Buff[N] And X/2 sample from the bottom of Buff[N] N- _ 2 X -1 () _ 2 X Buff[i] () N - X 1 Average = |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |