⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 analog.c

📁 一个通过8051来控制8019上网的程序 该程序已经通过并成功用于键盘
💻 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 + -