Proj0+-+Multi-TP+Driver

= =

= = =**Development Board**=

I created a Development Board to let me play with TrackPoints and gyroscopes

//** you can connect up to 8 TrackPoints (in the pic, only 1 is connected)**//

> Texas-Instruments MSP-TS430PM64 development board, > with an Ultra-Low-Power MSP430f1610 MCU, and JTAG conxn. > '**R**' hard-resets all TrackPoints, returning eg '**aR5I5**' which would mean: > Command acknowledged, 5 Trackpoints Reset, 5 Trackpoints Initialized ok > '**s**' returns 'a' followed by all colledcted TrackPoint data (x,y,z): 3 bytes for each TrackPoint
 * MCU board is
 * Board and TrackPoints are run at **3.3v**
 * The **MCU** collects **8-bit (x,y,z) pressure data** **simultaneously** from each **TrackPoint** at **80 Hz** eg (123, 22, 67)
 * The **MCU-board** **exports UART**
 * This is converted into **USB** by a **FT232R** (by FTDI)
 * **FTDI Drivers** mean the device appears in WindowsXP (**or any other supported OS**) as a **Virtual Com Port**
 * **Board** is controlled by **sending single byte commands** to **COMx** (eg using Terminal) eg:
 * Also on the board is the **GyroPoint circuitry**, which is a separate USB device
 * **2 x GyroMice** + **1 x FTDI VCP** go thru **USB hub**
 * Board exports hub output ie **single USB**

here is a picture with the gyroscopes attached to one of the GyroPoint Boards

notice the TrackPoint has a rumble unit attached: the computer can send commands to rumble an individual TrackPoint, say TP(5).Rumble = 7

=__notes__=

Feeding the TrackPoints into the MCU was a bitch. I needed the following: > http://wwwcssrv.almaden.ibm.com/trackpoint/download.html > specifically: http://wwwcssrv.almaden.ibm.com/trackpoint/files/ykt3eext.pdf
 * TrackPoint technical documents found here:
 * PS2 protocol specification, found at [|www.computer-engineering.org]
 * An oscilloscope

Micro-Controller was coded in C using IAR Embedded Workbench, which I don't recommend since it is a pile of shit.

This code-snippet shows all the commands you can send to the UART of the MCU. You'll have to tab it out probably. Dunno what squashed it... code void UART_ProcessByte(char b) { char buf[2];

switch (b) { //send all XYZ to UART case 's': if (MODE == MODE_ACTIVE) SendAllXYZToUART; break;//

quick reset (with full reset if it fails) case 'r': MODE = Reset( MODE ); break;

//full reset case 'R': MODE = MODE_INITIALIZING;// this will force hard reset MODE = Reset( MODE ); break;

//burst mode on case 'B': if (MODE == MODE_ACTIVE) MODE = MODE_BURST; break;//

burst mode off case 'b': if (MODE == MODE_BURST) MODE = MODE_ACTIVE; UART_TX('y'); break;

//test (sends back 'a' -- ACK byte ) case 't': break;//

set smoothing: chr$(0) is no smoothing, chr$(220) would be heavy smoothing /* case 'm': UART_WaitBytes (1, buf); smoothing_factor = (float)buf[0] / (float) 255; break;

//buzzes case '0': SetBuzz (0, BUZZ_SILENT); break;

case '1': SetBuzz (0, BUZZ_DODGY); break;

case '2': SetBuzz (0, BUZZ_SPOT_ON); break;//

invalid char default: Assert (false); break; } } code