Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Circuit design of digital clock
Circuit design of digital clock
According to the design tasks and requirements and the block diagram of digital electronic clock, modular design can be divided into the following parts.

1 .second pulse generator

Pulse generator is the core part of digital clock, and its accuracy and stability determine the quality of digital clock. Generally, pulses from a crystal oscillator are shaped and divided to obtain 1Hz second pulses. If the crystal oscillator is 32768 Hz, the pulse output of 1Hz can be obtained after frequency division by 1.5 times.

2. Counting decoding display

Seconds, minutes, hours and days are 60, 60, 24 and 7 respectively. Both seconds and minutes are 60, that is, 00 ~ 59 is displayed, the unit is decimal, and the number is hexadecimal. The time is 24-bit counter, and the display is 00 ~ 23. The unit is still decimal, and decimal is ternary, but when the decimal number reaches 2 and the unit number reaches 4, it is clear, so it is 24 bits.

Week is a hexadecimal number. According to people's general concept, the display date of a week is "day, 1, 2, 3, 4, 5, 6", so we should design this hexadecimal counter according to the decoded display state table, as shown in table 1. 1.

According to the table 1. 1, it is not difficult to design the circuit of "day" counter (instead of 8 days).

BCD-Seven-segment decoder is used to decode and display all counters, and the display is displayed with * * * negative display or * * * positive display.

Q4 Q3 Q2 Q 1

show

1 0 0 0

sun

0 0 0 1

1

0 0 1 0

2

0 0 1 1

three

0 1 0 0

four

0 1 0 1

five

0 1 1 0

six

Table 1. 1 status table

3. Timing circuit

When the power supply is just turned on, the day, hour, minute and second are all arbitrary values and need to be adjusted.

Put the switch in the manual position, and count the hours, minutes, seconds and days respectively. The counting pulse is input by single pulse or continuous pulse.

4. Time telling circuit

At that time, the counter needed to strike six seconds before the hour every time, which could be solved by decoding circuit. that is

When it is divided into 59, when the second counter reaches 54, the output delay high level opens the bass AND gate to make the chime ring five times at the frequency of 500Hz, until the second counter reaches 58, ending the high level pulse; When the second count reaches 59, it will drive the treble 1KHz frequency output and sing the sound of 1.

Verb (abbreviation for verb) reference circuit

The reference diagram of digital electronic clock logic circuit is shown in Figure 1.3.

Brief introduction of reference circuit

1 .second pulse circuit

The crystal oscillator 32768Hz is divided into 2Hz by the 14 frequency divider, and then the standard second pulse of 1Hz is obtained after the first frequency division, which is used for the clock counter.

2. Single pulse, continuous pulse

This is mainly used for manual time correction. If the switch K 1 is set at the end of single shooting, the day, hour, minute and second can be adjusted according to the single pulse. If K 1 is in single shot and K2 is in manual, press the single shot key at this time to make the week counter count from 1 to Sunday. If the switch K 1 is at the continuous end, calibration can be performed without pressing a single pulse. Monopulse and continuous pulse are composed of gate circuits.

3. Seconds, minutes, hours and days counters

This part of the circuit uses the medium-scale integrated circuit 74LS 16 1 to count seconds, minutes and hours, where seconds are divided into hexadecimal and hours are hexadecimal. From Figure 3, we can find that seconds and two sets of counters are exactly the same. When the count reaches 59, another pulse becomes 00, and then the count starts again. In the figure, "asynchronous zero clearing" is used to feed back to the /CR terminal, realizing the functions of decimal unit and hexadecimal unit.

The hour counter is hexadecimal. When it starts counting, the number is counted in decimal. When it reaches 23, another pulse should come, and it should return to "zero". So here, we should not only make the digits complete decimal counting, but also clear the counter when the high and low digits meet the number of "23". In the figure, the ten-digit "2" and the one-digit "4" are used and then cleared.

For the day counting circuit, it consists of four D flip-flops (JK flip-flops can also be used), and its logical function meets the table 1, that is, when the counter counts to 6, it will give another pulse, and Q4, Q3, Q2, Q 1 is set by the transient of 7, which is "1000", thus displaying ".

4. Decoding and displaying

Decoding and display are very simple, using * * cathode LED digital tube LC 5011-KLOC-0/1and decoder 74LS248. Of course, you can also use * * * anode digital tube and decoder.

1. Time on the hour

When you count to the first 6 seconds of an hour, you should be ready to tell the time. In fig. 3, when the score reaches 59,

When the seconds count to 54 seconds, set the sub-trigger QH to 1 and the second trigger QL to 1. Then, the sound of the woofer is controlled by combining QL with QH and then with the standard second signal of1s. Until 59 seconds, a reset signal is generated to clear QL to stop the whistle of the woofer, and at the same time, the inversion of the 59-second signal is combined with QH control. When counting from 59: 59 to 00: 00, every minute, the call ends and the hour ends.

2. Call circuit

The whistle circuit drives the horn to whistle through the high-low frequency OR gate drive transistor. 1 kHz

And 500Hz frequencies are approximately obtained from the crystal oscillator frequency divider. As shown in the figure, the output terminals Q5 and Q6 of the CD4060 frequency divider. The output frequency of Q5 is 1024Hz, and that of Q6 is 5 12Hz.