32*64双色点阵08接口 玩不转呀
点阵式32*64双色08接口,芯片是138+595+245 跪求程序 高手们帮帮忙呀
我有一个16分频的音乐频谱程序 想求一个万年历的 或者单一显示时间和年月日都行。
最小系统芯片是60s2
点阵屏08接口
08接口接线
没做过,没有这程序,不过建议你上个图,不然这程序做没法做
亲,怎么接啊
大家说一下08接口
A,B,C,D是行扫描信号,最多可以实现16扫
STB是串口数据的锁存信号
clk是数据位时钟
R是红色二极管的DATA端
G是绿色二极管的DATA端
GOE是芯片的使能控制
GND就不用说了吧
08接口是一种芯片么?烦请小编给解答一下
有关叫定义的那边是级联下一个点阵屏模块的,没有管脚定义的那一边借口才是输入端,把你的资料分享一下吧!
同求如何控制啊~!~
调试成功的
/*****************************64*32点阵屏的显示*************************************************
* 程序功能:在64*32的点阵屏上显示汉字“新疆师大物理与电子工程学院”,具有左移功能。 *
************************************************************************************************/
#include <AT89x51.H>
#define uchar unsigned char
#define uint unsigned int
uchar yid,h; //YID为移动计数器,H为行段计数器
uint zimuo; //字模计数器
uchar code hanzi[]; //汉字字模
uchar BUFF[18]; //缓存
void in_data(void); //调整数据
void rxd_data(void); //发送数据
void sbuf_out(); //16段扫描
/****************************===========字模===========**********************************/
uchar code table[]={ //取码方式:逐行,阴码,逆向
0x08,0x00,0x10,0x20,0xFE,0x1E,0x00,0x02,0x44,0x02,0x28,0x02,0xFF,0x7E,0x10,0x12,
0x10,0x12,0xFE,0x12,0x10,0x12,0x54,0x12,0x92,0x12,0x11,0x11,0x14,0x11,0x88,0x10,/*"新",0*/
0x00,0x00,0xDF,0x7F,0x10,0x00,0x90,0x3F,0x9F,0x24,0x81,0x3F,0x81,0x24,0xDF,0x7F,
0x12,0x00,0x92,0x3F,0x97,0x24,0x92,0x3F,0x96,0x24,0x91,0x3F,0x0A,0x00,0xC4,0x7F,/*"疆",1*/
0x10,0x00,0xD0,0x7F,0x12,0x04,0x12,0x04,0x12,0x04,0x92,0x3F,0x92,0x24,0x92,0x24,
0x92,0x24,0x92,0x24,0x92,0x24,0x90,0x2C,0x88,0x14,0x08,0x04,0x04,0x04,0x02,0x04,/*"师",2*/
0x20,0x02,0x20,0x02,0xFF,0x7F,0x20,0x02,0x08,0x00,0x90,0x1F,0x92,0x10,0x84,0x10,
0xA4,0x10,0xA0,0x14,0x90,0x08,0x8E,0x40,0x88,0x40,0x88,0x40,0x08,0x7F,0x00,0x00,/*"范",3*/
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x80,0x00,0x80,0x00,
0x40,0x01,0x40,0x01,0x20,0x02,0x20,0x02,0x10,0x04,0x08,0x08,0x04,0x10,0x03,0x60,/*"大",4*/
0x44,0x10,0x88,0x10,0x88,0x08,0x00,0x04,0xFE,0x7F,0x02,0x40,0x01,0x20,0xF8,0x07,
0x00,0x02,0x80,0x01,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"学",5*/
0x08,0x01,0x08,0x01,0x0A,0x01,0x0A,0x3F,0xBE,0x2A,0x4A,0x2A,0x09,0x2A,0x08,0x29,
0x38,0x29,0x8F,0x24,0x4A,0x24,0x08,0x22,0x08,0x22,0x08,0x21,0x88,0x14,0x08,0x08,/*"物",6*/
0x00,0x00,0x80,0x3F,0xBF,0x24,0x88,0x24,0x88,0x3F,0x88,0x24,0x88,0x24,0xBE,0x3F,
0x08,0x04,0x08,0x04,0x88,0x3F,0x08,0x04,0x38,0x04,0x07,0x04,0xC2,0x7F,0x00,0x00,/*"理",7*/
0x08,0x00,0x08,0x00,0x08,0x00,0xF8,0x3F,0x08,0x00,0x04,0x00,0x04,0x00,0xFC,0x1F,
0x00,0x10,0x00,0x10,0x00,0x10,0xFF,0x13,0x00,0x10,0x00,0x10,0x00,0x0A,0x00,0x04,/*"与",8*/
0x80,0x00,0x80,0x00,0x80,0x00,0xFC,0x1F,0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,
0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x50,0x80,0x40,0x80,0x40,0x00,0x7F,/*"电",9*/
0x00,0x00,0xFE,0x1F,0x00,0x08,0x00,0x04,0x00,0x02,0x80,0x01,0x80,0x00,0xFF,0x7F,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"子",10*/
0x00,0x00,0x00,0x00,0xFE,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x00,0x00,0x00,0x00,/*"工",11*/
0x10,0x00,0xB8,0x3F,0x8F,0x20,0x88,0x20,0x88,0x20,0xBF,0x3F,0x08,0x00,0x0C,0x00,
0x9C,0x7F,0x2A,0x04,0x2A,0x04,0x89,0x3F,0x08,0x04,0x08,0x04,0xC8,0x7F,0x08,0x00,/*"程",12*/
0x44,0x10,0x88,0x10,0x88,0x08,0x00,0x04,0xFE,0x7F,0x02,0x40,0x01,0x20,0xF8,0x07,
0x00,0x02,0x80,0x01,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"学",13*/
0x00,0x02,0x1E,0x04,0xD2,0x7F,0x4A,0x40,0x2A,0x20,0x86,0x1F,0x0A,0x00,0x12,0x00,
0xD2,0x7F,0x12,0x09,0x16,0x09,0x0A,0x09,0x82,0x48,0x82,0x48,0x42,0x70,0x22,0x00,/*"院",14*/
0x80,0x00,0x80,0x00,0x80,0x00,0xFC,0x1F,0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,
0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x50,0x80,0x40,0x80,0x40,0x00,0x7F,/*"电",15*/
0x00,0x00,0xFE,0x1F,0x00,0x08,0x00,0x04,0x00,0x02,0x80,0x01,0x80,0x00,0xFF,0x7F,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"子",16*/
0x00,0x1F,0xFC,0x00,0x20,0x00,0x10,0x04,0x08,0x02,0xFC,0x01,0x80,0x00,0x60,0x08,
0x18,0x10,0xFE,0x3F,0x80,0x20,0x90,0x04,0x88,0x08,0x84,0x10,0xA2,0x20,0x40,0x00,/*"系",17*/
0x80,0x00,0x88,0x00,0x88,0x00,0xF8,0x1F,0x84,0x00,0x82,0x00,0x80,0x00,0xFF,0x7F,
0xC0,0x01,0xA0,0x02,0x90,0x04,0x88,0x08,0x84,0x10,0x83,0x60,0x80,0x00,0x80,0x00,/*"朱",15*/
0x40,0x00,0x80,0x00,0xFE,0x7F,0x02,0x40,0x01,0x20,0xFC,0x1F,0x80,0x00,0x80,0x00,
0x80,0x00,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"宇",16*/
0x44,0x10,0x84,0x08,0x04,0x00,0xE4,0x3F,0x24,0x22,0xBF,0x2A,0x24,0x27,0x24,0x22,
0xE4,0x3F,0x04,0x00,0xC4,0x1F,0x5C,0x10,0xC7,0x1F,0x42,0x10,0xC0,0x1F,0x40,0x10,/*"增",17*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
//为了不出现乱码,在显示汉字“新疆师大物理与电子工程学院”的前后各加了若干空格。
};
/*******************************=======主程序=======******************************/
void main(void)
{
uchar i,d=10;
yid=0;
zimuo=0;
while(1)
{
while(yid<16) //数据移位。
{
for(i=0;i<d;i++) //移动速度
{
sbuf_out();
}
yid++; //移动一步
}
yid=0;
zimuo=zimuo+32; //后移一个字,
//if(zimuo>=480) //到最后从头开始,由字数决定(每个汉字由32个字节组成)
if(zimuo>=576) //此参数由字数决定(可根据实际显示的字数(包括空格)来调整)
zimuo=0;
}
}
/*******************=======16行扫描=======**********************/
void sbuf_out()
{
for(h=1;h<16;h++) //16行扫描
{
in_data(); //调整数据
rxd_data(); //串口发送数据
P1=0xff; //关闭显示。
P1_7=1; //锁存为高,595锁存信号
P1=h; //送行选
}
}
/*********************=======动态修改缓冲区中的数据=======**********************/
void in_data(void)
{
char s;
for(s=8;s>=0;s--) //h为向后先择字节计数器,zimuoo为向后选字计数器
{
BUFF[2*s+1]=~table[zimuo+1+32*s+2*h]; //把第一个字模的第一个字节放入BUFF0中,
//第二个字模的第一个字节放入BUFF2中
BUFF[2*s]=~table[zimuo+32*s+2*h]; // 把第一个字模的第二个字节放入BUFF1中,
//第二个字模的第二个字节放入BUFF3中
}
}
/*******************=======串行发送数据 =======**********************/
void rxd_data(void) //串行发送数据
{
char s;
uchar inc,tempyid,temp;
if(yid<8)
inc=0;
else
inc=1;
for(s=0+inc;s<8+inc;s++) //发送8字节数据
{
if(yid<8)
tempyid=yid;
else
tempyid=yid-8;
temp=(BUFF[s]>>tempyid)|(BUFF[s+1]<<(8-tempyid));
//h1左移tempyid位后和h2右移8-tempyid相或,取出移位后的数据
SBUF=temp; //把BUFF中的字节从大到小移位相或后发送输出。
while(!TI); //注:这里使用了串口,串口数据的发送为最低位在前。
TI=0; //等待发送中断
}
}
调试成功的
/*****************************64*32点阵屏的显示*************************************************
* 程序功能:在64*32的点阵屏上显示汉字“新疆师大物理与电子工程学院”,具有左移功能。 *
************************************************************************************************/
#include <AT89x51.H>
#define uchar unsigned char
#define uint unsigned int
uchar yid,h; //YID为移动计数器,H为行段计数器
uint zimuo; //字模计数器
uchar code hanzi[]; //汉字字模
uchar BUFF[18]; //缓存
void in_data(void); //调整数据
void rxd_data(void); //发送数据
void sbuf_out(); //16段扫描
/****************************===========字模===========**********************************/
uchar code table[]={ //取码方式:逐行,阴码,逆向
0x08,0x00,0x10,0x20,0xFE,0x1E,0x00,0x02,0x44,0x02,0x28,0x02,0xFF,0x7E,0x10,0x12,
0x10,0x12,0xFE,0x12,0x10,0x12,0x54,0x12,0x92,0x12,0x11,0x11,0x14,0x11,0x88,0x10,/*"新",0*/
0x00,0x00,0xDF,0x7F,0x10,0x00,0x90,0x3F,0x9F,0x24,0x81,0x3F,0x81,0x24,0xDF,0x7F,
0x12,0x00,0x92,0x3F,0x97,0x24,0x92,0x3F,0x96,0x24,0x91,0x3F,0x0A,0x00,0xC4,0x7F,/*"疆",1*/
0x10,0x00,0xD0,0x7F,0x12,0x04,0x12,0x04,0x12,0x04,0x92,0x3F,0x92,0x24,0x92,0x24,
0x92,0x24,0x92,0x24,0x92,0x24,0x90,0x2C,0x88,0x14,0x08,0x04,0x04,0x04,0x02,0x04,/*"师",2*/
0x20,0x02,0x20,0x02,0xFF,0x7F,0x20,0x02,0x08,0x00,0x90,0x1F,0x92,0x10,0x84,0x10,
0xA4,0x10,0xA0,0x14,0x90,0x08,0x8E,0x40,0x88,0x40,0x88,0x40,0x08,0x7F,0x00,0x00,/*"范",3*/
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x80,0x00,0x80,0x00,
0x40,0x01,0x40,0x01,0x20,0x02,0x20,0x02,0x10,0x04,0x08,0x08,0x04,0x10,0x03,0x60,/*"大",4*/
0x44,0x10,0x88,0x10,0x88,0x08,0x00,0x04,0xFE,0x7F,0x02,0x40,0x01,0x20,0xF8,0x07,
0x00,0x02,0x80,0x01,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"学",5*/
0x08,0x01,0x08,0x01,0x0A,0x01,0x0A,0x3F,0xBE,0x2A,0x4A,0x2A,0x09,0x2A,0x08,0x29,
0x38,0x29,0x8F,0x24,0x4A,0x24,0x08,0x22,0x08,0x22,0x08,0x21,0x88,0x14,0x08,0x08,/*"物",6*/
0x00,0x00,0x80,0x3F,0xBF,0x24,0x88,0x24,0x88,0x3F,0x88,0x24,0x88,0x24,0xBE,0x3F,
0x08,0x04,0x08,0x04,0x88,0x3F,0x08,0x04,0x38,0x04,0x07,0x04,0xC2,0x7F,0x00,0x00,/*"理",7*/
0x08,0x00,0x08,0x00,0x08,0x00,0xF8,0x3F,0x08,0x00,0x04,0x00,0x04,0x00,0xFC,0x1F,
0x00,0x10,0x00,0x10,0x00,0x10,0xFF,0x13,0x00,0x10,0x00,0x10,0x00,0x0A,0x00,0x04,/*"与",8*/
0x80,0x00,0x80,0x00,0x80,0x00,0xFC,0x1F,0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,
0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x50,0x80,0x40,0x80,0x40,0x00,0x7F,/*"电",9*/
0x00,0x00,0xFE,0x1F,0x00,0x08,0x00,0x04,0x00,0x02,0x80,0x01,0x80,0x00,0xFF,0x7F,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"子",10*/
0x00,0x00,0x00,0x00,0xFE,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x00,0x00,0x00,0x00,/*"工",11*/
0x10,0x00,0xB8,0x3F,0x8F,0x20,0x88,0x20,0x88,0x20,0xBF,0x3F,0x08,0x00,0x0C,0x00,
0x9C,0x7F,0x2A,0x04,0x2A,0x04,0x89,0x3F,0x08,0x04,0x08,0x04,0xC8,0x7F,0x08,0x00,/*"程",12*/
0x44,0x10,0x88,0x10,0x88,0x08,0x00,0x04,0xFE,0x7F,0x02,0x40,0x01,0x20,0xF8,0x07,
0x00,0x02,0x80,0x01,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"学",13*/
0x00,0x02,0x1E,0x04,0xD2,0x7F,0x4A,0x40,0x2A,0x20,0x86,0x1F,0x0A,0x00,0x12,0x00,
0xD2,0x7F,0x12,0x09,0x16,0x09,0x0A,0x09,0x82,0x48,0x82,0x48,0x42,0x70,0x22,0x00,/*"院",14*/
0x80,0x00,0x80,0x00,0x80,0x00,0xFC,0x1F,0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,
0x84,0x10,0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x50,0x80,0x40,0x80,0x40,0x00,0x7F,/*"电",15*/
0x00,0x00,0xFE,0x1F,0x00,0x08,0x00,0x04,0x00,0x02,0x80,0x01,0x80,0x00,0xFF,0x7F,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"子",16*/
0x00,0x1F,0xFC,0x00,0x20,0x00,0x10,0x04,0x08,0x02,0xFC,0x01,0x80,0x00,0x60,0x08,
0x18,0x10,0xFE,0x3F,0x80,0x20,0x90,0x04,0x88,0x08,0x84,0x10,0xA2,0x20,0x40,0x00,/*"系",17*/
0x80,0x00,0x88,0x00,0x88,0x00,0xF8,0x1F,0x84,0x00,0x82,0x00,0x80,0x00,0xFF,0x7F,
0xC0,0x01,0xA0,0x02,0x90,0x04,0x88,0x08,0x84,0x10,0x83,0x60,0x80,0x00,0x80,0x00,/*"朱",15*/
0x40,0x00,0x80,0x00,0xFE,0x7F,0x02,0x40,0x01,0x20,0xFC,0x1F,0x80,0x00,0x80,0x00,
0x80,0x00,0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"宇",16*/
0x44,0x10,0x84,0x08,0x04,0x00,0xE4,0x3F,0x24,0x22,0xBF,0x2A,0x24,0x27,0x24,0x22,
0xE4,0x3F,0x04,0x00,0xC4,0x1F,0x5C,0x10,0xC7,0x1F,0x42,0x10,0xC0,0x1F,0x40,0x10,/*"增",17*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",1*/
//为了不出现乱码,在显示汉字“新疆师大物理与电子工程学院”的前后各加了若干空格。
};
/*******************************=======主程序=======******************************/
void main(void)
{
uchar i,d=10;
yid=0;
zimuo=0;
while(1)
{
while(yid<16) //数据移位。
{
for(i=0;i<d;i++) //移动速度
{
sbuf_out();
}
yid++; //移动一步
}
yid=0;
zimuo=zimuo+32; //后移一个字,
//if(zimuo>=480) //到最后从头开始,由字数决定(每个汉字由32个字节组成)
if(zimuo>=576) //此参数由字数决定(可根据实际显示的字数(包括空格)来调整)
zimuo=0;
}
}
/*******************=======16行扫描=======**********************/
void sbuf_out()
{
for(h=1;h<16;h++) //16行扫描
{
in_data(); //调整数据
rxd_data(); //串口发送数据
P1=0xff; //关闭显示。
P1_7=1; //锁存为高,595锁存信号
P1=h; //送行选
}
}
/*********************=======动态修改缓冲区中的数据=======**********************/
void in_data(void)
{
char s;
for(s=8;s>=0;s--) //h为向后先择字节计数器,zimuoo为向后选字计数器
{
BUFF[2*s+1]=~table[zimuo+1+32*s+2*h]; //把第一个字模的第一个字节放入BUFF0中,
//第二个字模的第一个字节放入BUFF2中
BUFF[2*s]=~table[zimuo+32*s+2*h]; // 把第一个字模的第二个字节放入BUFF1中,
//第二个字模的第二个字节放入BUFF3中
}
}
/*******************=======串行发送数据 =======**********************/
void rxd_data(void) //串行发送数据
{
char s;
uchar inc,tempyid,temp;
if(yid<8)
inc=0;
else
inc=1;
for(s=0+inc;s<8+inc;s++) //发送8字节数据
{
if(yid<8)
tempyid=yid;
else
tempyid=yid-8;
temp=(BUFF[s]>>tempyid)|(BUFF[s+1]<<(8-tempyid));
//h1左移tempyid位后和h2右移8-tempyid相或,取出移位后的数据
SBUF=temp; //把BUFF中的字节从大到小移位相或后发送输出。
while(!TI); //注:这里使用了串口,串口数据的发送为最低位在前。
TI=0; //等待发送中断
}
}
请问引脚怎接……谢谢