查看: 7319|回复: 5

[S12] 关于XS128的AD问题

[复制链接]

该用户从未签到

2

主题

11

帖子

0

新手上路

Rank: 1

积分
23
最后登录
1970-1-1
发表于 2009-5-16 16:47:57 | 显示全部楼层 |阅读模式
请教:
XS128  没有原来DG128的AD模块使能控制(也就是启动转换用的)ADPU,怎么才能够让AD关掉啊,(但是有时候要使用的)?
我的目的:当我要用AD数据的时候我想开AD然后连续采集256次数据在中断服务程序里面求算术平均值,然后关掉AD,读取返回的均值。
另外:我使用ATDCTL2的ADCIE位来用作开关,怎么总是进不了中断?
即:ATD0CTL2 |=0X02;      //00000010开AD中断使能ASCIE (ATD sequence complete interrupt enable)
      ATD0CTL2 &=0XFD;      //11111101关AD中断使能ASCIE (ATD sequence complete interrupt enable)
谢谢解答.
 
我知道答案 目前已有4人回答
回复

使用道具 举报

该用户从未签到

0

主题

6

帖子

0

新手上路

Rank: 1

积分
2
最后登录
1970-1-1
发表于 2009-5-17 16:39:43 | 显示全部楼层

回复:关于XS128的AD问题

ATD0CTL5=0x00;

该用户从未签到

2

主题

11

帖子

0

新手上路

Rank: 1

积分
23
最后登录
1970-1-1
 楼主| 发表于 2009-5-21 00:27:13 | 显示全部楼层

回复:关于XS128的AD问题

引用第 2 楼 awesss于2009-05-17 08:39:43发表:
ATD0CTL5=0x00;
 

ATD0CTL5我看过了啊。这个控制字是用来选择特殊通道、转换模式、还有是否多通道、模拟输入通道选择的啊,不可以吧?2楼的兄弟???
能够解释一下吗?
datasheet我都看过了,谢谢。
6:SC
Special Channel Conversion Bit—If this bit is set, then special channel conversion can be selected using CD,
CC, CB and CA of ATDCTL5. Table 10-15 lists the coding.
0 Special channel conversions disabled
1 Special channel conversions enabled
5:SCAN
Continuous Conversion Sequence Mode — This bit selects whether conversion sequences are performed
continuously or only once. If external trigger is enabled (ETRIGE=1) setting this bit has no effect, that means
external trigger always starts a single conversion sequence.
0 Single conversion sequence
1 Continuous conversion sequences (scan mode)
4: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
3–0:CD, CC,CB, CA
Analog Input Channel Select Code — These bits select the analog input channel(s) whose signals are
sampled and converted to digital codes. Table 10-15 lists the coding used to select the various analog input
channels.
In the case of single channel conversions (MULT=0), this selection code specifies the channel to be examined.
In the case of multiple channel conversions (MULT=1), this selection code specifies the first channel to be
examined in the conversion sequence. Subsequent channels are determined by incrementing the channel
selection code or wrapping around to AN0 (after converting the channel defined by the Wrap Around Channel
Select Bits WRAP3-0 in ATDCTL0). In case of starting with a channel number higher than the one defined by
WRAP3-0 the first wrap around will be AN15 to AN0.
我都看过了,好像不可以的?

该用户从未签到

0

主题

13

帖子

0

新手上路

Rank: 1

积分
0
最后登录
1970-1-1
发表于 2009-5-27 18:23:59 | 显示全部楼层

RE:关于XS128的AD问题

你好,深圳天凯电子,主要产品电子元器件,IC 芯片,模块。可以长期供货,是个不错的供应商,0755-83653150 QQ 343830715

该用户从未签到

0

主题

1

帖子

0

新手上路

Rank: 1

积分
2
最后登录
1970-1-1
发表于 2009-12-6 08:52:26 | 显示全部楼层

Thks u pour teh sit

Oh. Hi!  :mad: I do not, Harry. How late you are, Harry! he murmured. I am afraid it is not Harry, Mr.Gonna be back soon :cool:

该用户从未签到

0

主题

4

帖子

0

新手上路

Rank: 1

积分
1
最后登录
1970-1-1
发表于 2011-5-13 01:25:20 | 显示全部楼层

回复:关于XS128的AD问题

 你好,我遇到相同的问题,向你请教,我的QQ:1046519743
您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-7-25 06:43 , Processed in 0.089827 second(s), 26 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表