help in pic877a with 2d array ...

Discussion in 'Embedded Systems and Microcontrollers' started by RRITESH KAKKAR, Jan 23, 2013.

  1. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi,

    I need your help while making programing for font in LEd matrix......
    so, 1D array is working fine
    Code ( (Unknown Language)):
    1. int a[5]={0xc,0x2,0x5,0x8,0A};
    while 2D array is always showing error.(Synatx and {/ ;}

    Code ( (Unknown Language)):
    1. int a[2][5]={
    2. {0xc,0x2,0x5,0x8,0A, }
    3. {0xc,0x2,0xa,0x8,0b, }
    4. };
    5.  
    please help me with a hint how to use 2D array...in MPlab 8.77
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Try this:
    Code ( (Unknown Language)):
    1. int a[2][5]={
    2.             {0xc,0x2,0x5,0x8,0A},
    3.             {0xc,0x2,0xa,0x8,0b}
    4.             };
     
  3. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Actually, I am have to read the data from array..
    so, i need to read it by selecting from row and column.
    int a[0][0]= PORTB;
    doing like this will work or not??
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
  5. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    I have solved that silly problem missing ,
    I was initializing font through it but only few were saved because of memory space was near to full 89.9%
    so, i watched program spaced and EEPROM was empty!! how to use it??
     
Loading...