在线时间5 小时
UID94779
注册时间2007-8-7
NXP金币0
该用户从未签到
注册会员

- 积分
- 92
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2014-7-25 13:27:24
|
显示全部楼层
回复:ADC_INIT_CHANNEL_STRUCT 疑问
仔细看了一下,好像是进行多次采样后,计算平均值的。读取的结果是多次平均后的值。
typedef struct adc_init_channel_struct {
uint_16 source; /* one of ADC_SOURCE_* definitions defined in .//adc_.h - CPU specific header file */
uint_16 flags; /* initialization flags, combination of ADC_CHANNEL_ possibilities above */
uint_32 number_samples; /* the number of samples needed to trigger event */
uint_32 time_offset; /* the time offset applied once after measurement on given channel is started, in microseconds */
uint_32 time_period; /* the time slot between two samples in microseconds */
/* NOTE: the following item is not used in the current ADC driver and is prepared to be used in the future */
uint_32 range; /* the range of result sample(s), NOT USED NOW */
/* Note #1: using ADC_CHANNEL_ACCUMULATE, you can achieve finer resolution than specified in ADC */
/* Note #2: The result of ADC driver always fits to the range specified here */
/* Note #3: if range is too low, then you lose LSbits */
/* Note #4: if range is too high, then you get LSbits cleared */
/* Note #5: range can be only a number 2^N (in C language: 1 |
|