书上说可以在一个转换序列依次采样几个通道,我将ATDCTL5中的MULT置一后
为什么我得到的结果都是一样的啊,请问下是不是还有什么关键寄存器要设置呢?
这是英文原文资料:
Multi-Channel Sample Mode — When MULT is 0, the ATD sequence controller samples only from the specified
analog input channel for an entire conversion sequence. The analog channel is selected by channel selection
code (control bits CD/CC/CB/CA located in ATDCTL5). When MULT is 1, the ATD sequence controller samples
across channels. The number of channels sampled is determined by the sequence length value (S8C, S4C, S2C,
S1C). The first analog channel examined is determined by channel selection code (CD, CC, CB, CA control bits);
subsequent channels sampled in the sequence are determined by incrementing the channel selection code or
wrapping around to AN0 (channel 0).
0 Sample only one channel
1 Sample across several channels
大概的意思就是说:多通道采样模式,当MULT为0时,AD转换控制器就只会从特定的通道采样模拟数据,通道号由通道选择代码决定(CD/CC/CB/CA)当MULT 为1时,ATD控制器从多个通道中采样数据,采样的通道个数由序列长度选择位(S8C.S4C.S2C.S1C)决定,其中第一个模拟通道由CD.CC.CB.CA决定,接下来的采样通道由增加的通道选择代码位(S8C.S4C.S2C.S1C)决定。
接下来就是你取数据了,有个FIFO模式和非FIFO 模式,具体的我就不太清楚了,
我用的S12XS128的AD里有个转换控制寄存器0,里面定位了低四位WRAP3\WRAP2\WRAP1\WRAP0. These bits determine the channel for wrap around when doing multi channel conversions。具体如何wrap around 我不太理解,请高手指点
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |