0% found this document useful (0 votes)
8 views

GPIO Assignments

Assignment

Uploaded by

raj371860
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

GPIO Assignments

Assignment

Uploaded by

raj371860
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Assignments on GPIO

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.

3. Implement LEDs shifting pattern as per given logic.

Note: Blink & shifting interval should be 500ms.

1st Pattern (Try this prog execution on Rhydolabz/Vector’s LPC2129 boards)

2nd Pattern (Try this prog execution on Rhydolabz/Vector’s LPC2129 boards)


3rd Pattern (Try this prog execution on Rhydolabz/Vector’s LPC2129 boards)

4th Pattern (Try this prog execution on Vector’s LPC2129 board)


5th Pattern (Try this prog execution on Vector’s LPC2129 board)

6th Pattern (Try this prog execution on Vector’s LPC2129 board)


7th Pattern (Try this prog execution on Vector’s LPC2129 board)

8th Pattern (Try this prog execution on Vector’s LPC2129 board)


9th Pattern (Try this prog execution on Vector’s LPC2129 board)

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.

Connections: LED is connected to P0.17 & SWITCH is connected to P0.14.

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.

Connections: LED is connected to P0.17 & SWITCH is connected to P0.14.

6. Write an ECP that will turn on an active-low led when the switch is pressed twice in 1 second.

Off the led when the switch is pressed once in 1 second.

Connections: LED is connected to P0.17 & SWITCH is connected to P0.14.


6. Write an ECP that will print active-low switch pressed count on three active-low leds.

Refer the given image for more details.

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.

Note: Use 4bits mode of alphanumeric LCD.

Connections: P1.17, P1.18 & P1.19 are RS, RW & EN

P1.20, P1.21, P1.22 & P1.23 are D4, D5, D6, D7


8. Write an ECP to print the letters 'A' to 'Z' one by one in the same position on the alphanumeric
LCD, with an interval of 1 second between each letter. After printing 'Z', repeat the process.

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.

You might also like