新手上路
- 积分
- 40
- 金钱
- 40
- 注册时间
- 2018-12-7
- 在线时间
- 8 小时
|
1金钱
端口初始化如下void LED_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOF, ENABLE);
//GPIOF9,F103õê¼»ˉéèÖÃ
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_8;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOF, &GPIO_InitStructure);
GPIO_SetBits(GPIOF,GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_8);
}
用示波器抓了下图是这样的
|
最佳答案
查看完整内容[请看2#楼]
原因不外就几条
1 没调用到LED_Init
2 外围电路把它拉底了
3 探头接错脚位了
一条一条去排除吧
|