Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

mouse port details

hello

can anyone give me port address & mouse port details?

I want to build a program in mouse without using device driver or interrupts.

I just want to use 'in' & 'out' instructions.

Comments

  • blipblip Posts: 756Member
    I'm assuming you mean PS/2 since you said "mouse port".
    Keyboard controller: http://heim.ifi.uio.no/~stanisls/helppc/8042.html
    "Mouse" PS/2 port: http://pinouts.ru/Inputs/PS2Mouse_pinout.shtml
    Mouse details: http://www.computer-engineering.org/index.php?title=PS/2_Mouse_Interface and http://www.win.tue.nl/~aeb/linux/kbd/scancodes-13.html and links at bottom of http://paginas.fe.up.pt/~jcard/ensino/LabC/docs/PICmicro/mouse/mouse.html

    The two mini-DIN PS/2 ports are exactly identical and I have used that fact for some of my programs. I wrote one that allows you to use two keyboards in DOS, one of course plugged into the auxillary (aka "mouse") port, and some that play with the LEDs on that extra keyboard. You can identify the device type by issuing a reset (0xFF) or identify device (0xF2) command.

    There are only a few differences between communicating with devices on each port. Each has a different IRQ and you can send to/receive from the primary port naturally. Receiving from the auxillary port is also fairly natural but sending requires you issue a command to the keyboard controller to override the default behavior of sending to the primary port (this must be done for every byte sent). The only complication is that modern keyboard controllers include the ability to automatically translate scancode sets from data received by the primary port ("keyboard port"). Some do not allow you to turn this feature off which gets in your way if you wish to have a mouse plugged in there, since they do not use scancodes and the translation would corrupt mouse packets. There are other possible things can can imaginably occur, like I bet somewhere out there that there's a keyboard controller that automatically responds to resets and get ID commands without querying the external device, things like that

    When you say that you do not want to use interrupts, I assume you mean no BIOS or driver APIs but I recommend that you use the hardware interrupts for the keyboard controller.
Sign In or Register to comment.