4 Flip-Flop Macros


In this chapter, the following flip-flop macros are described:

  1. r_edge (rising edge detector)

  2. f_edge (falling edge detector)

  3. latch1 (D latch with active high enable)

  4. latch0 (D latch with active low enable)

  5. dff_r (rising edge triggered D flip-flop)

  6. dff_f (falling edge triggered D flip-flop)

  7. tff_r (rising edge triggered T flip-flop)

  8. tff_f (falling edge triggered T flip-flop)

  9. jkff_r (rising edge triggered JK flip-flop)

  10. jkff_f (falling edge triggered JK flip-flop)

Each macro defined here requires an edge detection mechanism except for latch0 and latch1. The following 8-bit variables are used for this purpose:

  1. RED: Rising edge detector

  2. FED: Falling edge detector

  3. DFF_RED: Rising edge detector for D flip-flop

  4. DFF_FED: Falling ...

Get Building a Programmable Logic Controller with a PIC16F648A Microcontroller now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.