前一阵子,去淘宝上花了45买了个16*94的双 {MOD}屏,用ORCAD画出了其线路图,如下:
可是点起来后发现屏幕本不亮的点会随机地一闪一闪,同时也发现,串行数据传送越后级的74HC595,其对就就的该区域闪烁烁明显,
如附件视频,小弟实在百思不得其解,还请各位看观中的高手指点一下
(原文件名:IMAGE_071.jpg)
(原文件名:IMAGE_072.jpg)
(原文件名:IMAGE_073.jpg)
(原文件名:IMAGE_069.jpg)
(原文件名:IMAGE_070.jpg)
点击此处下载线路图
ourdev_535230.pdf(文件大小:57K) (原文件名:SCHEMATIC1 _ 16_64.pdf)
点击此处下载录像
ourdev_535229.rar(文件大小:174K) (原文件名:录像.rar)
同时,小弟也希望能交几个志同道合的朋友一起学习一起交流,天天自己一个人在宿舍玩,实在没意思
程序如下:
#include <reg52.h>
#include <intrins.h>
void SendByte(unsigned int);
sbit RCK = P1^0; //输出存储器锁存时钟线
sbit SCK = P1^1; //数据输入时钟线
sbit SI_Rdata =P1^2; //红灯数据线
sbit SI_Ydata =P1^3; //绿灯数据线
sbit EN =P1^4; //74HC138使能
//A、B、C、D->p2.0~p2.3
unsigned char code font[][32]={
/*---------------成----------------*/
0xFF,0x27,0xFF,0x27,0xC0,0x03,0xC0,0x03,0xCF,0x3F,0xCF,0x3F,0xC1,0x27,0xC1,0x27,
0xC9,0x27,0xC9,0x8F,0xC9,0x9F,0x91,0x19,0x9E,0x49,0x3C,0xE1,0xBD,0xF3,0xFF,0xFF,
/*---------------功----------------*/
0xFF,0x3F,0xFF,0x3F,0x03,0x3F,0x03,0x3F,0xCC,0x03,0xCC,0x03,0xCF,0x33,0xCF,0x33,
0xCF,0x33,0xCF,0x33,0xC2,0x73,0x02,0x73,0x1C,0xF3,0xF1,0xC3,0xFB,0xC7,0xFF,0xFF,
/*---------------点----------------*/
0xFC,0xFF,0xFC,0xFF,0xFC,0x03,0xFC,0x03,0xFC,0xFF,0xC0,0x07,0xC0,0x07,0xCF,0xE7,
0xCF,0xE7,0xC0,0x07,0xC0,0x07,0xFF,0xFF,0xD9,0x33,0x99,0x99,0x39,0x99,0xFF,0xFF,
/*---------------亮----------------*/
0xFC,0xFF,0x80,0x03,0x80,0x03,0xFF,0xFF,0xE0,0x0F,0xE7,0xCF,0xE0,0x0F,0xFF,0xFF,
0x00,0x03,0x3F,0xF3,0xF0,0x3F,0xF3,0x3F,0xF3,0x3B,0xE7,0x03,0x8F,0x83,0xFF,0xFF,
};
main(void)
{
unsigned char i,j;
while(1)
{
// P2=0xff;
for(i=0;i<16;i++)
{
// EN=0;
for(j=0;j<4;j++)
{
SendByte(font[j][i*2]);
SendByte(font[j][i*2+1]);
}
EN=1;
RCK=0;
RCK=1;
P2=i;
EN=0;
}
}
}
void SendByte(unsigned int dat) //传1BYTE函数
{
unsigned char i;
for(i=0;i<8;i++)
{
SI_Ydata = (bit)(dat&0x80); //先传最高位
SCK=0;
// _nop_();
// _nop_();
SCK=1;
dat <<= 1;
}
}
┌--->关显示-->送数据-->开显示-->延时---┐
└--------------------------------------┘
一周热门 更多>