main.c
来自「在EASY_ARM 2103上调试通过的DS18B20温度传感器」· C语言 代码 · 共 49 行
C
49 行
/****************************************Copyright (c)**************************************************
** Shandong University ISE School.
** ISE MCU LAB
** http://www.ise.sdu.edu.cn
**
**--------------File Info-------------------------------------------------------------------------------
** File name: main.c
** Last modified Date: 2008-08-22
** Last Version: 2.0
** Descriptions: The main() function example template
**
**------------------------------------------------------------------------------------------------------
** Created by: bailiang
** Created date: 2008-08-21
** Version: 2.0
** Descriptions: The original version
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions: ds18b20 在easyarm串口led显示
**
********************************************************************************************************/
#include "config.h"
#include "Uart.h"
extern uint8 TEMP1;
extern uint8 TEMP0;
extern void gettemper(void);
int main(void)
{
UARTInit();
while(1)
{
gettemper();
UART0SendByte(TEMP1/10+'0');
UART0SendByte(TEMP1%10+'0');
UART0SendByte(TEMP0+'0');
UART0SendStr("\r\n");
}
}
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?