| Author |
Message |
kiong86
Joined: 23 Feb 2009 Posts: 4
|
23 Feb 2009 18:00 pic usb keyboard |
|
|
|
|
hi:
i have faced a problem of my project. currently, i'm doing a connection of usb keyboard to a serial in, parallel out shift register(mm74hc595). but i can't get any signal output even from the male usb port(i have tested just from keyboard usb port to the male usb port only) which is connecting to keyboard. there are 4 pins implement in the usb ports, they are 5V pin, D+, D- and Gnd pin(if i'm not mistaken). is there any command which i have missed in the middle? or any command have to transmit from microcontroller to keyboard in order to active the keyboard?
thanks in advance..
|
|
| Back to top |
|
 |
blueroomelectronics
Joined: 17 Sep 2006 Posts: 1681 Helped: 99 Location: Toronto, Canada
|
23 Feb 2009 23:34 usb keyboard pic |
|
|
|
|
| You need a USB host controller. A PS/2 keyboard is much easier to interface to the 877
|
|
| Back to top |
|
 |
kiong86
Joined: 23 Feb 2009 Posts: 4
|
24 Feb 2009 3:56 vinculum keyboard |
|
|
|
|
i plan to use a serial in, parallel out shift register register and a 555 timer(generate the pulses for shift register) to convert the signal int parallel form, it is much earlier for microcontroller, is this possible?
beside, there are start bit, stop bit and etc while keyboard is sending the data in, does the ps2 or shift register recognize the actual signal that send from keyboard?
thanks a lot for giving me a teach.
|
|
| Back to top |
|
 |
kiong86
Joined: 23 Feb 2009 Posts: 4
|
25 Feb 2009 14:58 16f877a usb |
|
|
|
|
| blueroomelectronics wrote: |
| You need a USB host controller. A PS/2 keyboard is much easier to interface to the 877 |
second quation
i plan to use a serial in, parallel out shift register register and a 555 timer(generate the pulses for shift register) to convert the signal int parallel form, it is much earlier for microcontroller, is this possible?
beside, there are start bit, stop bit and etc while keyboard is sending the data in, does the ps2 or shift register recognize the actual signal that send from keyboard?
thanks a lot for giving me a teach.
|
|
| Back to top |
|
 |
Google AdSense

|
25 Feb 2009 14:58 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
bepobalote
Joined: 19 Mar 2005 Posts: 72 Helped: 11 Location: Europe
|
|
| Back to top |
|
 |
gelidude
Joined: 14 Apr 2007 Posts: 24 Helped: 3 Location: Philippines
|
26 Feb 2009 2:45 usb keyboard microcontroller |
|
|
|
|
First, let's clear things up. Are you trying to interface a PS/2 or USB type keyboard?
If you are using a USB type keyboard, you need a USB Host Controller to manage the interfacing since USB signal levels are very different from PS/2 port. USB uses a differential voltage for signalling while PS/2 employs a TTL level or sort of.
If you are using a PS/2 type keyboard then the websites given in the previous post are enough to get yourself a working project. Good luck.
|
|
| Back to top |
|
 |
kender
Joined: 19 Jun 2005 Posts: 1231 Helped: 88 Location: Stanford, SF Bay Peninsula, California, Earth, Solar System, Milky Way
|
01 Mar 2009 7:54 keyboard usb signal |
|
|
|
|
| It is actually possible to interface a USB keyboard to a PIC with a Vinculum host controller: http://www.vinculum.com. Just my $0.02
|
|
| Back to top |
|
 |
FvM
Joined: 22 Jan 2008 Posts: 5152 Helped: 766 Location: Bochum, Germany
|
01 Mar 2009 14:56 interfacing microcontroller 16f877a |
|
|
|
|
| Quote: |
| It is actually possible to interface a USB keyboard to a PIC with a Vinculum host controller. |
Yes, but is it reasonable?
|
|
| Back to top |
|
 |
kiong86
Joined: 23 Feb 2009 Posts: 4
|
02 Mar 2009 16:14 pic keyboard usb |
|
|
|
|
hai...
i have a problem here, there are six pins attached on ps2 port , the data, Vcc and clock pins are connected to 5V source, another is ground pin, the rest of 2 pins are not in used. this is what i have connected to, but it doesn't come with any data or clock signal when the power is on.
besides, the data signal from keyboard is an 11bits signal(including start and stop bits) but pic 16f877A is just a 8-bit PIC. what can i do to be able to receive a complete data from keyboard?
|
|
| Back to top |
|
 |
bepobalote
Joined: 19 Mar 2005 Posts: 72 Helped: 11 Location: Europe
|
02 Mar 2009 16:56 pic send usb keyboard |
|
|
|
|
Excerpt from http://www.computer-engineering.org/ps2protocol/ :
| Quote: |
| The Data and Clock lines are both open-collector with pullup resistors to Vcc. An "open-collector" interface has two possible state: low, or high impedance. In the "low" state, a transistor pulls the line to ground level. In the "high impedance" state, the interface acts as an open circuit and doesn't drive the line low or high. Furthermore, a "pullup" resistor is connected between the bus and Vcc so the bus is pulled high if none of the devices on the bus are actively pulling it low. The exact value of this resistor isn't too important (1~10 kOhms); larger resistances result in less power consumption and smaller resistances result in a faster rise time. |
Have you put the pull-up resistors on data and clock lines, as shown on the schematics?
- - - -
Regarding your 11/8 bit problem, it seems you have to study a bit deeper the general workings of micros.
I suggest you to take a look at the code sample shown at http://www.beyondlogic.org/keyboard/keybrd.htm : it explains in a clearly and detailed way how to read/write from/to the keyboard.
Please do not try to copy the shown code in your program: it was written for a different micro!!! But the description of what actions must be taken to read/write the keyboard are enough to let you write the code for your micro.[/url]
- - - - - -
BTW, I don't think searching on google is too difficult: using the following keywords "interfacing keyboard pic" you will find links like:
http://www.gedanken.demon.co.uk/rs232-converters/ps2.html
http://www.trash.net/~luethi/microchip/projects/keyboard/v1xx/keyboard_v1xx.html
http://www.uelectronics.info/pic-interface-at-keyboard
http://www.arne.si/~mauricio/pic.html
http://homepages.tesco.net/~steve.lawther/steve/keybinfo.htm
Just to mention few of them.
In the next time, try to make a search before posting....
|
|
| Back to top |
|
 |