• 大小: 1.14MB
    文件类型: .7z
    金币: 1
    下载: 0 次
    发布日期: 2023-08-14
  • 语言: 其他
  • 标签: 点阵显示  74595  

资源简介

常用点阵显示(74ls595)驱动 含有11个文件,每个文件都有带有protues仿真图,主要包含8*8 16*16 16*32各种点阵显示

资源截图

代码片段和文件信息

/*----------------------------*/
       /*16*16点阵显示*/
/*----------------------------------*/
#include 
#include
#include 
#define uchar unsigned char
#define uint  unsigned int

sbit CLK=P3^0;     //
sbit CLK1=P3^1;    //
sbit CLK2=P3^2;    //
sbit CLK3=P3^3;    //
char code table[]={
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00

0x400x000x300x000x0F0xFC0x000x040x000x040x000x040x000x040x000x05 //广
0x000x060x000x040x000x040x000x040x000x040x000x060x000x040x000x00

0x000x080x400x080x210x080x110x880x0D0x680x410x180x810x0F0x7F0xE8 //东
0x010x080x050x080x090x080x310x880x610x080x000x0C0x000x080x000x00

0x040x100x040x220xFE0x640x010x0C0x010x900x1F0x080x110xF70x110x14 //海
0x130x340x150x540x510x140x910x140x7F0xF60x110x040x010x000x000x00

0x040x100x040x220xFE0x640x010x0C0x040x800x040x080x040x490x040x4A //洋
0x040x4C0xFF0xF80x040x4C0x040x4A0x040x490x060x080x040x000x000x00

0x000x200x400x200x400x200x200x200x100x200x0C0x200x030xA00x000x7F //大
0x010xA00x060x200x080x200x100x200x200x200x600x300x200x200x000x00

0x040x400x040x300x040x110x040x960x040x900x440x900x840x910x7E0x96 //学
0x060x900x050x900x040x980x040x140x040x130x060x500x040x300x000x00

0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
  };                                                                     
void Delay1ms( int ms)
{                           
int i;
while(ms--)
{
  for(i = 0; i< 250; i++)
  {
   _nop_();
   _nop_();
   _nop_();
   _nop_();
  }
}
}
  main()
 {
 uint jkl;
 while(1)
 {
 for(k=0;k<256;k=k+2)
 {
 for(l=0;l<3;l++)
 {
 P2=0XFE;
 for(j=0;j<16;j=j+2)
 {   
  P0=table[j+1+k];
  CLK=0;
  CLK=1;
  P0=table[j+k];
  CLK1=0;
  CLK1=1;
  P0=table[j+17+k];
  CLK2=0;
  CLK2=1;
  P0=table[j+16+k];
  CLK3=0;
  CLK3=1;
  Delay1ms(1);
  P2=~(~P2<<1);

评论

共有 条评论