Skip to content

Latest commit

 

History

History
92 lines (60 loc) · 3.7 KB

File metadata and controls

92 lines (60 loc) · 3.7 KB

Seven-Segment-Display-PIC16F877A

Here are the tasks and smaller projects involving the 7-segment display. All three smaller tasks (projects) are briefly described.

Microcontroller - 7 - Segment Display the digits from 0 to 9 and in reverse

This C and assembly code for a microcontroller enables displaying numbers on a 7-segment display. (Flowcode)

Features

  • 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.


7-Segment Display Counter (0-9)

This C and assembly code for a microcontroller implements a simple counter displayed on a 7-segment display.

Functionality

  • 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.


7-Segment Display Up/Down Counter With Up and Down Buttons

This C and assembly code for a microcontroller implements an up/down counter displayed on a 7-segment display.

Functionality

  • 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.


User Interface Examples

seg1
Figure 1 Segment Display showing digits from 0 to 9 and in reverse (Flowcode - Simulation)



seg2
Figure 2 Segment Display showing digits from 0 to 9 and in reverse, with display implementation of further counting (Display Counter)



rucno1
Figure 3 Up/Down counter displayed on a 7-Segment Display (Flowcode)



ruc2
Figure 4 Up/Down Counter displayed on a 7-Segment Display (Flowcode) simulation display


🧰 Languages & Tools