΢²¨EDAÍø£¬¼ûÖ¤Ñз¢¹¤³ÌʦµÄ³É³¤£¡
Ê×Ò³ > Ó²¼þÉè¼Æ > ǶÈëʽÉè¼Æ > stm32ѧϰ֮ʮ

stm32ѧϰ֮ʮ

ʱ¼ä£º12-03 À´Ô´£º»¥ÁªÍø µã»÷£º

ch,FILE *f)
{
USART_SendData(USART1,(unsigned char)ch);
while(!(USART1->SR & USART_FLAG_TXE));
return ch;
}

main.cµÄ´úÂëÈçÏÂ:

/******************** (C) COPYRIGHT 2013 **************************
* ÎļþÃû £ºmain.c
* ÃèÊö £ºÓÃ3.5.0°æ±¾½¨µÄ¹¤³ÌÄ£°å¡£
* ʵÑéƽ̨£ºÒ°»ðSTM32¿ª·¢°å
* ¿â°æ±¾ £ºST3.5.0
*
* ×÷Õß £ºwit_yuan
* ʱ¼ä : 2013Äê4ÔÂ29ÈÕ
* °æ±¾ £ºv1.0
**********************************************************************************/
#include "stm32f10x.h"
#include "add.h"
#include "usart.h"
void delay(__IO uint32_t count);

extern __IO uint16_t ADC_ConvertedValue;

u16 Current_Temp;

/*
* º¯ÊýÃû£ºmain
* ÃèÊö : Ö÷º¯Êý
* ÊäÈë £ºÎÞ
* Êä³ö : ÎÞ
*/
int main(void)
{
Usart_GPIO_Config();
ADC_Configure();

while(1)
{
Current_Temp=(V25-ADC_ConvertedValue)/AVG_SLOPE+25;

//10½øÖÆÏÔʾ
printf("\r\n The current temperature= %3d ¡æ\r\n", Current_Temp);
delay(0x01fffff0);

}
// add your code here ^_^¡£
}
/******************* (C) COPYRIGHT 2013 *****END OF FILE************/
void delay(__IO uint32_t count)
{
for(;count>0;count--);
}

ÐγɵÄЧ¹ûÈçÏ£º

ÉÏһƪ£ºstm32ѧϰ֮ËÄ
ÏÂһƪ£ºstm32¿ØÖÆDS1302

Copyright © 2017-2020 ΢²¨EDAÍø °æȨËùÓÐ

ÍøÕ¾µØͼ

Top