led

im making a 48x10 led display board using arduino duemilanove but code for 24x6 is available i want to extend it to 48x6 atleast plz tell me what are the changes to be made on the code
main problem to change code is data type 'long' do not support more than seven zeros after 1 in the constant(variable declared as long)

so please do reply

plz? Too much trouble to spell out a real word?

main problem to change code is data type 'long' do not support more than seven zeros after 1 in the constant

As a base 10 value, this might be true. You should not be using the variables in base 10 mode, but in base 2 mode, in which case this is not true.

code for 24x6 is available

I'm not going to bother looking. If you could be bothered to post a link, I would be more inclined to look at it.

how to change the base 10 mode to base 2 mode?

(Am I the only one who can't see the code?)

int latchPin = 10;
int clockPin = 13;
int dataPin = 11;
int clock = 9;
int Reset = 8;
int latchPinPORTB = latchPin - 8;
int clockPinPORTB = clockPin - 8;
int dataPinPORTB = dataPin - 8;
int i = 0;
int incomingByte[44];
long scrolling_word[6];
int array_turn=0;
byte patterns[100][6];
byte dummy_array[70][6] ={A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,SPACE,NUM0,NUM1,NUM2,NUM3,NUM4,NUM5,NUM6,NUM7,NUM8,NUM9,DEVIDE,TWODOTS,DOT,COMA,LINE,QUASTION,MARK,LA,LB,LC,LD,LE,LF,LG,LH,LI,LJ,LK,LL,LM,LN,LO,LP,LQ,LR,LS,LT,LU,LV,LW,LX,LY,LZ};
void setup(){
Serial.begin(9600);
pinMode(dataPin,OUTPUT);
pinMode(clockPin,OUTPUT);
pinMode(latchPin,OUTPUT);
pinMode(clock,OUTPUT);
pinMode(Reset,OUTPUT);
digitalWrite(Reset,HIGH);
digitalWrite(Reset,LOW);
setupSPI();
}

void display_word(int loops,byte word_print[][6],int num_patterns,int delay_langth){
i = 0;
for(int g=0;g<6;g++)
scrolling_word[g] = 0;
for(int x=0;x<num_patterns;x++){
for(int r=0;r<6;r++)
scrolling_word[r] |= word_print[x][r];
for (int z=0;z<6;z++){
for(int p=0;p<6;p++)
scrolling_word[p] = scrolling_word[p] << 1;
for(int t=0;t<delay_langth;t++){
for(int y=0;y<6;y++){
if(i == 6){
digitalWrite(Reset,HIGH);
digitalWrite(Reset,LOW);
i = 0;
}
latchOff();
spi_transfer(make_word(0x01000000,y));
spi_transfer(make_word(0x00010000,y));
spi_transfer(make_word(0x00000100,y));
latchOn();
delayMicroseconds(800);
latchOff();
spi_transfer(0);
spi_transfer(0);
spi_transfer(0);
latchOn();
digitalWrite(clock,HIGH);
digitalWrite(clock,LOW);
i++;
}
}
}
}
finish_scroll(delay_langth);
}

void finish_scroll(int delay_scroll){
for (int n=0;n<24;n++){
for(int h=0;h<6;h++)
scrolling_word = scrolling_word << 1;
for(int w=0;w<delay_scroll;w++){
for(int k=0;k<6;k++){
if(i == 6){
digitalWrite(Reset,HIGH);
digitalWrite(Reset,LOW);
i = 0;
}
latchOff();
spi_transfer(make_word(0x01000000,k));
spi_transfer(make_word(0x00010000,k));
spi_transfer(make_word(0x00000100,k));
latchOn();
delayMicroseconds(800);
latchOff();
spi_transfer(0);
spi_transfer(0);
spi_transfer(0);
latchOn();
digitalWrite(clock,HIGH);
digitalWrite(clock,LOW);
i++;
}
}
}
}
byte make_word (long posistion,byte turn){
byte dummy_word = 0;
for(int q=0;q<8;q++){
if(scrolling_word[turn] & (posistion<<q))
dummy_word |= 0x01<<q;
}
return dummy_word;
}
void loop() {
// send data only when you receive data:
if(Serial.available() > 0){
delay(100);
incomingByte[array_turn] = Serial.read();
array_turn++;
}
else{
if(array_turn != 0){
for(int az=0;az<array_turn;az++){
if((incomingByte[az] > 64 && incomingByte[az] < 91) || (incomingByte[az] > 96 && incomingByte[az] < 123)){
if(incomingByte[az] > 64 && incomingByte[az] < 91){
for(int lal=0;lal<6;lal++)
patterns[az][lal] = dummy_array[incomingByte[az] - 65][lal];
}
else{
for(int lal=0;lal<6;lal++)
patterns[az][lal] = dummy_array[incomingByte[az] - 53][lal];
}}
else{
switch(incomingByte[az]){
case 32://space
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[26][lol];
break;
case 33://mark
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[43][lol];
break;
case 45://line
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[41][lol];
break;
case 44://coma
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[40][lol];
break;
case 46://dot
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[39][lol];
break;
case 47://dvide
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[37][lol];
break;
case 48://0
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[27][lol];
break;
case 49://1
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[28][lol];
break;
case 50://2
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[29][lol];
break;
case 51://3
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[30][lol];
break;
case 52://4
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[31][lol];
break;
case 53://5
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[32][lol];
break;
case 54://6
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[33][lol];
break;
case 55://7
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[34][lol];
break;
case 56://8
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[35][lol];
break;
case 57://9
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[36][lol];
break;
case 58://tow dots
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[38][lol];
break;
case 63://quastion
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[42][lol];
break;
default:
for(int lol=0;lol<6;lol++)
patterns[az][lol] = dummy_array[26][lol];
break;
}
}
}
}
display_word(1,patterns,array_turn,15);
array_turn =0;
}
}

//display_word(1,patterns,43,15);// calls for the display_pattern function and says that int loop = 15(if you do more loop the pattern whould scrrol slower).
void latchOn(){
bitSet(PORTB,latchPinPORTB);
}
void latchOff(){
bitClear(PORTB,latchPinPORTB);
}
void setupSPI(){
byte clr;
SPCR |= ( (1<<SPE) | (1<<MSTR) ); // enable SPI as master
//SPCR |= ( (1<<SPR1) | (1<<SPR0) ); // set prescaler bits
SPCR &= ~( (1<<SPR1) | (1<<SPR0) ); // clear prescaler bits
clr=SPSR; // clear SPI status reg
clr=SPDR; // clear SPI data reg
SPSR |= (1<<SPI2X); // set prescaler bits
//SPSR &= ~(1<<SPI2X); // clear prescaler bits
delay(10);
}
byte spi_transfer(byte data)
{
SPDR = data; // Start the transmission
while (!(SPSR & (1<<SPIF))) // Wait the end of the transmission
{
};
return SPDR; // return the received byte, we don't need that
}

You've got a lot of RAM usage there - which processor are you using?

(when posting code, please use the # button on the editor's toolbar)

Also comments. Yeah, comments would be good. (and I don't mean the superfluous
case 49: // 1' variety)