Connect with us

Keyboard and Video interfacing

Discussion in 'Electronic Basics' started by Abstract Dissonance, Mar 18, 2006.

Scroll to continue with content
  1. I was thinking about trying to do a project that involves a PC keyboard(and
    maybe mouse) and possibly a PC video monitor.

    Can someone point me in the right direction to get started? I'd like
    basicaly to "sense" or "transform" information between the data paths of the
    pc and these devices... the keyboard one is sorta like a data logger type of
    thing but actually is something else.

    I'm sure the PS/2 port for the keyboard/mouse is very easy to handle but
    what I'm woried about is for USB keyboards... not sure if the protocol is
    standardized... if so then it should be pretty easy to interface using a PIC
    that supports USB?

    What kinda signals come out from the graphics card to the video monitor? I
    assume there are both analog and digital outputs since I've seen newer
    graphics cards with D/V out. Would it be relatively easy to "sample" the
    video output of a graphics card and transform it then sent it along its way
    to the monitor?


    (I'm more interested in doing this in hardware than software)

    Thanks for any info,
    Jon
     
  2. Chris

    Chris Guest

    Hi, Jon. By far the easiest way to interface between a modern keyboard
    and a modern momitor is to put a PC between them.

    Having said that, doing some things the old fashioned way can be
    educational. If you really want to do something like this, I'd
    recommend finding an old copy of Don Lancaster's "TV Typewriter
    Cookbook". It's a serious hobbyist-level book which shows how to
    interface a parallel input keyboard with a television, to show letters
    and characters on screen. If you can't scrounge a copy, they're
    available used from Amazon for a few bucks:

    http://www.amazon.com/gp/product/0672213133/104-1780992-3603126?n=283155

    Look at the book carefully, because you're going to have to make some
    serious mods. The PROMs and some of the analog components in the book
    are obsolete (I think it's been 30 years), but you can work out
    substitutions. Go figure -- you may be the only person on the face of
    the earth trying to do this.

    Seriously, though, it would be really educational, and I would guess
    Don might be interested in hearing about your work. His website is:

    http://www.tinaja.com

    Another thing you might want to try is finding an old VT-100 terminal,
    and using a PIC to translate keypad inputs into RS-232 serial
    characters to send to the terminal screen. You might be able to do
    some curious things with ANSI-type graphics.

    But interfacing a PC keyboard to a VGA display would basically be
    recreating the PC keyboard interface with whatever processor you want
    in the middle, and a VGA card from scratch. You should be able to get
    a PIC to interface with a keyboard (the AT keyboard interface is
    serial), but you need a lot more than a PIC to control a VGA card, and
    the VGA card itself would be a major engineering effort. This isn't
    realistic.

    Good luck
    Chris
     
  3. Periproct

    Periproct Guest

    http://www.beyondlogic.org/keyboard/keybrd.htm

    This might be of use for the keyboard side of things.
     
  4. The USB keyboard will be a pain, stick with the PS/2, that's real easy
    to decode with any micro. Lots of sample code around etc.
    Basically, forget it, it will be too diffcult. You are talking very
    high speed sample rate ADC's, lots of memory, not to mention resolution
    and syncing problems in the hundreds of MHz range. It takes a massive
    custom ASIC device to do this.
    It was very diffcult when I did it back in 1994 with 640x480 LCD
    panels, and is now an order of magnitude harder. No one does it without
    a special purpose design VLSI chipset these days.

    On the other hand, if you simply want to drive a VGA screen direct (at
    low resolution) from a micro or FPGA, that is pretty easy, and there
    are several around who have done this and sell a module like this one:
    http://www.dontronics.com/micro-vga.html
    There are others too.

    Dave :)
     
  5. Jim Brain

    Jim Brain Guest

    I can concur. I just completed a PC PS2 keyboard interface, and this
    site was very helpful. I also wrote the code to emulate a keyboard, and
    the site was helpful for that as well, though none of the sites note a
    couple items:

    You must wait 1-2 after sending a byte, even if the host does not keep
    the CLK line low.

    None of them handle some of the corner conditions (what if start bit is
    high, or stop bit low, etc.

    Jim
     

  6. Thanks,
    I'll check out the book and see what I can come up with.

    Jon
     
  7. I have a pic that does USB so it can't be much more difficult that the PS/2.
    heh

    1994 and 2006 is a huge difference. Surely they now have chips that
    interface between a pc graphics signal and a crt or LCD...

    the AVG2510 from NS does just this except it does not allow custom graphics
    operation... What I need to do is be able to draw basic primitives and do
    bitmap testing which I could implement myself if I had access at the pixel
    level.

    Well, I need something like that but also need to "get at" the underlying
    graphics that is sent out from the pc graphics card. Basicaly recreating a
    simple graphics card that sits inbetween the monitor and pc graphics card.

    First things first I guess... need to work on the keyboard and get that done
    then I can worry about the video part. One thing I'm wondering though is
    what type of signal is output from the pc graphics card. Is it composite for
    analog and serial/parallel for digital(what else would there be for digital)
    where the bits represent pixel colors(like RGB format)?

    Thanks,
    Jon
     
  8. Stef Mientki

    Stef Mientki Guest

    Master USB ??
    If so what PIC are you using ?

    Stef
     
  9. Well, I have several that do UART, USB, SPI/SSP, CAN, etc... I think I will
    end up using UART for the PS/2 and USB for the USB... the PIC2455 does USB
    and UART so I should be able to handle poth interfaces almost transparently.
    I'm reading up on the how the PIC's worth with them but the datasheets don't
    seem to offer very good information on them(just the raw details).


    I was thinking of using two PIC2455's one for handling PC->PIC and the other
    to handle PIC->Keyboard and have a little bus between them...



    Jon
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-