Search This Blog

Monday, March 12, 2012

Tutorial for Basic Flip Flop Applications





JK Flip-Flops


The J-K Flip-Flop

A very common form of flip-flop is the J-K flip-flop. It is unclear, historically, where the name "J-K" came from, but it is generally represented in a black box like this:




In this diagram, P stands for "Preset," C stands for "Clear" and Clk stands for "Clock." The logic table looks like this:

PCClk
JKQQ'
111-to-0
1010
111-to-0
0101
111-to-0
11
Toggles
10X
XX01
01X
XX10



Here is what the table is saying: First, Preset and Clear override J, K and Clk completely. So if Preset goes to 0, then Q goes to 1; and if Clear goes to 0, then Q goes to 0 no matter what J, K and Clk are doing. However, if both Preset and Clear are 1, then J, K and Clk can operate. The 1-to-0 notation means that when the clock changes from a 1 to a 0, the value of J and K are remembered if they are opposites. At the low-going edge of the clock (the transition from 1 to 0), J and K are stored. However, if both J and K happen to be 1 at the low-going edge, then Q simply toggles. That is, Q changes from its current state to the opposite state.
You might be asking yourself right now, "What in the world is that good for?" It turns out that the concept of "edge triggering" is very useful. The fact that J-K flip-flop only "latches" the J-K inputs on a transition from 1 to 0 makes it much more useful as a memory device. J-K flip-flops are also extremely useful in counters (which are used extensively when creating a digital clock). Here is an example of a 4-bit counter using J-K flip-flops:




The outputs for this circuit are A, B, C and D, and they represent a 4-bit binary number. Into the clock input of the left-most flip-flop comes a signal changing from 1 to 0 and back to 1 repeatedly (an oscillating signal). The counter will count the low-going edges it sees in this signal. That is, every time the incoming signal changes from 1 to 0, the 4-bit number represented by A, B, C and D will increment by 1. So the count will go from 0 to 15 and then cycle back to 0. You can add as many bits as you like to this counter and count anything you like. For example, if you put a magnetic switch on a door, the counter will count the number of times the door is opened and closed. If you put an optical sensor on a road, the counter could count the number of cars that drive by.
Another use of a J-K flip-flop is to create an edge-triggered latch, as shown here:




In this arrangement, the value on D is "latched" when the clock edge goes from low to high. Latches are extremely important in the design of things like central processing units (CPUs) and peripherals in computers.

Thursday, March 8, 2012

D Flip-Flop



The edge-triggered D flip-flop is easily derived from its RS counterpart. The only requirement is to replace the R input with an inverted version of the S input, which thereby becomes D. This is only needed in the master latch section; the slave remains unchanged.

One essential point about the D flip-flop is that when the clock input falls to logic 0 and the outputs can change state, the Q output always takes on the state of the D input at the moment of the clock edge. This was not true of the RS and JK flip-flops. The RS master section would repeatedly change states to match the input signals while the clock line is logic 1, and the Q output would reflect whichever input most recently received an active signal. The JK master section would receive and hold an input to tell it to change state, and never change that state until the next cycle of the clock. This behavior is not possible with a D flip-flop.

The edge-triggered D NAND flip-flop is shown below.


Wednesday, March 7, 2012

Seven segments


This are the different parts of single LED.

7 Segment LEDs




     
       The seven-segment LED display has four individual digits, each with a decimal point. Each of the seven segments (and the decimal point) in a given digit contains an individual LED. When a suitable voltage is applied to a given segment LED, current flows through and illuminates that segment LED. By choosing which segments to illuminate, any of the nine digits can be shown. For example, as shown in the figure below, a 2 can be displayed by illuminating segments a, b, d, e, and g.




       Seven segment displays come in two varieties - common anode (CA) and common cathode (CC). In a CA display, the anodes for the seven segments and the decimal point are joined into a single circuit node. To illuminate a segment in a CA display, the voltage on a cathode must be at a suitably lower voltage (about .7V) than the anode. In a CC display, the cathodes are joined together, and the segments are illuminated by bringing the anode voltage higher than the cathode node (again, by about .7V). The Digilab board uses CA displays.
       The seven LEDs in each digit are labelled a-g. Since the Digilab board uses CA displays, the anodes for each of the four digits are connected in a common node, so that four separate anode circuit nodes exist (one per digit). Similar cathode leads from each digit have also been tied together to form seven common circuit nodes, so that one node exists for each segment type. These four anode and seven cathode circuit nodes are available at the J2 connector pins labelled A1-A4 and CA-CG. With this scheme, any segment of any digit can be driven individually. For example, to illuminate segments b and c in the second digit, the b and c cathode nodes would be brought to a suitable low voltage (by connecting the corresponding circuit node available at the J2 connector to ground), and anode 2 would be brought to a suitable high voltage (by connecting the corresponding circuit node available at the J2 connector to Vdd).











