reducing shiftout clock freq and PS2/PC interfacing ....


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    It takes more than just sending keystrokes via the PS2 protocol.

    When the PC is booting, the keyboard must send and receive several commands to tell the PC what it is, what mode it's using, etc.

    Go to the link Sayzer gave in post #4, then click on "PS/2 Keyboard Interface".
    Look at the Command Set/Initialization sections at the bottom.

    It's possible to place the device in parallel with an existing keyboard, so the keyboard does all the initializing.
    But if you don't want the keyboard, you'll need to do it all yourself.

    Not as easy as just toggling a couple pins with the right timing.
    <br>
    DT

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    When the PC is booting, the keyboard must send and receive several commands to tell the PC what it is, what mode it's using, etc.
    Ahhhhhhhh.......
    The O/P didn't state specifically if he/she was using the keyboard alone or in parallel...good point...
    However (we've been down this road before somewhere), there should be a setting in BIOS called something like 'Halt on All Disk/Keyboard' errors or something like that and it can usually be shut off. Should take care of the freezing problem. But since the keyboard hasn't been recognized, it still won't work

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I confirm what Darrel's said. There's a lot of things to do before it work as expect.

    I already suggested awhile back to build a PS-2 sniffer and log the whole data exchange from the boot... to the end. It's more than a stupid BIOS setting. In fact.. you have to confirm your Keyboard is there, and it's self test is passed.

    Not that hard.. not that easy.

    If you have any protocol analyzer or digital storage scope (PoScope, Bitcope, USBee) that will be easier.

    For safety sake, you can't use Shiftin/Shiftout AS-IS. You need to toggle TRIS instead of trashing a pin to high or low.

    Note: A PC may work slightly different from a Laptop.

    This said.. this should be enough food for thought
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    ok , what we have until now is :

    The code works almost perfectly when booting to a command prompt only (DOS). in BIOS i made it not to halt on keyboard errors, but this only removed the ( No keyboard or keyboard error) that appears when switching on. But still it FREEZES when trying to send a character in notepad ( in windows). why is it working over DOS but windows Freezes?

    in the code i made no initialization (When the PC is booting, the keyboard must send and receive several commands to tell the PC what it is, what mode it's using, etc.) and still the DOS recognizes the data sent to the PS/2 port by the PIC.

    what to do so that windows doesn't freeze?

    thanks again

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Question:
    Are you sending data from 1 p/c (notepad ) through the serial port to the PIC and then to a second P/C ? I ask, as today I was working setting up the COM link between a PC and A CNC mill and the serial software by default sends a CR and LF with every line, and you can disable that, maybe your serial program is sending that and the P/C is not expecting it. Just thinking out loud.
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by wireless magic View Post
    ok , what we have until now is :

    The code works almost perfectly when booting to a command prompt only (DOS). in BIOS i made it not to halt on keyboard errors, but this only removed the ( No keyboard or keyboard error) that appears when switching on. But still it FREEZES when trying to send a character in notepad ( in windows). why is it working over DOS but windows Freezes?

    in the code i made no initialization (When the PC is booting, the keyboard must send and receive several commands to tell the PC what it is, what mode it's using, etc.) and still the DOS recognizes the data sent to the PS/2 port by the PIC.

    what to do so that windows doesn't freeze?

    thanks again

    It seems we will have to look at the hardware side!
    Unplug mouse, and boot with KB only.
    Open notepad and unplug KB, plug PIC circuit.
    Send data.
    IF still freezing, then post the schematic.

    P.S. - Assuming (and also hoping) that after each send, you are setting your Clk and Data pins to be input pins and putting a delay like 10mS.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7


    Did you find this post helpful? Yes | No

    Default

    thank u ,
    we tried it and no more freezing, and it works perfectly on notepad.
    how can we avoid freezing? ( how to boot with the PIC circuit and make windows recognize it?)
    i tried some initialization codes but still freezes.
    is the initialization code for windows to recognize the "PIC keyboard" or for the PC to boot initially with the "PIC keyboard" connected ??

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts