Hello all,
I’ve multiplexed four 10 led bargraphs on a DOUT. The multiplexing process works but as I simulated a 16 bargraph sequence (only feeding the bargraphs on the 4 first steps of 16) I saw that the light is much lower than before.
The reason of this simulation is that I was planning to emmbed 16 bargraphs … but I want their light to be still visible !
Is this begavior normal ?
Here is the code :
// This function is called by MIOS before the shift register are loaded
void SR_Service_Prepare(void) __wparam
{
static unsigned char sr_ctr;
sr_ctr = ++sr_ctr & 0x0F;
switch(sr_ctr)
{
case 0 :
{
// Je sélectionne la row 1
MIOS_DOUT_PinSet0(LED_ROW1);
MIOS_DOUT_PinSet1(LED_ROW2);
MIOS_DOUT_PinSet1(LED_ROW3);
MIOS_DOUT_PinSet1(LED_ROW4);
break;
}
case 1 :
{
// Je sélectionne la row 2
MIOS_DOUT_PinSet1(LED_ROW1);
MIOS_DOUT_PinSet0(LED_ROW2);
MIOS_DOUT_PinSet1(LED_ROW3);
MIOS_DOUT_PinSet1(LED_ROW4);
break;
}
case 2 :
{
// Je sélectionne la row 3
MIOS_DOUT_PinSet1(LED_ROW1);
MIOS_DOUT_PinSet1(LED_ROW2);
MIOS_DOUT_PinSet0(LED_ROW3);
MIOS_DOUT_PinSet1(LED_ROW4);
break;
}
case 3 :
{
// Je sélectionne la row 4
MIOS_DOUT_PinSet1(LED_ROW1);
MIOS_DOUT_PinSet1(LED_ROW2);
MIOS_DOUT_PinSet1(LED_ROW3);
MIOS_DOUT_PinSet0(LED_ROW4);
break;
}
default :
{
// Je sélectionne aucune row
MIOS_DOUT_PinSet1(LED_ROW1);
MIOS_DOUT_PinSet1(LED_ROW2);
MIOS_DOUT_PinSet1(LED_ROW3);
MIOS_DOUT_PinSet1(LED_ROW4);
break;
}
}
MIOS_DOUT_SRSet(7,255);
MIOS_DOUT_PinSet1(LED_BG9);
MIOS_DOUT_PinSet1(LED_BG10);
}
Thanks for help !!
Olivier