当前位置:
首页> 74HC595程序应用(附原理图)-
74HC595程序应用(附原理图)-
时间: 下载该word文档
74HC595芯片资料
8位串行输入/输出或者并行输出移位寄存器,具有高阻关断状态。三态。
特点 8位串行输入 8位串行或并行输出 存储状态寄存器,三种状态 输出寄存器可以直接清除 100MHz的移位频率 输出能力
并行输出,总线驱动 串行输出;标准 中等规模集成电路 应用
串行到并行的数据转换
Remote control holding register.
#include #include #define uchar unsigned char #define uint unsigned int
sbit stcp1=P2^2; sbit ds1=P2^1; sbit shcp1=P2^0;
sbit stcp2=P2^5; sbit ds2=P2^4;
sbit shcp2=P2^3; uchar code DAT[11]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00};//共阴数码管显示码
uchar code tab[10]={0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd,0x87,0xff,0xef}; uchar code wei[9]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,0xff}; void delay(uint ms
{ uint x,y;
for(x=ms;x>0;x-- for(y=255;y>0;y--; } void QR0_5951(uchar num1 {
uchar j;
for (j=0;j<8;j++ {
num1=num1<<1 ; ds1=CY;
shcp1=1;//上升沿发生移位 // shcp1=0; }
} void OUT_5951(//将移位寄存器内的数据锁存到输出寄存器并显示 {
stcp1=0;
stcp1=1;//上升沿将数据送到输出锁存器 stcp1=0; }
void QR1_5952(uchar num2 {
uchar j; for (j=0;j<8;j++ {
num2=num2<<1 ; ds2=CY;
shcp2=1;//上升沿发生移位 // shcp2=0; }
}