Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : PS2 keyboard chip, more inputs?
Author | Message | ||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Just thinking out loud. The 'mite has a PS2 keyboard interface. A PS2 keyboard has like 100 keys. Thats 100 digital inputs, accessible with the INKEY$ command. Is there a PS2 encoding chip, that can take switch or digital inputs and send out PS2 serial data, for connection to a Maximite. It would give us a lot of extra digital on/off inputs, say for monitoring, etc, and means we still have the 20 odd 'mite pins to control and sense analogue, duration, etc. One application would be a custom built ( and compact ) keyboard, with say 12 keys, instead of a full sized keyboard. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Like this KeyPad We could rip this apart and see how's it is done. I assume the keys will be in a matrix John |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Yeah sort of. Thats a neat little keyboard, but I'm more after the chip itself. Chances are the chip in that keyboard is under a blob of black epoxy unfortunately. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
djuqa Guru Joined: 23/11/2011 Location: AustraliaPosts: 447 |
The original PC / AT /PS2 Keyboards were a simple matrix of keys & an Intel single-chip 8048 microcontroller. Nothing complex, the same could be done today using a simple Pic or similar micro-controller. VK4MU MicroController Units |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Just a thought we can use 1 analogue pin and a resistor ladder John |
||||
Hneo2au Newbie Joined: 03/03/2012 Location: AustraliaPosts: 5 |
Do a search for Ultimarc I-pac2 keyboard encoders. They have a interface that emulates a keyboard from contact inputs. A bit pricey though. |
||||
darthmite Senior Member Joined: 20/11/2011 Location: FrancePosts: 240 |
Hi , long time ago (2009)i do a little project to read a USB/PS2 keyboard and send the ASCII code as serial. It just use a simple little Pic 16F688 The header file is prepared for 3 different keyboard layout , actually it was just the German layout active , The US and FR layout are just a copy/paste from the German one. You then just have to put the right code under this sections to be able to use the US and FR layout. Read the comments at start from the *.c file to know how to use the other layout. Here the Schematic : 2012-03-13_224251_16F688_USB_Keyboard_Decoder_schematic.zip and the source code made with CCS C PIC compiler. 2012-03-13_223718_Keyboard_16F688.zip I no more have this circuit at home for made the US and FR or other layout. I hope it can help This circuit is so small that you can directly integrate it into a KB and send the serial data tough the PS2 cable Cheer. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Tests must be done to see how fast you can switch without loosing the count. How fast is that chip? Is doing a multiplexing? Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
BobD Guru Joined: 07/12/2011 Location: AustraliaPosts: 935 |
Another approach if you want more signal lines is to use the Remote 8-bit I/O expander for I2C bus - PCF8574. You can put 8 of these on an I2C bus and each has 8 "quasi-directional I/O ports". To run them you also need a digital input for the chip(s) to notify the processor there is inbound data. 2012-03-14_070625_PCF8574_data_sheet.pdf There is also version called PCF8574A which can have 16 chips on the bus but it seems to use an extra address bit which, I think, will prevent its use with the MM. |
||||
paceman Guru Joined: 07/10/2011 Location: AustraliaPosts: 1329 |
How about these, MC74HC595A 8-Bit Serial-Input/Serial or Parallel-Output Shift Register with Latched 3-State Outputs http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf They use serial SPI out, not I2C but they're also cascadable. No input, just output but if that's what you want. Sparkfun even have a tutorial on them: http://www.sparkfun.com/products/10680 Greg |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
This is something I did many years ago. I started with an old keyboard that had crook keys, put the hacksaw through the board and kept the electronics. The keys are multiplexed so you need switches or relays to get the inputs. I am currently doing things in reverse. I have a USB keyboard being fed from a maximite (the electronics are bigger than the maximite). This keyboard is in a laptop and the key press is needed to wake a program up. The maximite operates a reed relay which operates the 'space' key on the laptop. Working out which wires go to which key is the hard part. Jim VK7JH MMedit MMBasic Help |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi Jim, I used an 18F2550 (my FreeJALduino board) with Jalv2 language and USB keyboard library to simulate a second USB keyboard, actually firing a train of [Space key] codes, needed in a game which I played with my daughter. It had also a switch (an input to microcontroller), for On/Off the output. This helped me to protect my keyboard . It is very easy to setup and program if you are accustomed with PIC 18F programming. The Jal language is very easy and intuitive if you programmed before in Pascal or Verilog... It would be great if Maximite could allow the software upload form a serial interface (using also FTDI) and letting USB setup for the users (or different versions of the firmware). But you can't do everything from an interpreter. Sooner or later you must go to real programming (mikroElektronika have mikroBasic for PIC32). Anyway, PIC32 for just that is definitely an overkill. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
darthmite Senior Member Joined: 20/11/2011 Location: FrancePosts: 240 |
The 16F688 is 8Mhz , the serial is set to 9600 baud , when i have use it i don't have loose any chars i pressed on the KB. You will see in the source that the PIC only wait and translate the keyboard scan-code. I don't have use interrupt , it's a pure bit banging system because every KB don't send the bits at the same speed. And about how fast it was , you can consider that it was exactly the speed of the KB Cheers. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
Hi, I mean the keyboard chip Glenn pointed. Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
Print this page |