Freescale/NXP MPC5606B: GPIO Testing Program


TRK-MPC5606B
Here,
GPIO Output (LED1, LED2, LED3, LED4) and
GPIO Input (Switch1, Switch2, Switch3) on TRK-MPC5606B board are used to test GPIOs.




In this program,
Switch 1 Pressed   ->   LED1 ON otherwise OFF
Switch 2 Pressed   ->   LED2 ON otherwise OFF
Switch 3 Pressed   ->   LED3 ON otherwise OFF
LED4 is continuouslt toggling (Blinking)

Delay is generated using "for" loop only which is not the recommended way. (Delay in this program is not accurate delay.)




Problem Statement:To Test the GPIOs of the TRK-MPC5606B board using LEDs and Switches.

Connections:
LED No. => Port No. => Pad No. => Pin No.(144-pin LQFP package)LED1    => PE[4]    => PCR[68] => PIN 132
LED2    => PE[5]    => PCR[69] => PIN 133
LED3    => PE[6]    => PCR[70] => PIN 139
LED4    => PE[7]    => PCR[71] => PIN 140

SWITCH No. => Port No. => Pad No. => Pin No.(144-pin LQFP package)SWITCH1    => PE[0]    => PCR[64] => PIN 10
SWITCH2    => PE[1]    => PCR[65] => PIN 12
SWITCH3    => PE[2]    => PCR[66] => PIN 128
SWITCH4    => PE[3]    => PCR[67] => PIN 129


To change the time for which LED4 should be ON and OFF, Change the constant value from if condition
/************************************/
   if(i>1000000)
/************************************/

Downloads:
GPIO_Testing_TRK-MPC5606B_APDaga

Click here to see more codes for Freescale/NXP MPC56xx Family.

Feel free to ask doubts in the comment section. I will try my best to solve it.
If you find this helpful by any mean like, comment and share the post.
This is the simplest way to encourage me to keep doing such work.

Thanks and Regards,
-Akshay P. Daga
Post a Comment (0)
Previous Post Next Post