Bi-directional Communication (Transmit First)

Bi-directional Communication (Transmit First)

Communication Protocols Application

Bi-directional communication systems are critical in applications where board area is scarce, or limited contacts are used to connect between devices (for example, a wearable and charger). A transmit-first design indicates that this device will always be enabled first in the transaction.

 

Ingredients

  • Any GreenPAK with OE pins
  • No other components are needed

GreenPAK Diagram

Design Steps

  1. Configure two GPIO pins as Input/Output, one for the data line and one for the clock.
  2. Create an internal clock signal using a CNT/DLY block configured as reset counter.
  3. Configure a shift register to store incoming data, shown in Technique: Building a Shift Register. Shift registers can be read with I2C.
  4. Add PGEN to send outgoing data. The PGEN contents can be changed using I2C.
  5. Configure DFF to enable transmission. Connect output to transmit clock signal and OE of I/O pins.
  6. Add CNT/DLY block to disable transmission, with clk input from DFF. Connect Edge Det block to reset DFF after set number of clock pulses.
  7. Connect the external clock to the shift register and connect the internal clock to PGEN and I/O pins.

Resources

GreenPAK Designer files