View Single Post
  #7   Spotlight this post!  
Unread 09-04-2007, 00:15
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: Communicating through a GBA's link port

Quote:
Originally Posted by Spencer E. View Post
What my plan was to do is make a pre-compiled list of commands for the GBA that could be compiled into a list of ID numbers that the user could select and make a list of editable (speed, time, distance) commands, which would then store the commands in the RC through EEPROM. Once stored, when autonomous mode started, the RC would read the EEPROM and run the corresponding function related to the ID number that was stored by the GBA.
Sounds a lot like Kevin's terminal menus used in his camera code.

I've been thinking about writing a script that generates those menus and the EEPROM code to deal with it, and the idea that the menu could be driven in different ways (serial terminal, GBA, ...) makes it that much more interesting.

Also, standard serial cables are wired straight (pin 1 goes to pin 1). All labels in RS-232 specs are relative to the DTE (the computer, or in your case the GBA). Which means that the line that the GBA transmits on is connected to the pin labeled Tx.

It seems that "UART" mode would be what you want. If you look at http://www.work.de/nocash/gbatek.htm#siouartmode, you'll notice that there's a CTS mode flag. I recommend setting it to 0 (Send blindly) and wiring GBA SD (GBA pin 4) to the RTS pin. Then you may wire the CTS pin to GBA SC (GBA pin 5). (Pinouts from http://www.hardwarebook.info/Game_Boy_Link.)

One thing that has not been described in the documents is how the GBA's "UART" mode relates to RS-232 settings. Specifically baud, parity, data bits, and stop bits. 8 data and 1 stop bit has become something of a de facto standard. Which leaves parity and baud. I can't remember what the RC uses for these, and I can't find what the GBA's settings are. I guess this is an exercise left to the reader!