Here are the tasks and smaller projects involving the 7-segment display. All three smaller tasks (projects) are briefly described.
This C and assembly code for a microcontroller enables displaying numbers on a 7-segment display. (Flowcode)
- Initialization: Configures necessary registers for operation.
- Number Display: Sets the initial value of
FCV_BROJ
to 0 and shows the current number on the display every second. - Counting Cycle: When the number reaches 9, it decrements to 0, then increments again.
The program continuously repeats this process. An interrupt routine is defined but not implemented.
This C and assembly code for a microcontroller implements a simple counter displayed on a 7-segment display.
- Initialization: Configures the necessary registers and sets the initial value of the counter (
FCV_BROJAC
) to 0. - Infinite Loop: Continuously displays the current value of the counter.
- Counting Logic: Increments the counter by 1 every second until it reaches 9, at which point it resets back to 0.
The program creates a simple up-counter that cycles between 0 and 9 on the 7-segment display.
This C and assembly code for a microcontroller implements an up/down counter displayed on a 7-segment display.
- Initialization: Sets the initial value of the counter (
FCV_BROJAC
) to 5 and configures button inputs for incrementing and decrementing the counter. - Infinite Loop: Continuously checks the state of two buttons (Up and Down):
- Up Button: Increments the counter by 1 each time the button is pressed, wrapping around to 0 when the counter exceeds 9.
- Down Button: Decrements the counter by 1 each time the button is pressed, wrapping around to 9 when the counter reaches 0.
- Display Update: The current counter value is shown on the 7-segment display after each button press.
This program allows for interactive counting within the range of 0 to 9, controlled by user input.
Figure 1 Segment Display showing digits from 0 to 9 and in reverse (Flowcode - Simulation)
Figure 2 Segment Display showing digits from 0 to 9 and in reverse, with display implementation of further counting (Display Counter)
Figure 3 Up/Down counter displayed on a 7-Segment Display (Flowcode)
Figure 4 Up/Down Counter displayed on a 7-Segment Display (Flowcode) simulation display