Counting on the 7-segment display
This experiment uses the push-button to increment the count on the 7-segment display. The count-value is stored in a file and this value is incremented by the program each time the push button is pressed. The count-value is used to look-up a table to pick up the display-value for the 7-segment display.
Additional experiments on the website include a count-down routine, a 00 to 99 counter using a single display and others.
The Table: The first value in a table is accessed when the Program Counter has an addition of “0” because it naturally increments to the next location in memory. In the routines below, the number if items in the table are counted and used to determine “end of table.” The reason is the jump-value is incremented before it is compared.
This experiment produces a binary count on the 8 LEDs. The output will always show the content of file 06. File 06 can be incremented, decremented, and shifted, etc just like any of the other files. The program increments the count in file 06 and shows it for 0.5sec, before incrementing to the next value. A files will show values in binary, from 00 to 127, making a total of 128 for each cycle of the file.
Binary Counting – up/down
This experiment counts up and down in binary. A push button reverses the count.
It is very interesting to see how a file increments and decrements. This will help you understand binary numbers. The numbers increment at 4 counts per second. At the same time you will see all combinations of segments on the 7-segment display.
For more detail: Counting on the 7-segment display
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days
Current Project / Post can also be found using:
- 4 digit 7 segment display program in pic using push button increments
- how to start counting 7segment using push button code proteus
- lool up table for seven segment display
- PIC16F628A 7 segment 1 digit count asm code