Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. D flipflop implementation in C++

D flipflop implementation in C++

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Manoj7390
    wrote on last edited by
    #1

    Hi, I have implement a D-Flipflop in C++, I.e. 'D' as a input and 'Q' as a output with 'clk' as a conrol input. When clk = '1' and D = '1/0' then Q = D; How to realize clock in C++. It should be of 50% duty cycle using the system frequency. is there any function to use the system clock in program.

    L CPalliniC 2 Replies Last reply
    0
    • M Manoj7390

      Hi, I have implement a D-Flipflop in C++, I.e. 'D' as a input and 'Q' as a output with 'clk' as a conrol input. When clk = '1' and D = '1/0' then Q = D; How to realize clock in C++. It should be of 50% duty cycle using the system frequency. is there any function to use the system clock in program.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See http://msdn.microsoft.com/en-us/library/1f4c8f33(v=vs.80).aspx[^].

      Use the best guess

      M 1 Reply Last reply
      0
      • L Lost User

        See http://msdn.microsoft.com/en-us/library/1f4c8f33(v=vs.80).aspx[^].

        Use the best guess

        M Offline
        M Offline
        Manoj7390
        wrote on last edited by
        #3

        I don't need a timing info from the system. It should provide the the system clock as a input to my program. How to clock in C++/C for the function of digital blocks.

        L 1 Reply Last reply
        0
        • M Manoj7390

          I don't need a timing info from the system. It should provide the the system clock as a input to my program. How to clock in C++/C for the function of digital blocks.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I don't think that you can get the system clock directly, you need to use one of the time functions provided by the OS.

          Manoj7390 wrote:

          How to clock in C++/C for the function of digital blocks.

          I'm not sure what you mean by this question.

          Use the best guess

          1 Reply Last reply
          0
          • M Manoj7390

            Hi, I have implement a D-Flipflop in C++, I.e. 'D' as a input and 'Q' as a output with 'clk' as a conrol input. When clk = '1' and D = '1/0' then Q = D; How to realize clock in C++. It should be of 50% duty cycle using the system frequency. is there any function to use the system clock in program.

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #5

            Do you mean simulate the flip flop? That is provide the clock (and other signals) by means of an array?

            Veni, vidi, vici.

            In testa che avete, signor di Ceprano?

            M 1 Reply Last reply
            0
            • CPalliniC CPallini

              Do you mean simulate the flip flop? That is provide the clock (and other signals) by means of an array?

              Veni, vidi, vici.

              M Offline
              M Offline
              Manoj7390
              wrote on last edited by
              #6

              What i need is, i need to realize D-Flipflop(Digital block), which transfer the input to output when the clock is high. Clock should be of 50% duty cycle, means equal amounts of ON and OF periods. How can i do this in C/C++.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups