Software for 8x8 led matrix


hello,
to begin apologize english because i'm french , use translation.

i here introduce small software develop on windev, allowing having
the code corresponding design wish.

link : https://mega.co.nz/#!plqsijjd!eddvlfs2gygsqv6utstdd5lzjlnuwjwcfojatq4gnns

the image more telling:


for example arduino code:
code: [select]
unsigned char i;
unsigned char j;
/*port definitions*/
int max7219_pinclk = 41;
int max7219_pincs = 42;
int max7219_pindin = 43;

// paste here hexadecimal software
unsigned char disp1[38][8]={
 {0x81,0xc3,0xe7,0xff,0xff,0xe7,0xc3,0x81},
 {0xff,0x7e,0x3c,0x18,0x18,0x3c,0x7e,0xff}
};



void write_max7219_byte(unsigned char data)
{  
           unsigned char i;
   digitalwrite(max7219_pincs,low);
   for(i=8;i>=1;i--)
           {  
            digitalwrite(max7219_pinclk,low);
            digitalwrite(max7219_pindin,data&0x80);// extracting bit data
            data = data<<1;
            digitalwrite(max7219_pinclk,high);
           }                                
}


void write_max7219(unsigned char address,unsigned char dat)
{
       digitalwrite(max7219_pincs,low);
       write_max7219_byte(address);           //address?code of led
       write_max7219_byte(dat);               //data?figure on led
       digitalwrite(max7219_pincs,high);
}

void init_max7219(void)
{
write_max7219(0x09, 0x00);       //decoding ?bcd
write_max7219(0x0a, 0x03);       //brightness
write_max7219(0x0b, 0x07);       //scanlimit?8 leds
write_max7219(0x0c, 0x01);       //power-down mode?0?normal mode?1
write_max7219(0x0f, 0x00);       //test display?1?eot?display?0
}



void setup()
{

 pinmode(max7219_pinclk,output);
 pinmode(max7219_pincs,output);
 pinmode(max7219_pindin,output);
 delay(50);
 init_max7219();
}

void printmat(unsigned int data)
{
 for(i=1;i<9;i++)
   write_max7219(i,disp1[data][i-1]);
  delay(500);
}

void loop()
{
   printmat(0);
   printmat(1);
}


table

awesome !


Arduino Forum > Using Arduino > LEDs and Multiplexing > Software for 8x8 led matrix


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support