USB to Serial Mouse using the Pi Pico!


  • Okay, I was looking into this trying to figure out what was going on and I think I figured out the source of the issue.

    I based the names on the silkscreen on the pin out of the female DB9. So we both used pin 7 for init but you called it RTS I assume from the doc you linked but I called CTS based on the name of the pin of the female port.
    I should probably change that to reflect where the pin goes on the serial controller itself.

    I think I will wire up pin 8 just to have it, I already made room for it on the PCB and it could be handy in the future.

    Be Happy, it's only going to get worse.

  • Ah, yes, probably. Then everything seems to be right. But why do you think, that you need Pin 8?

    I don't know yet. I'm going to have to experiment with it on my breadboard, I have it wired up on the breadboard already.
    I know that serial mice don't seem to use it, none I've seen anyway but there is a weird bug in the firmware that could potentially be fixed by "poking" the computer to see if it's even there.
    The weird bug happens if you reboot the PC but not the pico, it thinks the serial connection is already made. It's copes just fine with the PC saying "hello there are you a mouse?" when the driver initializes but the ALRT led will give you the wrong information until that handshake happens.

    Be Happy, it's only going to get worse.

  • I worked around that issues very simple, actually with a hack. On my adapter RTS hangs on an interrupt and as soon as it triggers, I make a full reset and on the setup I blindly send an 'M' and whatever else is configured. The requirement for that is though, that the adapter comes back very fast. With Arduino it's just couple of milliseconds, but I don't know yet how fast the RPi Pico is to initialize. If the hardware init doesn't happen as fast, may be you can just trigger an internal software reset on an interrupt. That was my first idea for my adapter back then, but as I saw how fast it restarts, I just didn't bother and made a reboot with a hack, forcing an illegal operation by dereferencing a zero pointer. Making this Arduino makes a hard reset and comes back instantly. As a software developer, I'm not proud of that solution, it is by far not nice, but quite effective :D

  • With the C SDK the Pico comes on instantly, I haven't noticed any delay at all. With Micropython/circuitpython there is a definite delay.
    There is already a hack in the pico, if it remakes a connection with the USB mouse after it had lost it's connection, the pico does a reboot, which in and of itself is a hack. I have a little function that tells the hardware watchdog to watch an infinite loop and the watchdog triggers the reboot.
    I had to do that because of TinyUSB. It's happy to let a device go and reconnect to it but once it gets some data from the device, it crashes complaining that something exists already. I was hoping that alone would have it work on a KVM and it might on some cheap KVM's but as far as I can see based on the one I have to tinker with, the KVM just sends out a packet missing something that TinyUSB is looking for and it gives up. Maybe it's a hub issue but TinyUSB should already be configured to work with a hub, now that I write that out I realize that I never tried a hub.
    I'm going to do that before messing anymore with the firmware.

    Be Happy, it's only going to get worse.

  • So I got around to adding that fabled pin 8.

    Unfortunately most of my time for today was wasted on the SDK that decided to no longer work after an update.
    I reinstalled everything and it still won't work. No idea what's wrong, at this stage I'm just going to reinstall windows this time taking a snapshot of a working environment.

    Anyway. That's the board and I think it's ready to go.

    Be Happy, it's only going to get worse.

  • Hallo!

    Placed an order with JLCPCB, including the SMT assembly.
    Had to change the value's of the resistor dividers but that's fine.


    I ordered 15 boards with SMT and 5 without, I wanted one for decoration.
    So, here's hoping that I didn't mess up anything stupid!


    KiCad Files are on the GitHub if you're interested.


    Danke!

    Be Happy, it's only going to get worse.

  • Hello there

    So a bit of an unfortunate update, my only ISA vga card died.



    I saw it fail about half the screen was covered in random characters that are caked into its Rom so I'm guessing that one of the two Rom Chips have died.

    It was just random when I ran ctmouse.



    I have some m27c512's handy, I think I can just burn a padded rom file to them and replace the rom chips on the board but since it's my only retro VGA card, I thought I'd ask if that's a bad idea or not first.

    It may seem unrelated to this pico project but It's my only retro VGA card and with Christmas on the horizon I don't have the extra money to buy a replacement.


    Thanks

    Be Happy, it's only going to get worse.

  • best of luck!

    "Das Alte oder das Moderne zu schätzen ist leicht, aber das Obsolete schätzen zu wissen ist der Triumph des echten Geschmacks." (Nicholás Gómez Dávila)

  • So update.

    As a shot in the dark I removed and inserted all the socketed chips, twice and it worked after a good squeeze.

    I guess the IC sockets are really crusty, I guess I'll change them at some point to avoid this happening again.

    Be Happy, it's only going to get worse.

  • Hello,

    When compared to a new socket the old sockets looked really nasty and corroded. So I changed all 5, Ran out of 20 pin slim dip sockets so I substituted for one.
    I don't have a desoldering gun so that was very annoying to do.


    Wooooooooooo, that would have been impossible with my old iron. Maybe the day will come when I get a card that's worth the effort I put into the oti one.

  • he just soldered the new sockets to the card to double its' worth :D

  • Why not just clean the socket ?

    I tried a few things that I didn't mention.

    I did resit the chips in the sockets, that didn't do anything.

    On a hunch, the first thing I put onto the socket was vinegar, and it reacted. So I guess some battery juice got in there from the main battery leak.
    I tried giving it a clean with the vinegar and some contact cleaner + brush but it stayed really crunchy.
    that didn't work


    I then resat them again, twice, with a really hard squeeze, it made a weird rubber rubbing on rubber sound and then it worked. I just didn't trust that.

    So new sockets.

    Be Happy, it's only going to get worse.

  • Hallo!

    Just as a quick update. The ordered boards and parts are close and should have been delivered tomorrow but Ireland is going to be hit by storm Barra tomorrow. Post will likely be delayed and looks like my area is going to be hit particularly bad so I could be without power/internet for a while if the lines are hit just right.

    We'll see how it goes!

    Be Happy, it's only going to get worse.

  • Hallo

    My orders from JLC and LCSC have arrived today. The storm wasn't as bad in my part of Ireland as the weather warnings made it out to be.

    The PCB's look good, much better silkscreen with these than the first time I ordered from JLC. Soldering on the SMT parts looks good, a little dry but that's just the lead free rubbish for you.

    The black boards I ordered for memento sake really but the black solder resist looks good, I wouldn't say matte but far from glossy. Very happy with them.


    :thumbup:

    Danke

  • I do have a bit of a confession to make, because I had the top side of the pico facing down on the bread board so I could see the silkscreen for the GPIO, I added an LED to use instead of the builtin LED so I can blink it to know if the pico is doing anything or not. I may have forgotten about the built in LED.
    Probably could have just used one LED on the board for power instead of the two I have currently.
    Oh well.

    Be Happy, it's only going to get worse.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!