📄 analog.c
字号:
//-----------------------------------------------------------------------------
// Net ANALOG.C
//
// This module handles the analog inputs which are external temperature
// sensor, the on-chip temperature sensor, and operating voltage.
//-----------------------------------------------------------------------------
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <reg89C58.h>
#include "net.h"
#include "analog.h"
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
extern char xdata text[];
UINT idata cpu_temperature, air_temperature, cpu_voltage;
UCHAR idata mux_select;
/*********TLC549子程序***********************/
unsigned char ad(void)
{
return 2500;
}
void read_analog_inputs(void)
{
cpu_temperature=2500;
air_temperature=(uint)ad()*19;
cpu_voltage=50;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -