74HC573锁存器简单应用http://www.21ic.com/jichuzhishi/datasheet/74HC573/Latch/186096.html

74HC573锁存器简单应用

#include

#define uint unsigned int

#define uchar unsigned char

uchar code table[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};

sbit diola=P2^5;

sbit dula=P2^6;

sbit wela=P2^7;

void Delay(uint x)

{

uchar i;

while(x--)

for(i=0;i<120;i++);

}

void main()

{

uchar i;

wela=0;

dula=0;

diola=1;

while(1)

{

for(i=0;i<10;i++)

{

wela=1;

P0=0x0f;

wela=0;

dula=1;

P0=table[i];

P1=table[i];

dula=0;

Delay(500);

}

}

}


相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2021-10-12
  • 2022-12-23
  • 2021-07-01
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-25
  • 2021-08-28
  • 2021-05-18
  • 2022-01-15
  • 2021-10-26
  • 2021-06-15
  • 2021-12-26
相关资源
相似解决方案