- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
DA模块转换(DA module conversion)
DA模块转换(DA module conversion)
/ / screw the potentiometer, will display values between 0-255 three digital tube. This is to convert analog voltage into digital signal.
Some twist number may not / / dynamic digital potentiometer, please press the reset button S22 users can update the data on the experimental board
This picture is the reason / / and AD chip some of its characteristics.
#includereg51.h
#include intrins.h
#define uint unsigned int
#define uchar unsigned char
Uchar, A1, A2, A2t, A3, a, B, K, num, jiannum;
Sbit adrd=P3^7; //IO port definition
Sbit adwr=P3^6;
Sbit diola=P2^5;
Sbit dula=P2^6;
Sbit wela=P2^7;
Sbit light=P2^7;
Sbit set=P3^4;
Sbit shift=P3^1;
Sbit jia=P3^2;
Sbit jian=P3^3;
Void, int0init ()
{TMOD=0x11; / / set the timer 0 mode 1
TH0= (65536-62500) /256;
TL0= (65536-62500)%256;
TH1= (65536-5000) /256;
TL1= (65536-5000)%256;
EA=1; / / open interrupt
ET0=1; / / open timer 0 interrupt
ET1=1; / / open timer 0 interrupt
TR0=1; / / start timer 0
TR1=1; / / start timer 0
}
Uint true;
Uchar, Adval, adok, Xianshi, xiannum;
Void delay (unsigned char I) / / delay procedures
{unsigned, char, J, k;
For (j=i; j0; j--)
For (k=125; k0; k--);
}
Uchar code table[]={0x3f, 0x06,0x5b, 0x4f, 0x66,0x6d, 0x7d, / / digital encoding
0x07,0x7f, 0x6f, 0x77,0x7c, 0x39,0x5e, 0x79,0x71};
Void display (uchar bai_c, uchar sh_c, uchar g_c) / / display program
{if ((xianshi==1) (xiannum==0))
{P0=table[bai_c]; / / display 100
Dula=1;
Dula=0;
P0=0xfe;
Wela=1;
Wela=0;
Xianshi=0;
Xiannum++;
}
If ((xianshi==1) (xiannum==1))
{
P0=table[sh_c]; / / display ten
Dula=1;
Dula=0;
Wela=0;
P0=0xfd;
Wela=1;
Wela=0;
Xianshi=0;
Xiannum++;
}
If ((xianshi==1) (xiannum==2))
{
P0=table[g_c]; / / display a
Dula=1;
Dula=0;
P0=0xfb;
Wela=1;
Wela=0;
Xianshi=0;
Xiannum=0;
}
}
Void (main) / main program
{a=5;
B=10;
K=200;
Int0init ();
While (1)
{if (set==0)
{
Delay (50);
If (set==0)
While (... Set);
Jiannum++;
If (jiannum=4)
Jiannum=0;
}
//***************************** / reduction
If ((shift==0) (jia==
您可能关注的文档
- C++时间函数使用方法(C + + time function method).doc
- C++第五章习题解答(C + + 5 problem solving).doc
- c++进制转换(C + + conversion).doc
- c-bsa的制备(The preparation of c - bsa).doc
- C++语言计算精度的问题(C + + language accuracy problem).doc
- c1倒桩移库技巧口诀 助你轻松过c1倒桩_查查吧(C1 pouring library tips to help you easily cross the pile).doc
- C1坡道定点停车与坡道起步的技巧(The technique of stopping and starting the ramp at the base of C1 ramp).doc
- C1驾校金典易错题(C1 driving school is liable to error).doc
- C1科目三路考驾驶技巧(The driving skills of C1 subjects).doc
- C1驾照考试_科目二考试内容及合格标准-桩考及路考(C1 driving test _ 2 test content and qualified standard - pile test and road test).doc
- Daubechies小波(Daubechies wavelet).doc
- DB2中字符、数字和日期类型之间的转换(The transformation between characters, Numbers, and date types in DB2).doc
- data7(data7).doc
- DB2数据库日常维护手册(示例)(Daily maintenance manual for DB2 database (example)).doc
- DBF-900型连续封口机常见故障分析(Common failure analysis of dbf-900 continuous sealing machine).doc
- DBCC用法(DBCC usage).doc
- DBNull Null等区别(DBNull Null and other differences).doc
- dBV,dBuV,dBm,dBmV换算(DBV dBuV, dBm, dBmV conversion).doc
- dbx用法(DBX usage).doc
- DBX声明书(DBX statement).doc
最近下载
- 化工生产技术项目苯乙烯的生产.ppt VIP
- 九年级上册历史总复习知识点(可打印).pdf VIP
- 《红星照耀中国》第九章:同红军在一起(续)+带读课(课件)语文统编版2024八年级上册.pptx VIP
- 推拿治疗学不寐课件,十四五推拿治疗学课件.pptx VIP
- 《道德与法治》课程标准测试题含参考答案.pdf VIP
- 酒吧劳动用工合同范本7篇.docx VIP
- 是否应该禁止使用塑料袋和塑料吸管?辩论赛 正方辩词一辩、二辩、三辩、四辩发言稿.docx VIP
- 21年浙江6月卷高考地理真题解析.pptx VIP
- 药店动态质量管理知识(一)答案-2025年执业药师继续教育.docx VIP
- 【中学】【育人故事】唤醒你的“耳朵”.docx VIP
文档评论(0)