GPIO Assignments
GPIO Assignments
1. Write an ECP that blinks an Active-Low LED connected to GPIO pin P0.17 with a blink interval of 1
second.
2. Write an ECP that blinks 3 active-low LEDs connected to GPIO pins P0.17, P0.18 & P0.19 with a
blink interval of 500ms.
4. Write an ECP that will display active-low SWITCH pressed status on the active-low LED. When the
switch is pressed & hold then keep the led ON. Off the led when the switch is released.
5. Write an ECP that will blink an active-low led with a blink interval of 500ms when the active-low
switch is pressed & hold. Stop an LED blink when the switch is released.
6. Write an ECP that will turn on an active-low led when the switch is pressed twice in 1 second.
Note: Don’t take the action when the switch is pressed, after releasing a switch increment the count
& print the count on 3 leds.
7. Write an Embedded C Program (ECP) that will print a single char ‘A’ on the 16x2 Alphanumeric LCD.
9. Write an ECP to print the string 'Vector' on the first line and 'Institute' on the second line of the
alphanumeric LCD.
10. Write an ECP that will scroll the string 'VECTOR' circularly on the first line of the alphanumeric
LCD, with a 1-second scrolling interval.
11. Write an ECP to display the switch press count on the first line of the alphanumeric LCD, with a
maximum count of 59. After reaching 59, reset the count to 0 and repeat.
Note: The count should be displayed in two digits. For example, if the switch is pressed 2 times, the
LCD should display '02'.
12. Write an ECP to display the number of times the switch is pressed within 1 second.
Assume that the switch is pressed 3 times within 1 second. After 1 second, the count (3 in this case)
should be displayed on the LCD. The count should increment each time based on the last displayed
value. The 1-second time interval should start immediately after the switch is pressed.
13. Write an ECP to display given CGRAM symbols on the alphanumeric LCD.