#2
zjfzdzc2020-04-30 21:17
|
初学单片机,菜鸟一个,参考网络野火的视频,点亮一个灯,但调整了几次,刷下去后总是不亮,各位帮忙看看问题在哪里?多谢
下面是参照视频做的,
#include"stm32f10x.h"
int main(void)
{
//pd6设置时钟
*(unsigned int *)0x40021018 |= (((1)<<5));
//pd6设置输出模式
*(unsigned int *)0x40011400 |= ((1)<<(4*6));
//打开PD6 端口
*(unsigned int *)0x4001140C |= (1<<6) ;
}