2020-04-18 05:24 AM
Hi I'm a student, I'm trying to program for the first time a SPC584B-DIS developer board. I'm trying to set 6 pin as GPIO because I want to control 6 switches by setting the voltage to 0V for close and to 5V for open but I can't figure out how to do it.
Solved! Go to Solution.
2020-05-05 06:25 AM
hello ,
You can configure the pin like GPIO
and use the code as below
pal_lld_togglepad(PORT_E, LED_4);
osalThreadDelayMilliseconds(300);
pal_lld_togglepad(PORT_A, LED_3);
osalThreadDelayMilliseconds(300);
pal_lld_togglepad(PORT_D, LED_5);
osalThreadDelayMilliseconds(300);
Best Regards
Erwan
2020-05-05 06:25 AM
hello ,
You can configure the pin like GPIO
and use the code as below
pal_lld_togglepad(PORT_E, LED_4);
osalThreadDelayMilliseconds(300);
pal_lld_togglepad(PORT_A, LED_3);
osalThreadDelayMilliseconds(300);
pal_lld_togglepad(PORT_D, LED_5);
osalThreadDelayMilliseconds(300);
Best Regards
Erwan
2020-05-06 06:18 AM
Thank you very much for the help
Ludovico