1 Reply Latest reply on Oct 3, 2019 12:06 AM by AlakanandaB_86

    How to do PS/2 keyboard using CY8C4246AZI-L445

    raga_2618521

      We have to develop PS/2 keyboard using PSOC 4 controller. In that can we use SPI or UART block to communicate to PC PS/2 port.

        • 1. Re: How to do PS/2 keyboard using CY8C4246AZI-L445
          AlakanandaB_86

          Hi,

           

          Since this is the data frame format of PS/2,

          A data frame is made of 11 or 12 bits (depending on data direction):

          • a start bit (always low)
          • 8 data bits, LSB first
          • a odd parity bit
          • a stop bit (always high)
          • an acknowledge bit (the device pulls the data line low when transmitting from host to device)

           

          Using SPI or UART would not be compatible.

          The easiest way to read data sent from a PS/2 keyboard is to use external interrupts. All microcontrollers allow to trigger an interrupt when a specific event occurs on an external pin and most of them have a dedicated external interrupt controller. During device to host communication the host samples the data line when the clock is low, so it’s easy to set up a trigger when the pin connected to the clock line goes low and read the scan code from the keyboard.

           

          Regards

          Alakananda