1、/*06-03-31在KEIL中调试发现*/例1:……unsignedlongintb;unsignedintx;x=968;b=100*x;b=96800-65536;例2:……
//最少延时1ms程序voiddelay(unsignedintx)//最小1毫秒{unsignedcharj;while(x–){for(j=0;j125;j++){;}}//16进制->1
voiddelay(unsignedintx){unsignedinta,b;for(a=x;a>0;a–)for(b=30;b>0;b–);}voidad()采集函数{INTCON=
includereg52h>voidTIMED(unsignedintx);main(){unsignedintclac=0xff;while(1){P0=clac;clac–;TIMED(3
includestm32f10xhvoidDelay(unsignedintx);延时voidGPIO_Configuration(void);IO口配置voidUART_Init(void);串口
includestm32f10xhunsignedintTimingDelay;voidDelay(unsignedintx){TimingDelay=x;while(TimingDelay–);}
includestm32f10xhvoidDelay(unsignedintx);unsignedintTimingDelay;intmain(void){SystemInit();配置系统时钟RCC
includestm32f10xhincludestm32f10x_libhvoidDelay(unsignedintx);voidUART_Init(void);intmain(void){whil
在线咨询:
邮箱: kf@86ic.com