That is the point where random led lights will come on and off.
Sometimes the processor will completely reset.
Are you driving LEDs ? If so, what's the value of the series resistors
connected between each PIC pin and the LEDs ? Describe the external
circuits.
Also post if you have a pull-up resistor on MCLR. What is the value ?
Do you have 100 nF (0.1 uF) ceramic bypass caps on the Vdd pins
to ground ? (close to the PIC's Vdd pins).
What are you using for a voltage regulator for the board ? Is the
voltage drooping down as you turn on more and more LEDs (so much
so that the PIC resets) ?
Quote:
static int8 msg[85] = {0};
case 8:
msg[4] = received;
You're only using locations 0-4 in the 'msg' array. Why is it set to 85
bytes ? It's extending into the common area of bank 0, which starts at
address 0x70. The compiler likes to use that area for its variables.
I'm not saying the compiler can't compensate and move its common
area up a bit, but you're pushing it. When things start behaving in a
weird manner, it's best not to 'push' things. Back off everything to
a baseline level. Make everything be nominal. Reduce the size of
that array.
bignick270
Joined: 11 Sep 2008 Posts: 44
Posted: Wed Nov 12, 2008 4:51 pm
You're exactly right it was that the array was too large and it was in used memory locations...that was why it was resetting.
The memory map from the datasheet for the 886 lead me to believe there was 96 bytes starting at 0x20 but apparently there is only 80 bytes and it goes from 0x20 to 0x6F.
All times are GMT - 6 Hours Goto page Previous1, 2
Page 2 of 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum