power consumption is not proportional

Hi everyone. I have a question regarding power consumption of an 8x8 led matrix.
Ok, so here’s the code:

#include <xc.h>
#include "dataTypes.h"

void main(void)
{
	OSCCONbits.IRCF0 = 1; // 8mhz osc
	ANSEL = 0;
	ANSELH = 0;
	TRISA=0x00;
	TRISC=0x00;
	TRISD=0x00;

	PORTA=0xff; // All anode(+) pins are High, so a row lights up.
	PORTC=0x00; // Selects which row to light up (comands the uln2803a circuit).


	while(1)
	{

	PORTC= 0xff;
/*
		for(int i = 0; i < 8 ; i++)
		{
			PORTC = 1<<i;
		}
	}
*/

}

I’m using an ulm2803a to sink the current to ground.
So here’s the problem:

If I light up a single row, my consumption is ~44mA. Now, if I light up ALL rows at once, my consumption is ~54mA and the led’s get dimmer. Why’s that? I’m not multiplexing them so the consumption should be 8*44mA, roughly 352mA. When I’m multiplexing them the current consumption is 44mA which is ok.

I can spot the problem immediately! :grinning:

No circuit diagram.

I’m not multiplexing them

You sure of that?

You're asking a question about PIC on the arduino forum? TRISA is PIC stuff, and that's not an arduino sketch.

And you haven't posted wiring diagram.