Murugesh_89
Full Member level 5
Hi,
I am using 8 tricolor LED's in a PCB which obviously require 24 I/O pins. But i connect it as
a. All the anodes 1 of each LED are connected to one I/o pin
b. All the anodes 2 of each LED are connected to another I/o pin
c. All the anodes 3 of each LED are connected to another I/o pin
d. Channel 0 of decoder connected to cathode of Led 1 and so on as channel 7 of decoder connected to cathode of led 8
Hence i require only 6 I/O's as 3 for anodes and 3 for decoder channel select.
The code is as follows.
for(decoder_channel = 0;decoder_channel < 8;decoder_channel++)
{
select_channel_led(decoder_channel);
switch (led_status[decoder_channel])
{
case 0x00:
{
LED_OFF
select_channel_led(decoder_channel);
LED_OFF
delay_us(800);
break;
}
case 0x01:
{
LED_OFF
select_channel_led(decoder_channel);
RED_ON
delay_us(800);
break;
}
case 0x02:
{
LED_OFF
select_channel_led(decoder_channel);
BLUE_ON
delay_us(800);
break;
}
case 0x03:
{
LED_OFF
select_channel_led(decoder_channel);
GREEN_ON
delay_us(800);
break;
}
LED_OFF
}
}
The above is continues as the LEd's are refreshing.
But on doing this, i can not able to get the complete brightness of LED. LED looks some what dull.
What can i do so that i can get the full brightness of LED?
I am using 8 tricolor LED's in a PCB which obviously require 24 I/O pins. But i connect it as
a. All the anodes 1 of each LED are connected to one I/o pin
b. All the anodes 2 of each LED are connected to another I/o pin
c. All the anodes 3 of each LED are connected to another I/o pin
d. Channel 0 of decoder connected to cathode of Led 1 and so on as channel 7 of decoder connected to cathode of led 8
Hence i require only 6 I/O's as 3 for anodes and 3 for decoder channel select.
The code is as follows.
for(decoder_channel = 0;decoder_channel < 8;decoder_channel++)
{
select_channel_led(decoder_channel);
switch (led_status[decoder_channel])
{
case 0x00:
{
LED_OFF
select_channel_led(decoder_channel);
LED_OFF
delay_us(800);
break;
}
case 0x01:
{
LED_OFF
select_channel_led(decoder_channel);
RED_ON
delay_us(800);
break;
}
case 0x02:
{
LED_OFF
select_channel_led(decoder_channel);
BLUE_ON
delay_us(800);
break;
}
case 0x03:
{
LED_OFF
select_channel_led(decoder_channel);
GREEN_ON
delay_us(800);
break;
}
LED_OFF
}
}
The above is continues as the LEd's are refreshing.
But on doing this, i can not able to get the complete brightness of LED. LED looks some what dull.
What can i do so that i can get the full brightness of LED?