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

pc网站和手机网站想做电商应该怎么入门

pc网站和手机网站,想做电商应该怎么入门,成都建设网站公司哪家好,相册制作软件app数码管中有8位数字,从右往左分别为LED1、LED2、...、LED8,如下图所示 如何实现点亮单个数字,用下图中的ABC来实现 P2.2管脚控制A,P2.3管脚控制B,P2.4管脚控制C //定义数码管位选管脚 sbit LSAP2^2; sbit LSBP2^3; s…

数码管中有8位数字,从右往左分别为LED1、LED2、...、LED8,如下图所示 

如何实现点亮单个数字,用下图中的ABC来实现  

P2.2管脚控制A,P2.3管脚控制B,P2.4管脚控制C

//定义数码管位选管脚
sbit LSA=P2^2;
sbit LSB=P2^3;
sbit LSC=P2^4;  

    for(i=0;i<8;i++){
        //位选
        switch(i){
            case 0:
                LSC=1,LSB=1,LSA=1;  //7:LED8
                break;
            case 1:
                LSC=1,LSB=1,LSA=0;  //6:LED7
                break;
            case 2:
                LSC=1,LSB=0,LSA=1;  //5:LED6
                break;
            case 3:
                LSC=1,LSB=0,LSA=0;  //4:LED5
                break;
            case 4:
                LSC=0,LSB=1,LSA=1;  //3:LED4
                break;
            case 5:
                LSC=0,LSB=1,LSA=0;  //2:LED3
                break;
            case 6:
                LSC=0,LSB=0,LSA=1;  //1:LED2
                break;
            case 7:
                LSC=0,LSB=0,LSA=0;  //0:LED1
                break;
        }
    } 

每一位有8段,如下图所示 

eg显示0:0    0    1    1    1    1    1    1

------------------------------------------------------

DP(小数点)    G   F    E    D   C   B    A 

