Shop OBEX P1 Docs P2 Docs Learn Events
Current limited +5V tolerance on P2 I/O pins? — Parallax Forums

Current limited +5V tolerance on P2 I/O pins?

I'm hooking up a PS/2 keyboard to try out and I added a couple of 3k3s to +5V and although I know it shouldn't be a problem I thought that nonetheless I should ask the question. I'm not talking about guesses, just any hard facts that we know at this stage. Any other time I would just go for it but at the moment this is my one and only P2. Alternatively I could change the pull-ups to 3.3V but I'm not sure that the keyboard's Vih will comply. Actually, it's easier for me to stick a red LED in series with the +5V to get my 3.3ish volts since I made a little PS/2 socket adapter just to make sure PS/2 works before I try for PS/2 compatibility on USB keyboards.

Comments

  • cgraceycgracey Posts: 14,152
    You're not going to hurt anything. Don't worry.
  • jmgjmg Posts: 15,173
    edited 2018-11-01 05:12
    I'm hooking up a PS/2 keyboard to try out and I added a couple of 3k3s to +5V and although I know it shouldn't be a problem I thought that nonetheless I should ask the question. I'm not talking about guesses, just any hard facts that we know at this stage. Any other time I would just go for it but at the moment this is my one and only P2. Alternatively I could change the pull-ups to 3.3V but I'm not sure that the keyboard's Vih will comply. Actually, it's easier for me to stick a red LED in series with the +5V to get my 3.3ish volts since I made a little PS/2 socket adapter just to make sure PS/2 works before I try for PS/2 compatibility on USB keyboards.

    Hmm, since it's your only P2, I'd be paranoid & add a 3v3 Zener as insurance - you do not want the VIO current drain to drop to zero, in any operating / test mode, and find the 5V pulls up your 3v3 thru those 3k3's, to damage levels.
    If you are unsure of Voh, you could change P2 from CMOS drive, which will clamp to 3.3V, to open drain, which will clamp using the substrate diodes a bit higher. (~ 3.8V)
    Diode graphs are somewhere on here..

    ..found it, here
  • cgracey wrote: »
    You're not going to hurt anything. Don't worry.


    Great, I did put a red LED in series with the pullups "just in case" but I've found that it's now easier to handle the PS/2 keyboard as a multi-bit asynch unit. Once I know the clock rate I only need to setup my data port in TAQOZ thus in the case of this fudge: 6 PIN 12755 RXD. Then it's simply a matter of reading the pin. I'm playing with it at the moment and getting consistent results.
  • cgraceycgracey Posts: 14,152
    You could probably power VIO with 5V and it wouldn't hurt. It might push the internal level shifters too far out of bias to work, but I doubt it would damage anything. Just go back to 3.3V, then.
  • Cluso99Cluso99 Posts: 18,069
    Peter,
    Once you know the frequency of the keyboard (which you can detect with a <space> character), you can just use serial receive ie 1 pin. I did 1 pin on P1 and it works fine.
Sign In or Register to comment.