新手入门
- 积分
- 31
- 金钱
- 31
- 注册时间
- 2015-6-20
- 在线时间
- 0 小时
|
5金钱
int main(void)
{
delay_init(168);
LED_Init();
//延时300ms
GPIO_ResetBits(GPIOC,GPIO_Pin_11);
}
void LED_Init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE);//使能GPIOF时钟
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;//普通输出模式
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;//推挽输出
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;//100MHz
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;//下拉
GPIO_Init(GPIOE, &GPIO_InitStructure);//初始化
GPIO_ResetBits(GPIOC,GPIO_Pin_11);
问题:为什么PC11电压不降低 还是3.3V?
|
最佳答案
查看完整内容[请看2#楼]
GPIO_Init(GPIOE, &GPIO_InitStructure);//初始化
这一句是初始化E,不是C
|