5. Trigger Implementation counter

Source: Internet
Author: User

In front of us about the door, relays, in fact, relays can have many aspects of the application, after electricity can be made of electronic buzzer and electric bell. It sounds incredible how the relays relate to these things. Relays are also known as double throw relays because there are two different outputs, one of which is power when the maintains is closed, and the other is a reverse device. And here we are similar to the reverse, but we connect the inputs and outputs of the relays together, that is, to practice a circuit, so we found a very wonderful phenomenon, that is, when the closed switch, the metal Reed will continue to vibrate up and down, making a shrill beep, this made a buzzer, on the metal Reed put a small hammer , and put a gong above it, so that the bell is made. We also refer to this circuit as an oscillator. Oscillators can form a periodically alternating sequence of 0,1, so the oscillator is also called a clock.

Feedback: The output of one door is connected to the input of another gate.

Trigger: There are two stable states when the switch is disconnected.

Triggers can hold some information, so for example, the multiple adder and counter mentioned below use triggers.

1.r-s triggers: This is the key to reset and set, when R=1, S=0, q=0, when S=1, r=0, Q=1, when the s=0,r=0, Q keep the original state, S=r=1, prohibit the state. The purpose is to remember which input is 1.

2. Data end-HOLD bit triggers: This is the predecessor of the D trigger, and similar to the R-s trigger, the data end is used only to transmit data, keep bits to save the previous data, when the retention bit is 0 o'clock, any input on the data side does not affect the output, when the retention bit is 1 o'clock, data input is output. To change the retention bit name, called the clock, is the D trigger.

Level trigger: When the retention bit is entered as a value, the trigger saves the data-side input value.

We call a stored trigger as a latch and a plurality of latches together, a multiple-bit latch, typically a 8-bit latch. Can be used to add multiple numbers.

If we introduce the 0-bit in the trigger, we only need a row of switches, we can achieve a number of additions, the implementation process is as follows:

1. First the data in the latch is zeroed.

2. Enter a number A, close the retention position, allowing the change of results. It must have been a+0 at first.

3. Then enter the second number B, then become a+b.

4. And so on, you can complete any number of additions.

With the level trigger, next we're going to talk about the edge trigger, edge trigger package appearance and level trigger is the same as the input and output are the same, but the clock is 1 and 0 o'clock, the data end will not affect the output, here we introduce the D-type edge trigger, he is a level two r-s trigger, At the moment when the clock signal changed from 0 to 1, the data at the end of the date was transmitted to the output. When the clock changed from 1 to 0 o'clock output does not change, so you can say that the frequency of the jump clock is output jump twice times, if by the output as a clock input to another D-type edge trigger, then the frequency will be halved, this method is called frequency. The following chart shows the results:

Clk:01010101

q1:00110011

q2:00001111

q3:00000000

Looking at each column from the bottom of the line, you can see that the first column is 0000, the second column is 0001, and the third is 0010. This is the incremental process of our binary number, so this can be used as a counter. We call the 8-bit traveling wave timer.

A more advanced counter is "parallel counters." All output can be read at the same time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.