STM32F103C6 点亮一个LED灯,Proteus 8.9仿真_AD,Allegro,pads,PCB设计,电源模块,硬件,stm32,嵌入式,单片机,小北设计 Allegro,pads,PCB电路板设计,硬件及芯片资料分享—小北设计

STM32F103C6 点亮一个LED灯,Proteus 8.9仿真

STM32 by AD,Allegro,pads,PCB设计,电源模块,硬件,stm32,嵌入式,单片机,小北设计

//STM32F103C6 点亮一个LED灯,Proteus 8.9仿真 

//通过网盘分享的文件:点亮LED
//链接: https://pan.baidu.com/s/1IpPuLO27AHtfCOKx_bjGqA 提取码: pbbs
#include "stm32f10x.h"                  // Device header

int main(void)
{
//语句显然定义了一个GPIO_InitTypeDef类型的变量,名为GPIO_InitStructure 的结构体
GPIO_InitTypeDef  GPIO_InitStructure;
///PORTB时钟使能
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);
// 配置结构体GPIO_InitStructure
GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP; // 设置端口模式为推挽输出
GPIO_InitStructure.GPIO_Pin=GPIO_Pin_13; // 设置GPIO端口号为13
GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;  // 设置输出速率为50MHz

GPIO_Init (GPIOB,&GPIO_InitStructure); // 初始化
// GPIO_SetBits(GPIOB,GPIO_Pin_13);  // 输出高电平    点亮PB13口LED灯
   GPIO_ResetBits(GPIOB,GPIO_Pin_13); ///输出低电平
while(1)
{
}

}

STM32F103C6 点亮一个LED灯,Proteus 8.9仿真

STM32F103C6 点亮一个LED灯,Proteus 8.9仿真

    Message:

    Name:
    Email:
    Content:
PgUP ...
Allegro,pads,PCB电路板设计,电源模块件及stm32,嵌入式,单片机资料分享—小北设计