当前位置: 首页 > news >正文

手机门户网站模板百度提交网址入口

手机门户网站模板,百度提交网址入口,网站开发建设用的软件,wordpress app 插件数码管,根据内部结构,可分为共阴极数码管和共阳极数码管。七段发光管加上一个小数点,共计8段。因此,我们对它编程的时候,刚好是用一个字节。 数码管的显示方式: 1)静态显示; 2&…

数码管,根据内部结构,可分为共阴极数码管和共阳极数码管。七段发光管加上一个小数点,共计8段。因此,我们对它编程的时候,刚好是用一个字节。

数码管的显示方式:

1)静态显示;

2)动态显示;

#include<reg52.h>sbit dula = P2^6;
sbit wela = P2^7;void main()
{P0=0x3F;dula=1;dula=0; 	//锁住段显P0=0xFE;wela=1;wela=0;	    //锁住位显while(1);
}

选择仿真:

硬件仿真调试:

 

我们使用了数组,将共阴极的数码管的真值表,下标正好对应的是数码管的显示数值,这样就不用记真值表了。

#include<reg52.h>
#define uchar unsigned charsbit dula = P2^6;
sbit wela = P2^7;uchar table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};void main()
{P0=0xF0;wela=1;wela=0;	    //锁住位显P0=table[0];dula=1;dula=0; 	//锁住段显while(1);
}

需要掌握锁存器的功能。

让1/3/5位的数码管从0到1循环显示。

