AT89C2051实现A/D转换的C51程序

[复制链接]
查看1196 | 回复0 | 2011-9-7 22:46:44 | 显示全部楼层 |阅读模式
<




* io分配: *
;* OUTPUT: *
;* P1.0 ...... 模拟量输入 *
;* P1.1 ...... DA输入比较基准电压 *
;* P1.2~7..... R-2R DA电阻网络 *
;* P3.7 ...... LED 模拟亮度输出 *
;* CPU CLOCK EQU 6M */
//xiaoqi last edit in 2001.11
//#pragma src
#i nclude "AT89x051.h"
#i nclude
#i nclude
#i nclude
//变量类型标识的宏定义,大家都喜欢这么做
#define Uchar unsigned char
#define Uint unsigned int
#define Ledlight() (P3
热帖推荐
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则