No0ne / ps2x2pico

USB keyboard/mouse to PS/2 interface converter using a Raspberry Pi Pico
MIT License
196 stars 35 forks source link

Data and clock pins reversed according to oscilloscope measurement? #16

Closed nanoant closed 10 months ago

nanoant commented 10 months ago

First of all I want to share news that I managed to build working unit with HW-221 TXS0108E level converter that I had lying around: IMG_9495 1 IMG_9494 Notable differences:

  1. GPIO13 is connected to OE of TXS0108E, instead of powering the unit. TXS0108E is powered from 3.3V and 5V pins.
  2. Only 4 of 8 are used and shifter is on the back of Rpi Pico, but HW-221 board is extremely cheap so IMHO can be better bang for buck for this project. And I have quite a stock of these boards.
  3. Looks there's a short between GND and A3, but actually they don't touch, and there's additional transparent isolation.
  4. I did not solder PS/2 plugs, instead use Dupont, since I want also to talk with boards/FPGA that have PS/2 pins but no proper sockets.

Now the problem. According to my oscilloscope I see keyboard clock on GPIO11 and data on GPIO12, which is opposite from what is written in the documentation. I checked both level shifter and Pi pins. This looks like some trivial problem but I have honestly no clue why this is happening. Any thoughts? Test 1 image

No0ne commented 10 months ago

Hi, nice work/photos! I'm currently in the process of swapping pins, see https://github.com/No0ne/ps2x2pico/releases/tag/beta-0.6 The PIO code which uses data before clock isn't finished yet. The old CPU bitbang code did use clock before data on the GPIOs. Hope this clarifies your issue!

nanoant commented 10 months ago

All clear! Many thanks @No0ne for your great contribution to retro-noobs community ;)