Homemade 100-base addition and subtraction counting circuit
Source: InternetPublisher:笑流年 Keywords: Counting circuit Updated: 2024/10/25
The circuit structure is shown in the figure, which is mainly composed of crystal oscillator circuit, frequency division circuit, control circuit, counting circuit, decoding circuit, digital tube display and other parts.
How it works
1. Oscillation and frequency division: The crystal oscillator X1 and the NOT gate circuit inside the integrated circuit ICl (4060) jointly generate a 32768Hz square wave signal. After being divided by 214 by IC1, a square wave signal with a frequency of 2Hz is output from the 13th pin of IC1. After being divided once by IC2 (integrated trigger 74LS73), a square wave signal with a frequency of 1Hz is output as the counting pulse of the counter, which is sent to the units counter IC4 for counting.
R1 in the oscillation circuit is a feedback resistor; its larger value (10MΩ) is conducive to improving the stability of the oscillation frequency. Capacitors C1, C2 and the crystal form a resonant network to control the oscillation frequency and provide a 180-degree phase shift, thereby forming a positive feedback network with the NOT gate inside IC1 to meet the oscillation conditions and enable the oscillation circuit to work normally.
2. Counting: The counting circuit consists of two 74LS190 (IC4, IC5) to count the ones and tens.
Pin 13 of IC4 (carry output/borrow output) is connected to pin 14 of IC5 (count pulse input), completing the function of carry or borrow from the ones digit to the tens digit.
3. Decoding and display: This part of the circuit consists of two 74LS48 (IC6, IC7) and two digital tubes. IC6 decodes and drives the 8421BCD code output by the ones-digit counting circuit, and the digital tube displays it. IC7 decodes and drives the 8421BCD code output by the tens-digit counting circuit, and the digital tube displays it.
4. Control circuit: It is mainly composed of three buttons SB1, SB2, SB3 and a double JK trigger 74LS73.
① Addition count control: At the moment of power-on, since the voltage across capacitor C4 cannot suddenly change to 0, CLR of IC3A and IC3B is 0, so the two triggers are cleared, that is, 1Q=2Q=0, 1Q=2Q=1, 2Q=0 is sent to the CLR terminal of IC2 to clear it. At this time, IC2 has no counting pulse output to the counter 74LS190, and because Q (inverse) of IC3B is 1, the signal is sent to the enable control terminal (CTEN) of 74LS190, and the counter works in the hold state. Therefore, after power-on, the digital display remains unchanged. Press SB2 again, LOAD of IC4 and IC5 becomes low level, making IC4 and IC5 in parallel input state. At the same time, because A=D=U/D=O, B=C=O, QA=QB=QC=QD=O of IC4 and IC5, so the display is 00 (set to O). Press SB3 (start) again to make IC3B get a falling pulse, then IC3B output flips from 0 to 1, making IC2 output count pulse and send it to IC4. At the same time, because Q (reverse) of IC3B turns to 0, CTEN of IC4 and IC5=0. At this time, although C4 becomes high level after charging, IC3A has no falling pulse trigger, so its Q remains 0, then U/D=0, so IC4 and IC5 start to count. From the cascade relationship of IC4 and IC5, it can be seen that the carry output signal of IC4 is used as the counting pulse of IC5, so when the unit digit counts to 9, the rising edge of the tenth CP pulse arrives. RCO/BO has a carry pulse output to the tens place, and the counting starts from the tens place. When the count reaches 99, when the 100th pulse arrives, the digital display is 00, completing a 100-base addition counting function.
During the counting process, if you want to stop counting, press SB3 again to make IC3B get a falling pulse, and its output terminal Q flips to 0, Q (inverse) = 1, then CTEN of IC4 and IC5 = 1, then the counter stops counting and is in the holding state, press SB3 again, and continue counting to realize the pause/start function.
② Subtraction count control: After power on, due to the action of C4, IC3A, IC3B, and IC2 are cleared. Press SB1 again, D1 is turned on. Because C3 is very small and discharges quickly, the LOAD terminals of IC4 and IC5 become low level, and they are in parallel input state. At the same time, IC3A is triggered, Q changes from 0 to 1, then A=D=U/D=1, B=C=O (grounded), so QAQBQCQD=1001, the digital is decoded and driven, and 99 (set to 9) is displayed. Press SB3 again (start subtraction count) and IC3B is triggered to flip, Q changes from 0 to 1, IC2 works, outputs counting pulses, and Q changes from 1 to 0, so CTEN=0 of IC4 and IC5, then the count number starts to subtract. If you need to pause, just press SB3. From the cascade relationship, it can be seen that the thirteenth pin of IC4 outputs a borrow pulse signal.
③ Mutual conversion control of addition and subtraction counting: If the original addition counting is to be switched to subtraction counting, press SB1 once, then the Q end of IC3A will flip from 0 to 1, then A=D=U/D=1, and LOAD=0, then the digital tube will be reset to 99, press SB3 again to start subtraction counting, and vice versa.
④ Protection circuit: Capacitor C3 is connected to prevent the trigger IC3A from flipping due to delay after triggering, and the low level of LOAD end of IC4 and IC5 disappears quickly with the reset of the button, resulting in not setting 00 or 99. After C3 is connected, after SB1 and SB2 are reset, but because C3 needs a period of time to charge, LOAD is kept at a low level for a period of time, waiting for the delayed flipping of IC3A to prevent competition risks. Diodes D1 and D2 play an isolation role to avoid mutual interference when pressing SB1 or SB2 or mutual interference between integrated circuits.
5. Indicator circuit: LED is an addition and subtraction counting indicator light. When it is used for addition counting, the LED lights up, and when it is used for subtraction counting, the LED does not light up.
Main components
IC1 is a 4060 as a frequency divider, IC2 and IC3 are two 74LS73s, IC4 and IC5 are two 74LS190s as counters, IC6 and IC7 are two 74LS48 decoders, and the display is two common cathode digital tubes.
From the above analysis, we can know that this circuit can be used for addition counting or subtraction counting, and can be used in digital display circuits or countdown occasions. By making this circuit, it will help and improve those who love digital display circuit design and production.
- Causes and solutions for noise in digital Class D amplifiers
- RC filter explained in detail
- Working principle/characteristics/application fields/equivalent circuit of unijunction transistor
- Common electrical circuits: frequency-selective (bandpass) amplifier circuit
- Digital number selection machine
- NE5532 standard linear preamplifier IC circuit features and application schematics
- Odd-frequency counter with symmetrical output waveform (μL9020)
- Sine wave divider (μA747, μA795)
- Method for obtaining second reference signal using CMOS pointer-type quartz electronic clock integrated circuit
- Environmentally friendly and energy-saving LED AC/DC dual-purpose lamp
- Photoelectric towel counting circuit
- Counting circuit composed of transistors
- Revolution or pitch counting circuit
- Grain pest detection alarm circuit counting circuit
- Universal counting circuit
- Mileage-fuel consumption counting circuit
- Four and a half digit LED counting circuit
- Finished pen tip counting circuit
- Calculator used as counting circuit
- Multifunctional frequency counting circuit