stm32ѧϰ֮ʮ
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--);
}
ÐγɵÄЧ¹ûÈçÏ£º
stm32ADGPIOζȴ«¸ÐÆ÷ Ïà¹ØÎÄÕ£º
- Windows CE ½ø³Ì¡¢Ï̺߳ÍÄÚ´æ¹ÜÀí(11-09)
- RedHatLinuxÐÂÊÖÈëÃŽ̳Ì(5)(11-12)
- uClinux½éÉÜ(11-09)
- openwebmailV1.60°²×°½Ìѧ(11-12)
- LinuxǶÈëʽϵͳ¿ª·¢Æ½Ì¨Ñ¡ÐÍ̽ÌÖ(11-09)
- Windows CE ½ø³Ì¡¢Ï̺߳ÍÄÚ´æ¹ÜÀí(¶þ)(11-09)