利用已经建立的工程模板,在Keil for ARM V5中编写代码,实现如下功能:配置相应的GPIO口为通用输出口,让数码管循环显示00~FF。
代码:
main:
#include "stm32f10x.h"
#include "delay.h"
u16 table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
u16 temp,ge,shi,i;
int main()
{
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
GPIO_InitStructure.GPIO_Speed = GPIO_