Jump to content

Search the Community

Showing results for tags 'array'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • PIC Embedded Programming
    • BoostC and Chameleon compilers programming
    • BoostC porting source code
    • BoostC++ compiler programming
    • BoostBasic compiler programming
    • Assembler programming PIC
    • Novo RTOS Programming
    • Hardware PIC
    • Enhancement Requests
    • Bug Reports

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 3 results

  1. i try to include a 2 dimensional arrays in function calls to have functions doing some modifications to arrays. a very simple example to initialize the array is: unsigned char MATRIX[15][16]; void Init (unsigned char *myMATRIX) { unsigned char x,y; for (x=0;x<15;x++) { for (y=0;y<16;y++) { myMATRIX[x][y] = x+y; } } } void main (void) { Init(MATRIX); } i would expect that a memory area of 240 bytes would be reserved for the array variable MATRIX, and when calling the Init function, the start address of this memory range would be given to the Init function. then, the whole MATRIX would be initialized. fact is (same behaviour in simulator and on targed) that bytes from address 0x100 are written up to address 0x10f. then, instead of proceeding with address 0x110, it again writes to addresses 0x100 to 0x10f. addresses above 0x10f are never written. what am i doing wrong? i think my syntax isn't too bad ;-( thanx for your help!
  2. Hi, I use Boost C for PIC18 version 7.04 with a PIC18F67K22(128K FLASH, 4K SRAM). Question: 1. Is it possible to declare an array of integers with and index of over 256? e.g unsigned short Array[340]; 2. I used -idx 2 command in the build options, to increase the array index limit and I still get an error. Error: Array index size does not match linker '-idx' option. Expected:1 byte(s), while array index size of 2 byte(s) used in File: 'C:/Users/ Is there a way to use array index greater than 256? Thanks Bade
  3. Hi all Couldn't find a way to compute the size of a rom array. The sizeof operator worked fine with the array in RAM, but in rom, it returns the size of the pointer (2). I recon this is consistent with the sintax on the declaration for the rom array. But the point is that I couldn't find a way to get the the preprocessor to compute the size of the rom array. Is it not possible, or am I missing something? The code is the following // ***** DECLARATION **** // table with LED configurations for startup sequences rom char* init_led_seq_tbl = { // first sequence: led ping-pong twice 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00000100, 0b00000010, 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00000100, 0b00000010, 0b00000001, 0b00000000, // second sequence all LEDs on/off twice 0b00001111, 0b00000000, 0b00001111, 0b00000000, // third sequence "a" - "d" - "c" // values are doubled to slow presentation to half speed 0x0a, 0x0a, 0x0d, 0x0d, 0x0c, 0x0c, // LEDs off for 2 slots (end of initial LED sequences) 0x00, 0x00 }; // ***** USAGE **** void InitialLedSeqs(void) { for(unsigned char i=0; i<sizeof(init_led_seq_tbl); i++) { SET_LEDS(init_led_seq_tbl[i]); Delay_mS_16(LEDS_MAIN_DELAY); } // for(unsigned char i=0; i<sizeof(init_leds_tbl); i++) } // void InitialLedSeqs(void)
×