dsPIC memory problem

Discussion in 'Embedded Systems and Microcontrollers' started by mik3, Jun 8, 2011.

  1. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    Hello guys,

    I am working on a micromouse software and a strange problem appeared.

    There is an array declared as

    int Wall_North [82];

    During the simulation unexpected values appeared in this array, like 73, but only 0s and 1s shall be in the array. Note that the array is initialized to 0. Also, the micromouse does unexpected movements.

    After adding another array Test, which is not used in the algorithm-just shifts the memory locations of the Wall_North array, before the Wall_North it works fine.

    int Test [82];
    int Wall_North [82];

    Any ideas what can be the problem?
     
  2. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    Would need to see your program to give a sensible reply.
     
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605
    Another pointer out of bounds?
     
  4. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    I am not using pointers.
     
Loading...