山东大学单片机实验 (实验7).doc





《山东大学单片机实验 (实验7).doc》由会员分享,可在线阅读,更多相关《山东大学单片机实验 (实验7).doc(11页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-date山东大学单片机实验 (实验7)山东大学单片机实验 (实验7) 信息科学与工程学院20162017学年第二学期实 验 报 告课程名称: 单片机原理与应用 实验名称: 3.8 ADC0808/9信号采集实验 -实验报告【实验题目】 本实验利用LCD1602和AD0808实现简单的交流信号过零检测与频率分析。要求信号幅度变化时(满量程的5%95%),不影响检测的结果。频率检
2、测的结果通过LCD1602的第1行显示出来,信号过零时,能够通过P2.6输出一个脉冲宽度为5微秒的脉冲信号。【实验要求】 1. 编写源程序并进行必要的注释;2. 记录实验过程;3. 记录程序运行结果;【实验过程及结果记录】自我完成实验A.电路图B.运行结果频率监测过零检测【实验源程序】#include #include #define uint unsigned int#define uchar unsigned charsbit LCD_RS=P20;sbit LCD_RW=P21;sbit LCD_EN=P22;sbit AD_CLK=P23;sbit Start=P24;sbit OE=
3、P25;sbit Out_pulse=P26;sbit EOC=P27;uchar tx50=0;uchar f=0;uchar date,lastdate,ge,shi;void delay_ms(uint xms)uint i,j;for(i=xms;i0;i-)for(j=110;j0;j-); bit lcd_busy()bit result;LCD_RS=0;LCD_RW=1;LCD_EN=1;_nop_();_nop_();_nop_();_nop_();result=(bit)(P1&0x80);LCD_EN=0;return result;void lcd_wcmd(uchar
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 山东大学单片机实验 实验7 山东大学 单片机 实验

限制150内