I just finished doing this and had the same questions. Hope this helps.
Purchase a firewire cable available at most computer stores. Both ends should be identical.
Cut off one end near the connector and strip away and expose the inner wires. There will be six.
Here's the part that gives the most difficulty. Each coloured wire corresponds to a small brass pin in the other connector end. We need to determine which pin position corresponds to each wire colour. There are a couple of different colour schemes used depending on who makes the cable.
Make yourself a diagram.
Strip each wire end and then get out the handy multimeter and map each pin to its colour like so.
The result is something like that shown below. We can pick either of the two colours - in this case, red or yellow - that correspond to the firewire pins the SCT scanner uses for analog inputs. Red is Channel 2; yellow is Channel 1. We only need a single channel.
I chose red which corresponds with analog input Channel 2. Trim the other wires.
Crimp a connector on it and tape it up. You can solder it if you want; just make sure it's secure.
Now connect it to your AEM gauge harness. Use the white wire (to which I've already crimped a female connector).
Connect the rest of your wiring as shown here to power the AFR gauge. The interior fusebox is your best 12V power source and the unpainted metal fusebox housing can act as your ground. Put proper connectors on the exposed wire ends. You probably want a fusible link on the 12V power source.
Fit the unmodified Firewire cable end of your butchered Firewire cable into SCT scanner (at the top), the large SCT scanner cable end into the OBD II port of the car and a USB cable from the SCT scanner to your notebook computer, if you're using one to datalog.
When preparing to data log, go to "Data Logging" then "Set Up" in the SCT scanner menu and configure scanner analog inputs, when prompted i.e. "Configure Analog Inputs? Y/N" will appear on the screen. Select Channel 2 (or 1 depending on the wire you chose) and specify "Wideband" and then "AEM" from the scrollable list presented. This will apply a formula to the raw voltage generated by the sensor located in the exhaust stream and convert it into a more recognizable AFR ratio - the same as the in dash gauge will display - in the resulting logs.
You can datalog to the scanner itself or to the notebook using the Livelink software package.
When you've finished with the SCT data logging, simply disconnect the white analog input wire and cap it. Tie it up near the OBDII port out of sight until it's needed. Store your Firewire cable in a safe place ready for future use.
This set up worked for me without problem. Let me know if I've made any errors and I'll fix 'em.