User manual

LPCXpresso Experiment Kit - User’s Guide
Page 65
Copyright 2013 © Embedded Artists AB
Figure 36 Breadboard Connections for 7-segment Display
The same eight outputs are used as in the experiments with the 8 running LEDs, except for LED4 and
LED5:
LED1 (GPIO_4-LED-SSEL) corresponds to segment A
LED2 (GPIO_8-LED-SSEL) corresponds to segment B
LED3 (GPIO_9-LED-SSEL) corresponds to segment C
GPIO_36 controls segment D
GPIO_37 controls segment E
LED6 (GPIO_23-LED) corresponds to segment F
LED7 (GPIO_22-LED) corresponds to segment G
LED8 (GPIO_21-LED) corresponds to segment DP
Create a program that increment a digit, 0-9 each second. It shall roll-over to 0 when 9 is reached. Let
the dot LED light for 100 ms after an increment.
A suitable program structure is to create a subroutine that takes a number (0-9) as input and sets the
appropriate segment outputs for each input value.
As a variation to above, modify the code so that every time you press the push-button the number is
incremented.
Another variation is to create a program that creates a “running one” segment in a circular structure
(segment A->B->C->D->E->F->A, etc.).