PSoC4 LED Dirver 8COMx7SEG

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
FUHU_4360921
Level 1
Level 1
First like received

Dear Sir,

I use CYBL10573 to driver LED matrix 8COM x 7 SEG, but I only find there are LCD Driver for 4COM, what is better way to driver the LED matrix?

pastedImage_0.png

Thanks!

kwan

0 Likes
1 Solution

Hi Moto,

Thanks for your help! I put the code into 1khz interrupt routine, it work well,

void led_1khz_func(void)

{

  uint8_t vdd;

   

    led_gnd_off(led_timer++);           

    led_timer%=LED_GND_NUM;

    vdd = gd_led_matrix[led_timer];

    LED_PA_Write((vdd&0x01)?LED_VDD_ON:LED_VDD_OFF);

    LED_PB_Write((vdd&0x02)?LED_VDD_ON:LED_VDD_OFF);

    LED_PC_Write((vdd&0x04)?LED_VDD_ON:LED_VDD_OFF);

    LED_PD_Write((vdd&0x08)?LED_VDD_ON:LED_VDD_OFF);

    LED_PE_Write((vdd&0x10)?LED_VDD_ON:LED_VDD_OFF);

    LED_PF_Write((vdd&0x20)?LED_VDD_ON:LED_VDD_OFF);

    LED_PG_Write((vdd&0x40)?LED_VDD_ON:LED_VDD_OFF);

    LED_PH_Write((vdd&0x80)?LED_VDD_ON:LED_VDD_OFF);

    led_gnd_on(led_timer);   

  }

}

I am still looking for some hardware solution instead of the software interrupt to occupy the CPU resource!

Thanks!

kwan

View solution in original post

3 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I wrote a couple of 7SEG LED samples for PSoC 4,

although the numbers of COM x SEG are different

I hope that they could be a starting point sample.

https://community.cypress.com/message/191467

https://community.cypress.com/thread/45701

moto

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I just tailored the second sample for 8 coms without UART type.

I only confirmed that this project is compile-able,

but as I don't have a hardware with this PSoC(PRoC?),

I could not have tested it.

And also I have not assigned any particular pins, so please assign pin according to your hardware.

The schematic is now

000-schematic.JPG

moto

0 Likes

Hi Moto,

Thanks for your help! I put the code into 1khz interrupt routine, it work well,

void led_1khz_func(void)

{

  uint8_t vdd;

   

    led_gnd_off(led_timer++);           

    led_timer%=LED_GND_NUM;

    vdd = gd_led_matrix[led_timer];

    LED_PA_Write((vdd&0x01)?LED_VDD_ON:LED_VDD_OFF);

    LED_PB_Write((vdd&0x02)?LED_VDD_ON:LED_VDD_OFF);

    LED_PC_Write((vdd&0x04)?LED_VDD_ON:LED_VDD_OFF);

    LED_PD_Write((vdd&0x08)?LED_VDD_ON:LED_VDD_OFF);

    LED_PE_Write((vdd&0x10)?LED_VDD_ON:LED_VDD_OFF);

    LED_PF_Write((vdd&0x20)?LED_VDD_ON:LED_VDD_OFF);

    LED_PG_Write((vdd&0x40)?LED_VDD_ON:LED_VDD_OFF);

    LED_PH_Write((vdd&0x80)?LED_VDD_ON:LED_VDD_OFF);

    led_gnd_on(led_timer);   

  }

}

I am still looking for some hardware solution instead of the software interrupt to occupy the CPU resource!

Thanks!

kwan