We are doing a project at school with AOI, NAND and NOR logic. The logic is used sequentially to display a number on an LED display, more specifically it is suppose to display the numbers of your birthday in this order: MM-DD-YY. The output of the LED display is determined by 3 switches that are used as inputs. I labeled my inputs X Y and Z. When you turn the switches on and off to represent counting in binary, it displays your birthday. Now, my teacher said that anyone who can display the numbers using a counter or flip flops would get extra credit (much needed). The problem is, is that I cannot figure out how to get my Positive-Edge-Triggered D flip flop to work properly. I am unfamiliar with flip flops and i have been trying to research them on the internet with no luck. Every page i read i get lost and frustrated. How can i use Positive Edge triggered flip flops to count in binary to 7? All relevant answers are appreciated!

  • 1
    \$\begingroup\$ take one D-FF, wire its ~Q output back to D. Now whenever it sees a positive edge, the output toggles. So on the output, you will have one positive edge for every two positive edges seen at the input. You've made a divide-by-two. Now, use that output to clock a 2nd D-FF, similarly wired ~Q back to D. This divides by 2 a second time, or one pos edge for every 4 in the input. You now have a two bit counter. The 1st D-FF is the LSB, the 2nd one is the MSB. Add a 3rd unit and you can count from 0 to 7, over and over \$\endgroup\$ – JustJeff Dec 17 '11 at 3:25

If you are interested in creating a mod 8 counter you should start with a state diagram and work your way through to an excitation table. As JustJeff mentioned the characteristic equation for a DFF is: D = Q+. You will need to use 3 D flip flops because you have 8 possible states. Keep it organized and start with a diagram!

After you create a diagram you can create a state table. After you create a state table you can create a transition table. Finally you can construct your excitation table and equations based off of your Flip Flop equation (D = Q+) and the transition table Q --> Q+. From there you can get the proper IC's or program the equations directly in VHDL or Verilog.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.