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 asreset counter.
  3. 配置一个移位寄存器来存储传入的数据,shown inTechnique: 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 andOEof I/O pins.
  6. Add CNT/DLY block to disable transmission, withclkinput 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