how to program LED lights

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I have connected 5 LED lights in my project, but I dont understand what should i write in my program to start LED lights. How to on and off those led lights. I attached the main.c file and picture of the project to give a idea what is my problem.

0 Likes
1 Solution
Yeshwanth_KT
Employee
Employee
50 replies posted 25 replies posted 10 likes received

Hi Rozoa,

Please read this application note on how to read and write data to pins: http://www.cypress.com/documentation/application-notes/an86439-psoc-4-using-gpio-pins

Brief Steps:

1) Place 5 GPIO pins on TopDesign schematics. Configure them as Strong drive.

2) Use *instanceName*_write(value) function to write "0" or "1" to the corresponding pins.

3) In the design wide resources map the pins to the actual physical pins on the board which connect to the LEDs.

Regards,

Yeshwanth

View solution in original post

2 Replies
Yeshwanth_KT
Employee
Employee
50 replies posted 25 replies posted 10 likes received

Hi Rozoa,

Please read this application note on how to read and write data to pins: http://www.cypress.com/documentation/application-notes/an86439-psoc-4-using-gpio-pins

Brief Steps:

1) Place 5 GPIO pins on TopDesign schematics. Configure them as Strong drive.

2) Use *instanceName*_write(value) function to write "0" or "1" to the corresponding pins.

3) In the design wide resources map the pins to the actual physical pins on the board which connect to the LEDs.

Regards,

Yeshwanth

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 hacked a simple sample for CY8CKIT-042.

On my shield 4 LEDs are mounted at D10, D11, D12, D13.

So I used RED LED on CY8CKIT-042 as LED0,

and other 4 for LED1 ~ LD4 to make 5 LEDs.

For other boards pin assignments needs to be changed.

moto

0 Likes