Flip Flop Implementation using C language

Discussion in 'Homework Help' started by CSharpque, Oct 7, 2011.

  1. CSharpque

    Thread Starter Member

    Sep 23, 2011
    Can any one give me a source code for flip flop implementation in C language?
  2. RiJoRI

    Well-Known Member

    Aug 15, 2007
    Sure, a lot of people here CAN do that, but first tell us why we should do your work for you? There are hundreds of "Can you do this for me?" types of requests, and the general answer is "You will learn more if you do it yourself. Show us what you've done, and we'll help you to go further."

    Your best bet is to write down the operation of a flip-flop circuit. A timing chart will probably help. Then code it. Oh, and don't freak out. You'll see it's very simple.


    P.S., I'm away from AAC on the weekend.
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    A flip flop in C would be cake and pie if you had defined how it is being used.

    Is it just a pure code beastie?
    Is it inside an embedded controller using external pins?
    What color do you want that flip flop? (Note: mauve has the most RAM)
  4. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    Who learns by finding out, has seven fold the skills of him who learns by being told.
    -- Arthur Gutterman
  5. CSharpque

    Thread Starter Member

    Sep 23, 2011
    K i m doing this project as part of my MCA sem1 and i know only working and diagram of flip flop (RS ,JK and master slave)
  6. BillO

    Distinguished Member

    Nov 24, 2008
    1) Look at the truth table of the desired flip-flop.

    2) In C, define variables for the inputs and outputs

    3) Using the appropriate combination of If and Else constructs and logical (and {&&}, or {||}, not {!} ) operators, code the desired truth table

    4) If it does not work, post it here and we will help diagnose the problem.
  7. CSharpque

    Thread Starter Member

    Sep 23, 2011
    k thanks i have search and understand the RS flip flop now i m going to understand JK flip flop but i don't understand what CP Clock and why it is used in jk flip flop. Can u help to slove this question