Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8x8 Dot Matrix Display with '595 shift register problem

Status
Not open for further replies.

lloydi12345

Member level 4
Member level 4
Joined
Aug 31, 2010
Messages
77
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Activity points
1,953
Hi, I've read an article from this site Lab 15: Scrolling text message on an LED dot-matrix display :Embedded Lab. Unfortunately it didn't worked in proteus so I tried making another codes and redesigning the schematic from the easiest level. I'm using my columns as my scanners and rows as the pattern generators. Here's my schematic:

scheme.jpg


The problem here is that I don't know how to send the individual bits on the 1st array's row (letter A) which is 0b00000000(this is for 0x00) to my_data then followed by 0b11111110(this is for 0xFE) and so on until 0x00. There's no problem sending values to my_data if I'm using array that is composed of binaries but when I use hexadecimals I can't make it work.

Code:
//LED dot matrix display
//columns used for scanning
//rows used for generating patterns


// Definitions
 sbit my_data at RC2_bit;
 sbit clock at RC6_bit;
 sbit latch at RC7_bit;


 const unsigned short one[2][8] = {{0x00, 0xFE, 0x11, 0x11, 0x11, 0xFE, 0x00, 0x00}, //A
                                   {0x00, 0xFF, 0x89, 0x89, 0x89, 0x76, 0x00, 0x00}  //B
                                  };

 unsigned int row, column, scanner, repeat;

void main() {
 CMCON = 0x07;   // Disable comparators
 ADCON0 = 0x00;
 ADCON1 = 0x0F;
 TRISC = 0x00;
 TRISD = 0x00;
 my_data = 1;
 scanner = 1;
 row = 0;
 column = 0;
 
 while(1){
 
      for (column = 0; column < 2; column++){

             for (row = 0; row < 8; row++){
                  my_data = one[column][row];
                  clock = 1;
                  clock = 0;
                  
                  scanner = 1;
                  for (repeat = 0; repeat < 8; repeat++){
                  latd = scanner;
                  scanner = scanner << 1;
                  }

                  }
             latch = 1;
             latch = 0;

             }
  }
}

I would be so grateful for some help.
 

Hi alexan_e, thanks for the link but I already know how the register operates. I think the problem is my code, I'm having a hard time starting it all over again. I've been scratching my head for hours. I don't know if I will scan the led first or what. I hope you can direct me to the right way.
 

The ULN2003 controls the rows and the 74HC595 controls the columns.
To do the multiplexing you follow these steps

turn off all row
send to 74HC595 data of the column data for the first row
turn on first row and wait for a while
turn off all row
send to 74HC595 data of the column data for the second row
turn on second row and wait for a while
turn off all row
send to 74HC595 data of the column data for the third row
turn on third row and wait for a while
.....
turn off all row
send to 74HC595 data of the column data for the eighth row
turn on eighth row and wait for a while
restart from the top

Is this what you are asking?
 
hey alexan_e, I forgot to mention that I'm using portd in a scanning mode just like a johnson counter. On my way of redesigning my own, I discovered that there was a sort of mistake on the simulation's johnson counter. So I tried simulating again the diagram I got from the blog and somehow it worked but all the letters are not so clear. I guess there must still be something wrong on the codes. I know that it works fine on reality because the project maker showed his video but I guess there's still some way to improve the code for it to properly display in the simulation. Please anyone help me check it.

Here's a screen shot of it:


It is supposed to display "SCROLLING MESSAGE ON LED DOT-MATRIX DISPLAY FROM WWW.EMBEDDED-LAB.COM" but the letters just look messy. I would like to have a fix on it.
Here's the code:
Code:
/*
  Project: Scrolling message on LED dot matrix display
  MCU: PIC18F2550 @ 48.0 MHz (StartUSB for PIC board)
  Copyright @ Rajendra Bhatt
  May 16, 2011
*/

// Define LCD module connections.
/* sbit Serial_Data at LATC2_bit;
 sbit SH_Clk at LATC6_bit;
 sbit ST_Clk at LATC7_bit;
 sbit CD4017_Clk at LATA2_bit;
 sbit CD4017_RST at LATA1_bit;
  */
 sbit Serial_Data at RC2_bit;
 sbit SH_Clk at RC6_bit;
 sbit ST_Clk at RC7_bit;
 sbit CD4017_Clk at RA2_bit;
 sbit CD4017_RST at RA1_bit;

