完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
本帖最后由 回眸倾城泪ζ╮ 于 2012-11-19 21:35 编辑
点阵式32*64双色08接口,芯片是138+595+245 跪求程序 高手们帮帮忙呀 我有一个16分频的音乐频谱程序 想求一个万年历的 或者单一显示时间和年月日都行。
|
|
相关推荐
12个回答
|
|
没做过,没有这程序,不过建议你上个图,不然这程序做没法做
|
|
|
|
亲,怎么接啊
|
|
|
|
|
|
|
|
|
|
|
|
A,B,C,D是行扫描信号,最多可以实现16扫
STB是串口数据的锁存信号 clk是数据位时钟 R是红色二极管的DATA端 G是绿色二极管的DATA端 GOE是芯片的使能控制 GND就不用说了吧 |
|
|
|
08接口是一种芯片么?烦请楼主给解答一下
|
|
|
|
有关叫定义的那边是级联下一个点阵屏模块的,没有管脚定义的那一边借口才是输入端,把你的资料分享一下吧!
|
|
|
|
同求如何控制啊~!~
|
|
|
|
调试成功的
/*****************************64*32点阵屏的显示************************************************* * 程序功能:在64*32的点阵屏上显示汉字“新疆师大物理与电子工程学院”,具有左移功能。 * ************************************************************************************************/ #include #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 ***uf_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 ***uf_out(); } yid++; //移动一步 } yid=0; zimuo=zimuo+32; //后移一个字, //if(zimuo>=480) //到最后从头开始,由字数决定(每个汉字由32个字节组成) if(zimuo>=576) //此参数由字数决定(可根据实际显示的字数(包括空格)来调整) zimuo=0; } } /*******************=======16行扫描=======**********************/ void ***uf_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 #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 ***uf_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 ***uf_out(); } yid++; //移动一步 } yid=0; zimuo=zimuo+32; //后移一个字, //if(zimuo>=480) //到最后从头开始,由字数决定(每个汉字由32个字节组成) if(zimuo>=576) //此参数由字数决定(可根据实际显示的字数(包括空格)来调整) zimuo=0; } } /*******************=======16行扫描=======**********************/ void ***uf_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; //等待发送中断 } } |
|
|
|
vk20109 发表于 2016-4-18 23:39 请问引脚怎接……谢谢 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
494 浏览 0 评论
使用Keil建立完整的工程,并使用外部中断0触发数码管显示903
1050 浏览 0 评论
嵌入式学习-飞凌嵌入式ElfBoard ELF 1板卡-使用AHT20进行环境监测之AHT20传感器介绍
1151 浏览 0 评论
887 浏览 0 评论
928 浏览 1 评论
【youyeetoo X1 windows 开发板体验】少儿AI智能STEAM积木平台
11847 浏览 31 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-2 21:29 , Processed in 0.675923 second(s), Total 63, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号