初级会员

- 积分
- 143
- 金钱
- 143
- 注册时间
- 2016-3-11
- 在线时间
- 54 小时
|

楼主 |
发表于 2016-5-31 21:40:01
|
显示全部楼层
现在的情况是
端口定义:
#define TE PCout(8)
#define D1 PCout(4)
#define D2 PCout(5)
#define D3 PCout(9)
#define D4 PCout(10)
IO口配置:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_10|GPIO_Pin_9;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;//普通输出模式
GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;//推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;//100MHz
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;//下拉
GPIO_Init(GPIOC, &GPIO_InitStructure);//初始化
main函数中使用:
case 104:str="1";
GPIO_ResetBits(GPIOC,GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_9|GPIO_Pin_8);
GPIO_SetBits(GPIOC,GPIO_Pin_10);break;
TE、D3、D4电压一直都是3.3V左右,无变化,D1、D2设置为高电平时电压为1.2V左右,设置为低电平时电压为0V
我的连接实物图:
怎么破??
|
|