您的位置 首页 系统

实验数码管上显现数字( 单片机直接完成位选 共阴极)

***********************************************************************************标题:试验数码管上显示数字(单片机

/**********************************************************************************
* 标题: 实验数码管上显现数字( 单片机直接完成位选 共阴极) *
* *
* 衔接办法:P0与J12 用8PIN排线衔接 P1与JP16 用排线衔接 *
***********************************************************************************
* *
* 用573锁存器操控和单片机脚直接位选操控(非译码器操控)数码管*
***********************************************************************************/
#include
#define uint unsigned int
#define uchar unsigned char
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x–)
{
for(y=0;y<113;y++)
{
}
}
}
unsigned int code dbit[8]={0xfe,0xfd,0xfb,0xf7,0xef,0xdF,0xbF,0x7F};
unsigned int code num[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40};
void main()
{
while(1)
{
P1=dbit[4];
P0=num[9];
}
}

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/qianrushi/xitong/255145.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部