Notices
Results 1 to 5 of 5

Thread: Keyboard implementation

  1. #1 Keyboard implementation 
    New Member
    Join Date
    Jan 2006
    Location
    Agra (India)
    Posts
    3
    I have designed a new keyboard for my mother toungue Hindi written in Devnagari Script. I have also designed the display system of those characters on the monitor. But I don't know how to implement the same on a computer (say a PC based on DOS or Windows). Can somebody guide me how to start with, so that i can build a computer working solely in Hindi? I have good knowledge of C, C++, BASIC.


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Radioactive Isotope mitchellmckain's Avatar
    Join Date
    Oct 2005
    Location
    Salt Lake City, UTAH, USA
    Posts
    3,112
    Well what happens in Windows or Dos when you press the keys. If it is picking up scan codes from the keyboard it should be interpreting these as various ascii characters. If nothing happens when you type the keys then I would say that you apparently need some kind of device driver to negotiate communication between the keyboard and the operating system.

    When you say completely in Hindi, doesn't that mean that you need to write your own operating system? Most countries use the english based operating system but then simply run programs to do things in their own language.


    See my physics of spaceflight simulator at http://www.relspace.astahost.com

    I now have a blog too: http://astahost.blogspot.com/
    Reply With Quote  
     

  4. #3  
    New Member
    Join Date
    Jan 2006
    Location
    Agra (India)
    Posts
    3
    you are right Sir, I want to write my own operating system, as soon as the keyboard and monitor interface is finalised. Will you please guide me in more detail? how can I write the device driver? where can I find a device driver ? I have good knowledge of C. Is this possible to write a device driver in C for the keyboard?

    Quote Originally Posted by mitchellmckain
    Well what happens in Windows or Dos when you press the keys. If it is picking up scan codes from the keyboard it should be interpreting these as various ascii characters. If nothing happens when you type the keys then I would say that you apparently need some kind of device driver to negotiate communication between the keyboard and the operating system.

    When you say completely in Hindi, doesn't that mean that you need to write your own operating system? Most countries use the english based operating system but then simply run programs to do things in their own language.
    Reply With Quote  
     

  5. #4  
    Forum Radioactive Isotope mitchellmckain's Avatar
    Join Date
    Oct 2005
    Location
    Salt Lake City, UTAH, USA
    Posts
    3,112
    Quote Originally Posted by vijayks
    you are right Sir, I want to write my own operating system, as soon as the keyboard and monitor interface is finalised. Will you please guide me in more detail? how can I write the device driver? where can I find a device driver ? I have good knowledge of C. Is this possible to write a device driver in C for the keyboard?
    Well you need someone who is way more of a system programmer than I am. I have been pretty exclusively an applications programmer.

    Of course you can write a device driver in C, but I don't even know if it is applicable if you are writing your own op sys.

    I do think you need to find the communication port(s) to which your keyboard IO goes to and then monitor that port to see what kind of data that port recieves when your push the different buttons on your keyboard. Ive never done any of this myself so I cannot really give you any details. But maybe the keyword "port" etc will give you a clue to how to search for the info you want on the internet.

    For example, a search on google of: keyboard IO port address
    found me the following info on http://www.codepedia.com/1/x86ASMFAQ_Hardware
    You should (or may have to) go through operating system to do this. However, if you are writing an OS, or keyboard driver then the following information will be useful.

    IO port 0x60 is the data port for the keyboard. Reading it will give you the scancode of the last key pressed. The highest bit specifies whether the key is being pressed (MSB==0) or released (MSB==1). The scancode is NOT the ASCII code of the key. It needs to be translated, which can be done with a lookup table and the xlat opcode. Also, despite the fact that 7 bits corresponds to 128 possible values, and most extended keyboards only have 101 or 102 keys, certain extended keys don't generate a unique code, but rather generate two codes at a time. IO port 0x64 is the status port for the keyboard. With it you can check whether a key has been pressed (or released) since last time you checked.

    The keyboard also takes IRQ 1 and typically generates an interrupt everytime a key is pressed or released. There is a lot more that you can get from and do to the keyboard, however the IRQ and port 0x60 are about all you ever need to know simply to use the keyboard. If you are interested in the other details, chapter 20 of the DOS Art of Assembly covers it in detail.
    See my physics of spaceflight simulator at http://www.relspace.astahost.com

    I now have a blog too: http://astahost.blogspot.com/
    Reply With Quote  
     

  6. #5  
    New Member
    Join Date
    Jan 2006
    Location
    Agra (India)
    Posts
    3
    Thank you Sir, for the valuable information. I will explore topic of keyboard driver and systems programming for keyboard for more information. If you happen to get some other valuable information for me, Sir, please post the same for me or mail to me on bijjoo29@rediffmail.com.
    Reply With Quote  
     

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