void send_data(unsigned int temp){
 unsigned int Mask = 0x0001, t, Flag;
  for (t=0; t<16; t++){
   Flag = temp & Mask;
   if(Flag==0) Serial_Data = 0;
   else Serial_Data = 1;
   SH_Clk = 1;
   SH_Clk = 0;
   Mask = Mask << 1;
  }
  // Apply clock on ST_Clk
  ST_Clk = 1;
  ST_Clk = 0;

}

/* CharData is a two dimensional constant array that holds the 8-bit column values of
   individual rows for ASCII characters that are to be displayed on a 8x8 matrix format.
*/
const unsigned short CharData[][8] ={
{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},    //space
{0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000000, 0b00000100},
{0b00001010, 0b00001010, 0b00001010, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
{0b00000000, 0b00001010, 0b00011111, 0b00001010, 0b00011111, 0b00001010, 0b00011111, 0b00001010},
{0b00000111, 0b00001100, 0b00010100, 0b00001100, 0b00000110, 0b00000101, 0b00000110, 0b00011100},
{0b00011001, 0b00011010, 0b00000010, 0b00000100, 0b00000100, 0b00001000, 0b00001011, 0b00010011},
{0b00000110, 0b00001010, 0b00010010, 0b00010100, 0b00001001, 0b00010110, 0b00010110, 0b00001001},
{0b00000100, 0b00000100, 0b00000100, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
{0b00000010, 0b00000100, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00000100, 0b00000010},
{0b00001000, 0b00000100, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000100, 0b00001000},
{0b00010101, 0b00001110, 0b00011111, 0b00001110, 0b00010101, 0b00000000, 0b00000000, 0b00000000},   //*
{0b00000000, 0b00000000, 0b00000100, 0b00000100, 0b00011111, 0b00000100, 0b00000100, 0b00000000},
{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000110, 0b00000100, 0b00001000},
{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00001110, 0b00000000, 0b00000000, 0b00000000},
{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000100},
{0b00000001, 0b00000010, 0b00000010, 0b00000100, 0b00000100, 0b00001000, 0b00001000, 0b00010000},
{0b00001110, 0b00010001, 0b00010011, 0b00010001, 0b00010101, 0b00010001, 0b00011001, 0b00001110},   //0
{0b00000100, 0b00001100, 0b00010100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00011111},
{0b00001110, 0b00010001, 0b00010001, 0b00000010, 0b00000100, 0b00001000, 0b00010000, 0b00011111},
{0b00001110, 0b00010001, 0b00000001, 0b00001110, 0b00000001, 0b00000001, 0b00010001, 0b00001110},
{0b00010000, 0b00010000, 0b00010100, 0b00010100, 0b00011111, 0b00000100, 0b00000100, 0b00000100},
{0b00011111, 0b00010000, 0b00010000, 0b00011110, 0b00000001, 0b00000001, 0b00000001, 0b00011110},
{0b00000111, 0b00001000, 0b00010000, 0b00011110, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
{0b00011111, 0b00000001, 0b00000001, 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00010000},
{0b00001110, 0b00010001, 0b00010001, 0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
{0b00001110, 0b00010001, 0b00010001, 0b00001111, 0b00000001, 0b00000001, 0b00000001, 0b00000001},  //9
{0b00000000, 0b00000100, 0b00000100, 0b00000000, 0b00000000, 0b00000100, 0b00000100, 0b00000000},
{0b00000000, 0b00000100, 0b00000100, 0b00000000, 0b00000000, 0b00000100, 0b00000100, 0b00001000},
{0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00001000, 0b00000100, 0b00000010, 0b00000001},
{0b00000000, 0b00000000, 0b00000000, 0b00011110, 0b00000000, 0b00011110, 0b00000000, 0b00000000},
{0b00010000, 0b00001000, 0b00000100, 0b00000010, 0b00000010, 0b00000100, 0b00001000, 0b00010000},
{0b00001110, 0b00010001, 0b00010001, 0b00000010, 0b00000100, 0b00000100, 0b00000000, 0b00000100},
{0b00001110, 0b00010001, 0b00010001, 0b00010101, 0b00010101, 0b00010001, 0b00010001, 0b00011110},
{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001},  //A
{0b00011110, 0b00010001, 0b00010001, 0b00011110, 0b00010001, 0b00010001, 0b00010001, 0b00011110},
{0b00000111, 0b00001000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00001000, 0b00000111},
{0b00011100, 0b00010010, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010010, 0b00011100},
{0b00011111, 0b00010000, 0b00010000, 0b00011110, 0b00010000, 0b00010000, 0b00010000, 0b00011111},
{0b00011111, 0b00010000, 0b00010000, 0b00011110, 0b00010000, 0b00010000, 0b00010000, 0b00010000},
{0b00001110, 0b00010001, 0b00010000, 0b00010000, 0b00010111, 0b00010001, 0b00010001, 0b00001110},
{0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001, 0b00010001},
{0b00011111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00011111},
{0b00011111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00010100, 0b00001000},
{0b00010001, 0b00010010, 0b00010100, 0b00011000, 0b00010100, 0b00010010, 0b00010001, 0b00010001},
{0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00011111},
{0b00010001, 0b00011011, 0b00011111, 0b00010101, 0b00010001, 0b00010001, 0b00010001, 0b00010001},
{0b00010001, 0b00011001, 0b00011001, 0b00010101, 0b00010101, 0b00010011, 0b00010011, 0b00010001},
{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
{0b00011110, 0b00010001, 0b00010001, 0b00011110, 0b00010000, 0b00010000, 0b00010000, 0b00010000},
{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010101, 0b00010011, 0b00001111},
{0b00011110, 0b00010001, 0b00010001, 0b00011110, 0b00010100, 0b00010010, 0b00010001, 0b00010001},
{0b00001110, 0b00010001, 0b00010000, 0b00001000, 0b00000110, 0b00000001, 0b00010001, 0b00001110},  //S
{0b00011111, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
{0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00001110},
{0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00001010, 0b00000100},
{0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010001, 0b00010101, 0b00010101, 0b00001010},
{0b00010001, 0b00010001, 0b00001010, 0b00000100, 0b00000100, 0b00001010, 0b00010001, 0b00010001},
{0b00010001, 0b00010001, 0b00001010, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
{0b00011111, 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00010000, 0b00010000, 0b00011111},  //Z
{0b00001110, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00001000, 0b00001110},
{0b00010000, 0b00001000, 0b00001000, 0b00000100, 0b00000100, 0b00000010, 0b00000010, 0b00000001},
{0b00001110, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00001110},
{0b00000100, 0b00001010, 0b00010001, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
{0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00011111},
{0b00001000, 0b00000100, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000},
{0b00000000, 0b00000000, 0b00000000, 0b00001110, 0b00010010, 0b00010010, 0b00010010, 0b00001111},  //a
{0b00000000, 0b00010000, 0b00010000, 0b00010000, 0b00011100, 0b00010010, 0b00010010, 0b00011100},
{0b00000000, 0b00000000, 0b00000000, 0b00001110, 0b00010000, 0b00010000, 0b00010000, 0b00001110},
{0b00000000, 0b00000001, 0b00000001, 0b00000001, 0b00000111, 0b00001001, 0b00001001, 0b00000111},
{0b00000000, 0b00000000, 0b00000000, 0b00011100, 0b00010010, 0b00011110, 0b00010000, 0b00001110},
{0b00000000, 0b00000011, 0b00000100, 0b00000100, 0b00000110, 0b00000100, 0b00000100, 0b00000100},
{0b00000000, 0b00001110, 0b00001010, 0b00001010, 0b00001110, 0b00000010, 0b00000010, 0b00001100},
{0b00000000, 0b00010000, 0b00010000, 0b00010000, 0b00011100, 0b00010010, 0b00010010, 0b00010010},
{0b00000000, 0b00000000, 0b00000100, 0b00000000, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
{0b00000000, 0b00000010, 0b00000000, 0b00000010, 0b00000010, 0b00000010, 0b00000010, 0b00001100},
{0b00000000, 0b00010000, 0b00010000, 0b00010100, 0b00011000, 0b00011000, 0b00010100, 0b00010000},
{0b00000000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00010000, 0b00001100},
{0b00000000, 0b00000000, 0b00000000, 0b00001010, 0b00010101, 0b00010001, 0b00010001, 0b00010001},
{0b00000000, 0b00000000, 0b00000000, 0b00010100, 0b00011010, 0b00010010, 0b00010010, 0b00010010},
{0b00000000, 0b00000000, 0b00000000, 0b00001100, 0b00010010, 0b00010010, 0b00010010, 0b00001100},
{0b00000000, 0b00011100, 0b00010010, 0b00010010, 0b00011100, 0b00010000, 0b00010000, 0b00010000},
{0b00000000, 0b00001110, 0b00010010, 0b00010010, 0b00001110, 0b00000010, 0b00000010, 0b00000001},
{0b00000000, 0b00000000, 0b00000000, 0b00001010, 0b00001100, 0b00001000, 0b00001000, 0b00001000},
{0b00000000, 0b00000000, 0b00001110, 0b00010000, 0b00001000, 0b00000100, 0b00000010, 0b00011110},
{0b00000000, 0b00010000, 0b00010000, 0b00011100, 0b00010000, 0b00010000, 0b00010000, 0b00001100},
{0b00000000, 0b00000000, 0b00000000, 0b00010010, 0b00010010, 0b00010010, 0b00010010, 0b00001100},
{0b00000000, 0b00000000, 0b00000000, 0b00010001, 0b00010001, 0b00010001, 0b00001010, 0b00000100},
{0b00000000, 0b00000000, 0b00000000, 0b00010001, 0b00010001, 0b00010001, 0b00010101, 0b00001010},
{0b00000000, 0b00000000, 0b00000000, 0b00010001, 0b00001010, 0b00000100, 0b00001010, 0b00010001},
{0b00000000, 0b00000000, 0b00010001, 0b00001010, 0b00000100, 0b00001000, 0b00001000, 0b00010000},
{0b00000000, 0b00000000, 0b00000000, 0b00011111, 0b00000010, 0b00000100, 0b00001000, 0b00011111},   //z
{0b00000010, 0b00000100, 0b00000100, 0b00000100, 0b00001000, 0b00000100, 0b00000100, 0b00000010},
{0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100, 0b00000100},
{0b00001000, 0b00000100, 0b00000100, 0b00000100, 0b00000010, 0b00000100, 0b00000100, 0b00001000},
{0b00000000, 0b00000000, 0b00000000, 0b00001010, 0b00011110, 0b00010100, 0b00000000, 0b00000000}    //~
};

unsigned int DisplayBuffer[]={0,0,0,0,0,0,0,0};
unsigned int speed;
short i, l, k, ShiftAmount, scroll, temp, shift_step=1, StringLength;
char message[]="SCROLLING MESSAGE ON LED DOT-MATRIX DISPLAY FROM WWW.EMBEDDED-LAB.COM ";
char index;
void main() {
 CMCON = 0x07;   // Disable comparators
 ADCON0 = 0x00; // Select ADC channel AN0
 ADCON1 = 0b00001110;  // RA0 as analog input
 TRISC = 0x00;
 TRISB = 0xFF;
 TRISA = 0x01;
 StringLength = strlen(message) ;
 do {
 for (k=0; k<StringLength; k++){
  for (scroll=0; scroll<(8/shift_step); scroll++) {
   for (ShiftAmount=0; ShiftAmount<8; ShiftAmount++){
    index = message[k];
    temp = CharData[index-32][ShiftAmount];
    DisplayBuffer[ShiftAmount] = (DisplayBuffer[ShiftAmount] << shift_step)| (temp >> ((8-shift_step)-scroll*shift_step));
   }

  speed = 5;
  for(l=0; l<speed;l++){

   for (i=0; i<8; i++) {

    send_data(DisplayBuffer[i]);
    CD4017_Clk = 1;
    CD4017_Clk = 0;
    Delay_ms(1);
   }  // i
  CD4017_Rst = 1;
  CD4017_Rst = 0;
  } // l
  } // scroll
 } // k

 } while(1);

}

I haven't modified yet the code and I just copied it from the maker.
 

good job on making the signboard but I would like to learn how to build this kind of circuit from the very start. You missed placing guide there and I can hardly read the site. I don't really like copying projects of others. That's why I'm troubleshooting the code that I've got from the blog so that after that I can trace it from the start all over again and then come up with my own design.
 

good job on making the signboard but I would like to learn how to build this kind of circuit from the very start. You missed placing guide there and I can hardly read the site. I don't really like copying projects of others. That's why I'm troubleshooting the code that I've got from the blog so that after that I can trace it from the start all over again and then come up with my own design.
The schematic is the very important information.
The flow program, alexan_e have give the guidance.
 

unfortunately I can't see clearly the schematic. Any clearer picture?
 

unfortunately I can't see clearly the schematic. Any clearer picture?
Contact me at my contact form **broken link removed** Tentang Saya
I give you the schematic in pdf version.
 
Last edited by a moderator:

I hope someone can explain this to me regarding about the process involved here. I'm trying to understand every line in the code so please bare with me.

Pointing at this statement:

Code:
temp = CharData[index-32][ShiftAmount];

assuming that the letter to be shifted is letter A and it's array is composed of this:

Code:
{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001}  //A

what is the value of temp?
temp = 0b00001110?
temp = 0b00010001?
temp = 0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001?
 

Contact me at my contact form **broken link removed** Tentang Saya
I give you the schematic in pdf version.

This is a place to help each other so I don't like people that share or help in private.
Why should anyone get in contact with you in order for you to provide the schematic?
You have already been contacted here, if you don't want to provide the schematic then don't but don't make request like this in the future.

Alex
 
Last edited by a moderator:

This is a place to help each other so I don't like people that share or help in private.
Why should anyone get in contact with you in order for you to provide the schematic?
You have already been contacted here, if you don't want to provide the schematic then don't but don't make request like this in the future.

Alex
I have give the free schematic in .jpg in my blog. Everyone can refer it. But the schematic is big, I can't give in high resolution.
I can give pdf file, so I need to know to who I give that. I don't want receive further question from strangers that I need to give support.
The thread starter have receive the clear schematic, then he/she can share it in attachment for free.
 

I hope someone can explain this to me regarding about the process involved here. I'm trying to understand every line in the code so please bare with me.

Pointing at this statement:

Code:
temp = CharData[index-32][ShiftAmount];

assuming that the letter to be shifted is letter A and it's array is composed of this:

Code:
{0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001}  //A

what is the value of temp?
temp = 0b00001110?
temp = 0b00010001?
temp = 0b00001110, 0b00010001, 0b00010001, 0b00010001, 0b00011111, 0b00010001, 0b00010001, 0b00010001?

CharData is a two dimensional array (**broken link removed**) , each value in your list represents one row of the display and they will be sequentially used in order to show character A (it doesn't look like an A but suppose it is).
ShiftAmount will take values from 0 to 7

0b00001110 <- this will be shown in row 1 (CharData[index-32][0])
0b00010001 <- this will be shown in row 2 (CharData[index-32][1])
0b00010001 <- this will be shown in row 3 (CharData[index-32][2])
0b00010001 <- this will be shown in row 4 (CharData[index-32][3])
0b00011111 <- this will be shown in row 5 (CharData[index-32][4])
0b00010001 <- this will be shown in row 6 (CharData[index-32][5])
0b00010001 <- this will be shown in row 7 (CharData[index-32][6])
0b00010001 <- this will be shown in row 8 (CharData[index-32][7])

Alex
 
OOOOOOOOO, suprer mod to the rescue eh
 

I see, thanks. Still assuming character A. My next question is this one:

Code:
DisplayBuffer[ShiftAmount] = (DisplayBuffer[ShiftAmount] << shift_step) | (temp >> ((8-shift_step)-(scroll*shift_step)));

assuming:
shiftamount = 0
scroll = 0

displaybuffer[0] = (00000000 00000000 << 1) or (00001110 >> ((8-1)-(0*1))
displaybuffer[0] = (00000000 00000000) or (00001110 >> 7)
displaybuffer[0] = (00000000 00000000) or (00001110 00000000 >> 7)
displaybuffer[0] = 00000000 00000000 or 00000000 00001110
displaybuffer[0] = 00000000 00001110

Is my displaybuffer[0] right eventhough my temp should be only just 1 byte?


I chopped every line to understand them and tried substituting the very first values when executed.
 
Last edited:

This any use?
[nealCode]
nWhichColumn = ((((yPos )/8) + srcColumn) &3);
nWhichColumn2 = ((((yPos )/8) + 1 + srcColumn) &3);
cTemp = bmap[c+xPos][nWhichColumn] >> (yPos);
cTemp |= bmap[c+xPos][nWhichColumn2] << (8-yPos);
[/nealCode]

If are you trying to scroll "sidways" (y for me!) I dont know if this is any use?
Regards
NEAL
 

from what I see in the code temp is a short variable that stores the value of one digit and then the other digit value is calculated and they are both combined in a two byte value (display_buffer is a two byte variable ) and send to the 74HC595 using the send_data function.

Alex
 

This any use?
[nealCode]
nWhichColumn = ((((yPos )/8) + srcColumn) &3);
nWhichColumn2 = ((((yPos )/8) + 1 + srcColumn) &3);
cTemp = bmap[c+xPos][nWhichColumn] >> (yPos);
cTemp |= bmap[c+xPos][nWhichColumn2] << (8-yPos);
[/nealCode]

If are you trying to scroll "sidways" (y for me!) I dont know if this is any use?
Regards
NEAL

I'm sorry I can't get it.

from what I see in the code temp is a short variable that stores the value of one digit and then the other digit value is calculated and they are both combined in a two byte value (display_buffer is a two byte variable ) and send to the 74HC595 using the send_data function.

Alex

Is my displaybuffer[0] correct?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top