Go to Post Why is it OK to be "elitist" when we select people to be on a team to hit rocks with sticks, but not OK when we try to reach the special group of students that embody the intellectual capital that will define the future of this country? - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-12-2004, 10:57
cbolin's Avatar
cbolin cbolin is offline
Programming & Electrical
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Charleston, SC
Posts: 72
cbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to behold
TTL Serial Port and PS2 Mouse Interface

Hi,
Was tinkering with a PS2 mouse in the garage the other day. Noted the two digital encoders, 3 digital inputs and the analog input (roller). Noted that four wires connected it to the PC (pins Vcc, 0, CLK, Signal).

Been reading today about the TTL Serial Port on the RC.

Any possibility that these two things can be electrical tied together (simply)? With some of the code samples I have seen it could then be possible to add some more capability to the robots.

Let me know what you think!

Regards,
ChuckB
__________________
Team 342 Programming & Control Systems
Good luck and have fun!
  #2   Spotlight this post!  
Unread 08-12-2004, 11:05
cbolin's Avatar
cbolin cbolin is offline
Programming & Electrical
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Charleston, SC
Posts: 72
cbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to beholdcbolin is a splendid one to behold
Re: TTL Serial Port and PS2 Mouse Interface

Just took apart a PS2 keyboard....curious if these devices can be used with very little modifications on the circuit side.
Regards,
ChuckB
__________________
Team 342 Programming & Control Systems
Good luck and have fun!
  #3   Spotlight this post!  
Unread 08-12-2004, 15:58
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: TTL Serial Port and PS2 Mouse Interface

Quote:
Originally Posted by cbolin
Hi,
Was tinkering with a PS2 mouse in the garage the other day. Noted the two digital encoders, 3 digital inputs and the analog input (roller). Noted that four wires connected it to the PC (pins Vcc, 0, CLK, Signal).

Been reading today about the TTL Serial Port on the RC.

Any possibility that these two things can be electrical tied together (simply)? With some of the code samples I have seen it could then be possible to add some more capability to the robots.

Let me know what you think!

Regards,
ChuckB
Don't think so. I believe he mouse input on a computer interprets the input data through the mouse driver.(software) Each mouse can have it's own protocol for data as polled by the mouse driver. I will ask around for more info and get someone to respond.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #4   Spotlight this post!  
Unread 08-12-2004, 20:29
Sparks333's Avatar
Sparks333 Sparks333 is offline
Robotics Engineer
AKA: Dane B.
FRC #1425 (Wilsonville Robotics)
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Wilsonville, Oregon
Posts: 184
Sparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of light
Send a message via AIM to Sparks333
Re: TTL Serial Port and PS2 Mouse Interface

Quote:
Originally Posted by Al Skierkiewicz
Don't think so. I believe he mouse input on a computer interprets the input data through the mouse driver.(software) Each mouse can have it's own protocol for data as polled by the mouse driver. I will ask around for more info and get someone to respond.
the serial TTL port isn't supported by the programming framework in the FIRST controller, so you'd have to build up new framework. The PS/2 port is also directed by a protocol, one developed by IBM, and you'd have to make the controller recognize that protocol. Also, the PS/2 Port needs a clock signal, probably one of a specific frequency, so you'd have to get the return line in the serial port to put out a clock cycle. I don't know how easy or hard that is, but it's just something to look at.

Sparks
__________________
ICs do weird things when voltage is run out of spec.

I love to take things apart. The fact that they work better when I put them back together it just a bonus.

http://www.ravenblack.net/random/surreal.html
  #5   Spotlight this post!  
Unread 08-12-2004, 23:25
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: TTL Serial Port and PS2 Mouse Interface