This site will help you to understand more about SEVEN SEGMENT LED.

555 timer

555 Timer





     The 555 Timer IC is an integrated circuit (chip) implementing a variety of timer and multivibratorapplications. The IC was designed by Hans R. Camenzind in 1970 and brought to market in 1971 bySignetics (later acquired by Philips). The original name was the SE555 (metal can)/NE555 (plastic DIP) and the part was described as "The IC Time Machine. It has been claimed that the 555 gets its name from the three 5  resistors used in typical early implementations, but Hanz Camenzind has stated that the number was arbitrary. The part is still in wide use, thanks to its ease of use, low price and good stability. As of 2003, it is estimated that 1 billion units are manufactured every year.
     Depending on the manufacturer, the standard 555 package includes over 20 transistors, 2 diodes and 15resistors on a silicon chip installed in an 8-pin mini dual-in-line package (DIP-8). Variants available include the 556 (a 14-pin DIP combining two 555s on one chip), and the 558 (a 16-pin DIP combining four slightly modified 555s with DIS & THR connected internally, and TR falling edge sensitive instead of level sensitive).


buy me!

DOCTRONICS Safety Lights construction kit


Here is the circuit on prototype board:


Use the design formula, or component selector program to calculate the frequency of pulses you would expect to obtain with this circuit. Monitor the output pulses with an oscilloscope to check that your calculation is correct.
In an electronic die, provided the output pulses are fast enough, it is impossible to 'cheat' by holding down the button for a definite length of time. This is the circuit used in the DOCTRONICS electronic die construction kit:

Think about how you could use this circuit together with a bistable as part of a burglar alarm. Under normal conditions, the output of the bistable is LOW and the astable is stopped. If the alarm is triggered, the output of the bistable goes HIGH and the pulses start, sounding the alarm.




Pin connections






555 timer 

     is an extremely versatile integrated circuit which can be   used to build lots of different circuits. You can use the 555 effectively without understanding the function of each pin in detail.

   Frequently, the 555 is used in astable mode to generate a continuous series of pulses, but you can also use the 555 to make a one-shot or monostable circuit. The 555 can source or sink 200 mA of output current, and is capable of driving wide range of output devices.





TOP
                  555 Timing:  Ra Rb





Duty Cycle >50% 




  Normally the 555 timer is unable to produce a duty cycle of 50% or less. This is due to the fact that the first half of the cycle both Ra and Rb determine the charging interval (T1); where Rb alone determines the discharge interval (T2).



Duty Cycle <50%
  To allow a Duty Cycle of 50% or less, a Diode D1 is placed in parallel with Rb such that during the charging cycle (T1) Rb is bypassed. This allows Ra and Rb to act independently, allowing a duty cycle of nearly 0% to nearly 100%.









                   Triggering of a 555























    The Triggering process starts when the negative differentiated pulse edge "dips" below 1/3 Vcc, the capacitor starts charging.If the trigger is held below 1/3 Vcc longer than the charge time, the output will remain high even though the capacitor charging cycle is complete; and then only goes low when the trigger rises above 1/3 Vcc. It can be seen, therefore, that it is desirable to have the negative going trigger pulse to be shorter than the charge time. 










This site/ link below will help you to construct a circuit consist of 555 timer.











Monday, March 5, 2012

Logic Gates


   Logic gates
          process signals which represent true or false. Normally the positive supply voltage +Vs represents true and 0V represents false. Other terms which are used for the true and false states are shown in the table on the right. It is best to be familiar with them all.
          Gates are identified by their function: NOTANDNANDORNOREX-OR and EX-NOR. Capital letters are normally used to make it clear that the term refers to a logic gate.



   TRUTH TABLE
         are used to help show the function of a logic gate. If you are unsure about truth tables and need guidence on how go about drawning them for individual gates or logic circuits then use the truth tablesection link.




Basic Logic Gates


OR GATE
OR gate symbol

Truth Table


The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high.  A plus (+) is used to show the OR operation.




AND GATE
AND gate symbol

An AND gate can have two or more inputs, its output is true if all inputs are true.





NOT GATE




NOT gate symbol

Truth Table
A logical inverter , sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state. 







NOR GATE
 NOR gate symbol





Truth Table



   The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if both inputs are "false." Otherwise, the output is "false.




NAND GATE
NAND gate symbol




Truth Table

    The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true."




EXOR gate

           
EXOR gate symbol 

Truth table 

The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two inputs are high.  An encircled plus sign () is used to show the EOR operation.



EXNOR gate

      
 EXNOR gate symbol
Truth table 
The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle on the output. The small circle represents inversion.