adc通道和GPIO口的对应关系???

[复制链接]
4634|2
 楼主| jackbao 发表于 2008-5-27 12:51 | 显示全部楼层 |阅读模式
看下面的的代码
  /* Configure PC.00, PC.01 and PC.04 (ADC Channel10, Channel11 and Channel14)
   as analog input -----------------------------------------------------------*/
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_4;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOC, &GPIO_InitStructure);

  /* Configure PA.04 (ADC Channel4) as analog input --------------------------*/
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
  GPIO_Init(GPIOA, &GPIO_InitStructure);
上面的语句表明 channl10 11 14 分别对映pc0.0 0.1 0.4
那么adc通道1--17 是怎么和gpio对应的呢
  比如 我用通道9 它对应哪些gpio
香水城 发表于 2008-5-27 22:26 | 显示全部楼层

请看STM32的数据手册中关于管脚分布的列表

lyh2008 发表于 2008-5-30 08:37 | 显示全部楼层

看原理图

资料跟原理图结合起来看比较直观
您需要登录后才可以回帖 登录 | 注册

本版积分规则

92

主题

260

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部