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
We recommend EasyEDA for electronic circuit design.
From Schematic to PCB Production, Just Need One Tool
Free Circuit Design Software: learn to use Editor quickly and easily
Cheapest PCB: 10pcs 2-layers 10cm×10cm only $8.21, 3-day build time, 100% E-test
Current Project / Post can also be found using:
- segment display counting
- 7 segment push button controller
- HOW IS COUNTING IN PIC DISLLAYED
- lookup table in pic16f84a in assembly