Quote:
Originally Posted by cbolin
Any possibility that these two things can be electrical tied together (simply)? With some of the code samples I have seen it could then be possible to add some more capability to the robots.
There are two important differences between the PS/2 protocol and RS-232: first is that PS/2 is synchronous, which means there is a separate clock line which keeps the transmitter and receiver synchronized. In RS-232 (like a normal serial port), the transmissions are asynchronous, meaning there is no clock so the transmitter and receiver each have to know the baud rate ahead of time. The second important difference is that PS/2 uses the same pin for both Transmit and Receive. This is an electrical "trick" of sorts called open-collector, meaning the transmitter only ever actively drives the line to ground and otherwise leaves it unconnected (and a pullup somewhere else on the line makes sure the line stays at Vcc). RS-232 uses separate transmit and receive lines. So right off the bat there's some electrical incompatibilities. However, most microcontrollers with serial interfaces are very configurable and can often be configured for either synchronous or asynchronous mode, and the electrical problems could be fixed with a few external components. I haven't looked at the Microchip document in a while, but it might be possible to set up the TTL serial port to do PS/2. There'd still be a good amount of software necessary to do the higher-level PS/2 protocol, though.
  #6   Spotlight this post!  
Unread 09-12-2004, 00:36
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: TTL Serial Port and PS2 Mouse Interface

Quote:
Originally Posted by Dave Flowerday
There are two important differences between the PS/2 protocol and RS-232: first is that PS/2 is synchronous, which means there is a separate clock line which keeps the transmitter and receiver synchronized. In RS-232 (like a normal serial port), the transmissions are asynchronous, meaning there is no clock so the transmitter and receiver each have to know the baud rate ahead of time. The second important difference is that PS/2 uses the same pin for both Transmit and Receive. This is an electrical "trick" of sorts called open-collector, meaning the transmitter only ever actively drives the line to ground and otherwise leaves it unconnected (and a pullup somewhere else on the line makes sure the line stays at Vcc). RS-232 uses separate transmit and receive lines. So right off the bat there's some electrical incompatibilities. However, most microcontrollers with serial interfaces are very configurable and can often be configured for either synchronous or asynchronous mode, and the electrical problems could be fixed with a few external components. I haven't looked at the Microchip document in a while, but it might be possible to set up the TTL serial port to do PS/2. There'd still be a good amount of software necessary to do the higher-level PS/2 protocol, though.

The PIC can be configured for synchronous operation.
__________________
1139 Alumni
  #7   Spotlight this post!  
Unread 29-12-2004, 11:11
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: TTL Serial Port and PS2 Mouse Interface

Quote:
Originally Posted by Rickertsen2
The PIC can be configured for synchronous operation.
Got any more details? Example code? If you could show how to interface to a PS/2 mouse or keyboard, this would be huge!
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #8   Spotlight this post!  
Unread 29-12-2004, 14:19
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
Re: TTL Serial Port and PS2 Mouse Interface

Quote:
Originally Posted by gnormhurst
Got any more details? Example code? If you could show how to interface to a PS/2 mouse or keyboard, this would be huge!
Keep in mind, your looking at a body of code like Kevin Watson's new serial driver, but more complicated.
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen

Last edited by phrontist : 29-12-2004 at 17:28.
  #9   Spotlight this post!  
Unread 29-12-2004, 15:00
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: TTL Serial Port and PS2 Mouse Interface

Most of this has probably been said already, but here goes anyway.

RS-232 (Standard serial, what the COM port on your computer uses) is full duplex with an assumed frequency (though it varies between devices). there are 3 pins needed--Tx, Rx, Gnd. (the other 6 are status indicators). TTL is very similar, just uses 0v and 5v instead of -3v to -25v and 3v to 25v of RS-232. (Beyond Logic has some great RS-232 resources)

The PS/2 format is also serial, but is half-duplex and requires a clock. While it can connect to a standard serial setup (either TTL or RS-232), if the clock speed varies a little, you're screwed. A better solution may be to take a cheap PIC/Stamp/etc. and wire the clock to an interupt and the data to a digital IO, and have it convert to/from TTL/RS-232 and PS/2.

The actual data format of PS/2 devices has long been standardized (at least for basics). Beyond Logic has an article on the AT Keyboard. Here's a list of Mouse format articles I found via Google:There is, of course, plenty more to find online.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 19:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi