74HC573简单使用
# include ‘ re g51.h ‘ typedefunsignedintu 16; 类型无符号化char u8; sbit DUAN_LE=P2^0; sbit WELA_LE=P2^1; u8 codesmgduan [ ]={0xc 0,0x F9,0x a4,0xb 0,0x 99,0x 92,0x F8,0x 80,0x 88,0x 83,0xc 6,0x a1,0x 86,0x 86/for (; ms0; ms—-for(I=110; i0; I—-; }void Smg_Init () { WELA_LE=1; P0=0x01; WELA_LE=0; DUAN_LE=1; P0=0xff; DUAN_LE=0; }void Wela_Latch ()//位代码锁存器) { WELA_LE=1; P0=0x01; WELA_LE=0; } Void显示() ) u8I; DUAN_LE=1; for(I=一分快三技巧准确率100nedintu 16; 类型无符号化char u8; sbit DUAN_LE=P2^0; sbit WELA_LE=P2^1; u8 codesmgduan [ ]={0xc 0,0x F9,0x a4,0xb 0,0x 99,0x 92,0x F8,0x 80,0x 88,0x 83,0xc 6,0x a1,0x 86,0x 86/for (; ms0; ms—-for(I=110; i0; I—-; }void Smg_Init () { WELA_LE=1; P0=0x01; WELA_LE=0; DUAN_LE=1; P0=0xff; DUAN_LE=0; }void Wela_Latch ()//位代码锁存器) { WELA_LE=1; P0=0x01; WELA_LE=0; } Void显示() ) u8I; DUAN_LE=1; for(I=0; i16; I () { P0=smgduan[i]; 延迟毫秒(500; }}void main () ) { Smg_Init ); Wela_Latch (; wile(1)显示; }总结:
1.74HC573锁存器,使能端OE为低电平有效,LE锁存器允许端控制锁存器: LE为高电平,输出随输入变化而变化; LE为低电平,输出为上次输入的值,但不影响输入;
2 .段码输入端口需要电阻,没有电阻就无法达到效果。
3 .模拟结果可能不正确。 如果模拟电路图正确,重新连接或重新设置网络标签可以解决问题。 (这种情况很少,但还存在。