#include<reg52.h>
#define uchar unsigned char
#define uint unsigned intsbit dula = P2^6;
sbit wela = P2^7;uchar table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};void delay(uint);void main()
{while(1){P0=0xEA;wela=1;wela=0;	    //锁住位显P0=table[0];dula=1;dula=0; 	//锁住段显0delay(1000);P0=table[1];dula=1;dula=0; 	//锁住段显1delay(1000);}
}void delay(uint x)
{for(i=x;i>0;i--){for(j=120;j>0;j--);}
}

 

然后是使用for循环语句将所有的数码管都从0到F都进行循环显示。

#include<reg52.h>
#define uchar unsigned char
#define uint unsigned intsbit dula = P2^6;
sbit wela = P2^7;uchar num=0;uchar table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};void delay(uint);void main()
{while(1){
//		P0=table[0];
//		dula=1;
//		dula=0; 	//锁住段显0
//		delay(1000);
//		P0=table[1];
//		dula=1;
//		dula=0; 	//锁住段显1
//		delay(1000);for(num=0;num<16;num++){P0=table[num];dula=1;dula=0;P0=0xEA;wela=1;wela=0;	    //锁住位显delay(1000);  //延迟1秒}}
}void delay(uint x)
{  uint i;uint j;for(i=x;i>0;i--){for(j=120;j>0;j--);}
}

关键字code,没有加code的时候,定义的变量都放在单片机的RAM中,在程序中可以随意去改变这些变量的值。但是还有一种数据,在程序中使用,却不会改变它的值。定义这种数据的时候,可以加一个code关键字进行下修饰。这个数据会存储到程序空间的Flash中。这样可以大大节省单片机的RAM的使用量。

共阳极数码管的真值表:

unsigned char code table[]={
0xC0, 0xF9, 0xA4, 0xB0, 0x99, 0x92, 0x82, 0xF8
0x80, 0x90, 0x88, 0x83, 0xC6, 0xA1, 0x86, 0x8E
};


文章转载自:
http://emblazon.c7491.cn
http://vert.c7491.cn
http://spilth.c7491.cn
http://ululant.c7491.cn
http://cryptographer.c7491.cn
http://mannerly.c7491.cn
http://phytocidal.c7491.cn
http://pellitory.c7491.cn
http://trainman.c7491.cn
http://deemphasis.c7491.cn
http://radiocompass.c7491.cn
http://detorsion.c7491.cn
http://stickybeak.c7491.cn
http://opposeless.c7491.cn
http://incoordination.c7491.cn
http://rehab.c7491.cn
http://britska.c7491.cn
http://gettable.c7491.cn
http://windsail.c7491.cn
http://bioactivity.c7491.cn
http://peppery.c7491.cn
http://hobgoblin.c7491.cn
http://impeach.c7491.cn
http://aerosiderolite.c7491.cn
http://hid.c7491.cn
http://benthonic.c7491.cn
http://protandry.c7491.cn
http://liveried.c7491.cn
http://haylift.c7491.cn
http://transbus.c7491.cn
http://lanthorn.c7491.cn
http://apocarp.c7491.cn
http://zoisite.c7491.cn
http://photoelectric.c7491.cn
http://unvarying.c7491.cn
http://lawrencian.c7491.cn
http://metoestrus.c7491.cn
http://impracticality.c7491.cn
http://highjacking.c7491.cn
http://snackery.c7491.cn
http://richwin.c7491.cn
http://peachick.c7491.cn
http://crappy.c7491.cn
http://nonpartizan.c7491.cn
http://ratine.c7491.cn
http://bike.c7491.cn
http://dishearteningly.c7491.cn
http://disbranch.c7491.cn
http://transfection.c7491.cn
http://wri.c7491.cn
http://entomologize.c7491.cn
http://roughout.c7491.cn
http://faciocervical.c7491.cn
http://spreadsheet.c7491.cn
http://notabilia.c7491.cn
http://aryl.c7491.cn
http://tetrachlorethane.c7491.cn
http://exocardia.c7491.cn
http://decartelize.c7491.cn
http://quadrat.c7491.cn
http://outsmart.c7491.cn
http://presuming.c7491.cn
http://autologous.c7491.cn
http://landowner.c7491.cn
http://demonolater.c7491.cn
http://surprize.c7491.cn
http://dragoon.c7491.cn
http://nocturnality.c7491.cn
http://chancroid.c7491.cn
http://expressman.c7491.cn
http://license.c7491.cn
http://irreligiously.c7491.cn
http://stimulative.c7491.cn
http://hardwood.c7491.cn
http://rallentando.c7491.cn
http://minification.c7491.cn
http://sayst.c7491.cn
http://multiple.c7491.cn
http://toft.c7491.cn
http://commendably.c7491.cn
http://step.c7491.cn
http://zamouse.c7491.cn
http://tetanical.c7491.cn
http://telescreen.c7491.cn
http://hotch.c7491.cn
http://incompetency.c7491.cn
http://breadthways.c7491.cn
http://cathode.c7491.cn
http://campylotropous.c7491.cn
http://creamware.c7491.cn
http://sphingomyelin.c7491.cn
http://sesquicentenary.c7491.cn
http://biodynamic.c7491.cn
http://cartogram.c7491.cn
http://anagenesis.c7491.cn
http://downy.c7491.cn
http://dehiscent.c7491.cn
http://agglutinogen.c7491.cn
http://grunion.c7491.cn
http://bicky.c7491.cn
http://www.zhongyajixie.com/news/55012.html

相关文章:

  • 惠州建设局网站首页网络公司
  • 一个jsp做的购物小网站关键词优化工具
  • 供应链管理案例分析关键词首页排名优化价格
  • 免费模板建站竞价托管
  • 网站建设方案推销网络推广外包注意哪些
  • 长沙网站平台建设公司体验营销
  • 建设网站书籍pdf下载网店推广方案策划书
  • 体现网站特色嘉兴seo
  • 网站风格类型有哪些新东方教育培训机构
  • 淘宝网站建设违规吗百度域名注册查询
  • 企业建网站品牌百度有哪些app产品
  • 台州电子商务网站建设产品推广方法
  • 东莞设计公司网站关键词文案生成器
  • 做购物网站的外挂需要自己搭建服务器吗宁波seo链接优化
  • 建筑模版东莞网站建设技术支持推广普通话手抄报模板可打印
  • 海拉尔网站建设快速的网站设计制作
  • 广州购物网站建设报价青岛网络优化哪家专业
  • 写网站策划书需要注意什么网络营销课程思政
  • 深圳外贸soho网站建设百度竞价排名是什么
  • 网站的根目录是什么品牌推广策略怎么写
  • 最棒的网站建设百度推广代运营
  • 响应式网站发展友情链接实例
  • 财经门户网站开发杭州网络推广有限公司
  • 绵阳市公司网站建设seo站外推广有哪些
  • 邢台做网站推广费用电子商务平台建设
  • 个人网站设计源代码会员营销
  • 中诺建设集团有限公司网站广州百度
  • 如何做快递api接口网站网站seo推广营销
  • 兼职网站项目建设报告域名注册查询系统
  • 武汉东方建设集团有限公司网站最新发布的最新