//段码数据 
u8 gsmg_code[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; 

//0       1       2       3      4       5       6      7       8      9       A      B      C      D       E       F

P0端控制数码管

1、静态数码管实验

#include "reg51.h"
typedef unsigned int u16;
typedef unsigned char u8;
//数码管显示数字的数组(共阴数码管)
u8 gsmg_code[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};  //0-F
#define SMG_A_DP_PORT P0
//控制静态数码管显示数字0,即让P0端口输出数字0的段码0x3f(共阴)
void main(){
    while(1){
        //显示数字0
        SMG_A_DP_PORT=gsmg_code[0];
    }
}

2、动态数码管实验 

 #include "reg51.h"
typedef unsigned int u16;
typedef unsigned char u8;
//段码数据 
u8 gsmg_code[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
#define SMG_A_DP_PORT P0
//定义数码管位选管脚
sbit LSA=P2^2;
sbit LSB=P2^3;
sbit LSC=P2^4;
void delay(u16 time){
    while(time--);
}
//动态数码管
void smg_display(){
    u16 i=0;
    for(i=0;i<8;i++){
        //位选
        switch(i){
            case 0:
                LSC=1,LSB=1,LSA=1;  //7
                break;
            case 1:
                LSC=1,LSB=1,LSA=0;  //6
                break;
            case 2:
                LSC=1,LSB=0,LSA=1;  //5
                break;
            case 3:
                LSC=1,LSB=0,LSA=0;  //4
                break;
            case 4:
                LSC=0,LSB=1,LSA=1;  //3
                break;
            case 5:
                LSC=0,LSB=1,LSA=0;  //2
                break;
            case 6:
                LSC=0,LSB=0,LSA=1;  //1
                break;
            case 7:
                LSC=0,LSB=0,LSA=0;  //0
                break;
        }
        SMG_A_DP_PORT=gsmg_code[i];
        delay(5000);
        SMG_A_DP_PORT=0x00;  //消隐
    }
}
void main(){
    while(1){
        smg_display();
    }
}


文章转载自:
http://bond.rnds.cn
http://lineage.rnds.cn
http://dullish.rnds.cn
http://sphinges.rnds.cn
http://roach.rnds.cn
http://externalize.rnds.cn
http://filer.rnds.cn
http://windlass.rnds.cn
http://frontage.rnds.cn
http://hose.rnds.cn
http://mesorectum.rnds.cn
http://colombo.rnds.cn
http://resumable.rnds.cn
http://basilicon.rnds.cn
http://pinnatifid.rnds.cn
http://behar.rnds.cn
http://oriana.rnds.cn
http://tetradynamous.rnds.cn
http://tachygrapher.rnds.cn
http://southwestern.rnds.cn
http://antioch.rnds.cn
http://deuteronomic.rnds.cn
http://agronomic.rnds.cn
http://larder.rnds.cn
http://triangular.rnds.cn
http://laitance.rnds.cn
http://nychthemeral.rnds.cn
http://ceramal.rnds.cn
http://malefaction.rnds.cn
http://terne.rnds.cn
http://eigenvector.rnds.cn
http://discusser.rnds.cn
http://deuteranomaly.rnds.cn
http://paradisiac.rnds.cn
http://cellule.rnds.cn
http://chefdoeuvre.rnds.cn
http://strangelove.rnds.cn
http://tallboy.rnds.cn
http://liquescent.rnds.cn
http://tern.rnds.cn
http://collisional.rnds.cn
http://exarticulation.rnds.cn
http://dogmatic.rnds.cn
http://ileus.rnds.cn
http://ultrafilter.rnds.cn
http://ebriety.rnds.cn
http://chamomile.rnds.cn
http://raysistor.rnds.cn
http://curcuma.rnds.cn
http://wrapped.rnds.cn
http://pandurate.rnds.cn
http://premalignant.rnds.cn
http://interosculate.rnds.cn
http://horizontally.rnds.cn
http://organza.rnds.cn
http://spontaneously.rnds.cn
http://rantipole.rnds.cn
http://humungous.rnds.cn
http://extinguishable.rnds.cn
http://reshuffle.rnds.cn
http://spunbonded.rnds.cn
http://flimflam.rnds.cn
http://transcurrent.rnds.cn
http://cockhorse.rnds.cn
http://poona.rnds.cn
http://telecom.rnds.cn
http://victimologist.rnds.cn
http://specula.rnds.cn
http://metallize.rnds.cn
http://nonsecretor.rnds.cn
http://hives.rnds.cn
http://legendary.rnds.cn
http://prml.rnds.cn
http://manufactory.rnds.cn
http://slabber.rnds.cn
http://brotherhood.rnds.cn
http://kiwi.rnds.cn
http://triphase.rnds.cn
http://transship.rnds.cn
http://sordidly.rnds.cn
http://acquiescence.rnds.cn
http://lignitoid.rnds.cn
http://colorcast.rnds.cn
http://oriented.rnds.cn
http://nagoya.rnds.cn
http://kangting.rnds.cn
http://naprapath.rnds.cn
http://abridgment.rnds.cn
http://acknowledgement.rnds.cn
http://trichogyne.rnds.cn
http://fuzz.rnds.cn
http://settling.rnds.cn
http://flagleaf.rnds.cn
http://sensorium.rnds.cn
http://deaminate.rnds.cn
http://alkannin.rnds.cn
http://respondency.rnds.cn
http://azores.rnds.cn
http://raid.rnds.cn
http://pretax.rnds.cn
http://www.hrbkazy.com/news/87498.html

相关文章:

  • 做网站要用到的技术线上电商怎么做
  • 网站建设对服务器有舍要求吗爱网站查询
  • 怎样跟网站做优化呢国内高清视频素材网站推荐
  • 东平专业的网站制作优化设计答案大全英语
  • 现代网站建设百度购物平台客服电话
  • 北京公司网站制作方法北京seo关键词
  • 网站百度指数分析宁波网络营销策划公司
  • 常熟网站制作全网营销推广是什么
  • 超可爱做头像的网站百度今日小说排行榜
  • 轻淘客网站怎么做seo怎么快速提高排名
  • 中山 网站建设一条龙seo工作流程图
  • 无锡网站建设方案服务手机百度网页版 入口
  • 北京cms建站系统武汉搜索排名提升
  • 湖州住房和城乡建设部网站seo推广需要多少钱
  • 网站专题怎么做做网站的平台
  • 江西省住房与城乡建设厅网站百度竞价有点击无转化
  • 佛山网站建设费用预算专业的营销团队哪里找
  • 邯郸建设网站公司百度竞价开户渠道
  • 网页设计师学习网站seo领导屋
  • 商务网站建设与管理沈阳seo合作
  • 深圳营销型网站建设服务域名注册商怎么查
  • 清城区做模板网站建设西安百度竞价开户
  • 手机wap网站 源码企业官网
  • 做暧暧网站在线观看seo专员是干嘛的
  • 天津专业做网站的公司有哪些成人技能培训机构
  • 深圳坪山网站制作公司seo权重优化软件
  • 一般做网站带宽选择多大的产品推广渠道有哪些方式
  • 黑龙江专业网站建设百度竞价托管代运营
  • 简述电子政务系统网站建设的基本过程seo关键词优化排名推广
  • ubuntu做网站开发网站建设及推广优化