登录
首页 » c » PIC8单片机ADC应用

PIC8单片机ADC应用

于 2022-01-25 发布 文件大小:2.45 kB
0 113
下载积分: 2 下载次数: 1

代码说明:

#include volatile unsigned char adresult; void ADC_Sample(unsigned char adch); void DelayXms(unsigned char x); #define _DEBUG //调试程序用 /********************************************************** 函数名称:AD_Sample 函数功能:AD检测 入口参数:adch - 检测通道 出口参数:无  备    注:采样通道需自行设置为模拟口      采样10次,取中间八次的平均值为采样结果存于adresult中 **********************************************************/ void ADC_Sample(unsigned char adch) { static unsigned int adsum = 0; static unsigned char admin = 0,admax = 0; static unsigned char adtimes = 0; ADCON1 = 0; //左对齐 ADCON0 = 0X41 | (adch

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 约瑟夫
    约瑟夫问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,没人持有一个密码。一开始人选一个正整数作为报数上限值m,从第一个人开始按顺时针自1开始报数,报到m是停止报数。报m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止。(a description of the problem is : No. 1, 2, ..., n n clockwise direction by individuals sitting around a circle, no one holding a password. One person started as a positive integer limits on the number of reported m, from the first individuals to embark on the clockwise from a few reportedly started, the report m is reportedly stopped a few. M reported out of the list of his password as a new value m, from a clockwise direction in the next re-started from a newspaper a few, like that, until the total of all listed so far.)
    2005-01-06 20:06:47下载
    积分:1
  • facedetect1
    给定一副图像,采用一定的策略对其进行搜索以确定其中是否含有人脸,如果是则返回一脸的位置、大小和姿态(人脸检测)
    2010-05-07 17:18:21下载
    积分:1
  • 12_pwm
    嵌入式实验12,对接口进行配置,控制实验平台电平高低。(Embedded experiments 12 to configure the interface to control experimental platform level high and low.)
    2012-11-08 17:15:55下载
    积分:1
  • Qt 实现 Logger 日志
    qt中调试bug, 但是程序运行的远程客户电脑上 , 这时候就急需一个好用的log程序帮助程序员定位bug位置
    2022-02-03 04:43:41下载
    积分:1
  • cal
    热量表的计算、累加和MSP430的计算,超声波热量表的计算说明、超声波计算(Calorimeter calculations, calculation of cumulative and MSP430)
    2014-05-26 13:40:10下载
    积分:1
  • 多边形水平柱
    说明:  通过建立截面为多边形的水平柱体模型,运用c语言程序进行编程,得出该地质体的重磁异常特点(By establishing a horizontal cylinder model with polygon cross section and programming with C language, the characteristics of gravity and magnetic anomalies of the geological body are obtained.)
    2019-05-09 17:25:36下载
    积分:1
  • 巴特沃斯 c++
    巴特沃斯低通滤波器,直接设计方法,c++代码
    2022-02-09 11:15:27下载
    积分:1
  • html网站模板例子源码下载
    html网站模板例子源码下载
    2015-05-13下载
    积分:1
  • 约瑟夫环数据结构实验报告
    C语言数据结构课程设计约瑟夫环1. 本演示程序中,人数n应为任意的,首先应输入一个值赋给初始报数上限m,程序应能自动保存出列人的序号和将出列的人所持的密码赋给m,再次作为报数上限,如此循环,直至所有人都出列为止。(C language curriculum design data structure Joseph Central 1. The demo program, the number of n for arbitrary, and the first to be assigned to input an initial ceiling on the number of reported m, procedures should be able to automatically keep people out from the serial numbers and would come up out of a person's password assigned m, as reported again ceiling on the number of such cycles, until all shown up so far.)
    2020-06-26 08:20:02下载
    积分:1
  • ADC0809
    说明:  一个用于 AD采集的程序和电路,可以直接看到相应的作用(ADC0809)
    2010-03-22 17:05:11下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载