初级会员

- 积分
- 76
- 金钱
- 76
- 注册时间
- 2016-10-26
- 在线时间
- 13 小时
|

楼主 |
发表于 2016-10-31 14:45:27
|
显示全部楼层
我就烧写了那个跑马灯的程序啊,我也没调用别的东西啊,下面是我的主程序,因为我的LED灯引脚连接的是PE12和PE15,所以我只改了引脚
int main(void)
{
delay_init(168); //3õê¼»ˉÑóê±oˉêy
LED_Init(); //3õê¼»ˉLED¶Ë¿ú
/**ÏÂÃæêÇí¨1yÖ±½ó2ù×÷¿aoˉêyμÄ·½ê½êμÏÖIO¿ØÖÆ**/
while(1)
{
GPIO_ResetBits(GPIOE,GPIO_Pin_12); //LED0¶Ôó|òy½ÅGPIOF.9à-μí£¬áá μèí¬LED0=0;
GPIO_SetBits(GPIOE,GPIO_Pin_15); //LED1¶Ôó|òy½ÅGPIOF.10à-¸ß£¬Ãe μèí¬LED1=1;
delay_ms(500); //Ñóê±300ms
GPIO_SetBits(GPIOE,GPIO_Pin_12); //LED0¶Ôó|òy½ÅGPIOF.0à-¸ß£¬Ãe μèí¬LED0=1;
GPIO_ResetBits(GPIOE,GPIO_Pin_15); //LED1¶Ôó|òy½ÅGPIOF.10à-μí£¬áá μèí¬LED1=0;
delay_ms(500); //Ñóê±300ms
}
} |
|