GP2X Serial Cable


Octoate

Active Member
Joined
Dec 11, 2002
Messages
511
Hi everybody,
I have just created a page on how to create a serial cable for the GP2x in the Wiki. I already builded one and it works perfectly. Please have a look at the article and correct my spelling mistakes :p.

Here is the direct link to the Wiki article:
How to create a serial cable
 
12V (RS232)???
not 5V for PCs ???

Looks like there is not real standard. I found Voltage values from 0.3 V up to 25 V on Google. :huh:
 
Embedded equipment normally talks 0V-3V or 0V-5V depending on there design. The 2X uses a 3V CPU so it's only natural that it also talks 3V RS232.

However, PC serial standard is -12V to +12V I believe (or at least, that's what I've always used), thus giving 24V difference between the two states. Some may receive 0V to +10V, but the standard requires a negative voltage.

The reason for this is the expected length of the cable: doing 115200 baud at 0V - 5V down a long or noisy cable is going to cause lots of errors. If you increase the voltage so you have 24V difference, it means much more chance of the data being received intact.
 
@Squidge: Thanks, for the Information. PC = +/- 12V

Signal State Voltage Assignments - Voltages of -3v to -25v with respect to signal ground (pin 7) are considered logic '1' (the marking condition), whereas voltages of +3v to +25v are considered logic '0' (the spacing condition). The range of voltages between -3v and +3v is considered a transition region for which a signal state is not assigned.

Source: Link
 
No. If it is uboot that is damaged, you need a JTAG cable, but no-one as far as I know has actually unbricked a damaged uboot yet. I think it was Robster who said that the JTAG on the GP2X had no direct access to the NAND. To unbrick a damaged kernel, follow DJWillis' unbricking guide (which uses the serial cable to monitor the firmware upgrade).
 
I don't think you can access the nand directly via JTAG, but you can control the I/O lines to the nand via the processor, but that would be incredibly slow. Then again, you could probably upload a small program via jtag that would read an sd card and flash the rest.
 
The serial cable is usefull for programmers, because you get access to the console of the GP2x's linux system and you also see the output of your programs.
 
>On: Dec 26 2005, 10:09 PM, Octoate said:

>Hi everybody,
>I have just created a page on how to create a serial cable for the GP2x in the Wiki.
>I already builded one and it works perfectly. Please have a look at the article and
>correct my spelling mistakes .

>Here is the direct link to the Wiki article:
>How to create a serial cable http://wiki.gp2x.org/wiki/Serial_cable

I have a slightly different but related requirement:

- RS-232 serial input to gp2x and 3.3 to 3.9 volt power input to gp2x
derived from 12 volt car battery, both inputs using the same EXT
connector with cable separation done at the 12 volt moron lighter plug.

I want to use this for a GPS enabled map display in automobile applications.
I have already collected road data for the small island on which I live and
for which no Google map or cheap satellite imagery exists.

I suspect the 1000 mA at 3.3 volt demand might be too much for the EXT
connector using pins 20, 21 for +3.3v and 13, 24 for ground, but since
my gp2x has not arrived yet, I am unable to disassemble to view circuit
board traces.

Has anyone looked at this type of problem?
 
If you're powering the gp2x over the EXT port, you can make a rough estimate of how much power is being burned inside the connector due to the resistance... basically measure the input voltage before the connector (call it Voutside, make sure to use an outside ground), the voltage after the connector (Vinside, make sure to use an inside ground as well), and then measure the amps flowing through with a multimeter.

The formula to find how many watts of heat are generated in the connector is:
Watts burned in connector = (Voutside - Vinside) * Amps

(make sure to convert milliamps to amps or you'll get milliwatts for the result)

I'd make a wild guess and say it's probably safe to go up to 1/16 of a watt dissipation within the connector, so you'd probably wanna make sure that voltage drop is less than .06V or so (assuming the GP2X uses a whole amp, but it's probably a lot less).

Be careful with that input voltage though, 3.9V is probably too high. I'd try to keep it within 3.1 to 3.5V if possible.

The only other possible problem I can think of is if the internal regulator doesn't like it if its output is being powered while it has no input power, but if you checked how the DC input works, maybe it's already set up like that. If not, maybe having a dummy plug in the DC in socket disconnects the regulator.

In short, it's hard to tell without experimenting, unless someone's already tried it with the EXT connector, but my phone charger has a similarly styled connector and only uses 3 pins (probably 1 for sense and 2 for power), so it's probably safe to put as many amps as the GP2X uses through it, especially with 4 pins.
 
I'd make a wild guess and say it's probably safe to go up to 1/16 of a watt dissipation within the connector, so you'd probably wanna make sure that voltage drop is less than .06V or so (assuming the GP2X uses a whole amp, but it's probably a lot less).

Be careful with that input voltage though, 3.9V is probably too high. I'd try to keep it within 3.1 to 3.5V if possible.

The only other possible problem I can think of is if the internal regulator doesn't like it if its output is being powered while it has no input power, but if you checked how the DC input works, maybe it's already set up like that. If not, maybe having a dummy plug in the DC in socket disconnects the regulator.

In short, it's hard to tell without experimenting, unless someone's already tried it with the EXT connector, but my phone charger has a similarly styled connector and only uses 3 pins (probably 1 for sense and 2 for power), so it's probably safe to put as many amps as the GP2X uses through it, especially with 4 pins.

Good points, thanks.

The connector would be straight-through feed so no real need to worry
about dissipation losses in it.

The suggestion of 3.9V is derived from another posting about overall
gp2x power consumption where testing revealed 3.7 to 3.9 volts might
be better than 3.0 to 3.3 output from the battery for reducing the
current flow.

Don't know anything about the internal regulator. If it had an unpowered
output impedance high enough then it shouldn't be a problem. I'm a bit
afraid of the consequences of experimenting - a bricked unit still shows
some signs of life - a fried regulator would put out all the lights. :(
 
Last edited by a moderator:
I had assumed that people were testing different voltages using the battery pins, but if the DC in socket is on the battery side (probably isolated with a diode as to not charge the batteries), then you could probably put any reasonable voltage you want on it (look up the datasheet on the regulator to find what range it accepts).

But I imagine the 3.3V pins on the EXT port are after the regulator, so you'd want to be more careful about the voltage on there. Maybe the regulator's datasheet specifies its behavior when it's unpowered - I don't have a GP2X yet so I can't look it up. It'll likely be an 8 pin or so chip with a nearby capacitor and inductor, so it should be easy to find.
 
I had assumed that people were testing different voltages using the battery pins, but if the DC in socket is on the battery side (probably isolated with a diode as to not charge the batteries), then you could probably put any reasonable voltage you want on it (look up the datasheet on the regulator to find what range it accepts).

But I imagine the 3.3V pins on the EXT port are after the regulator, so you'd want to be more careful about the voltage on there. Maybe the regulator's datasheet specifies its behavior when it's unpowered - I don't have a GP2X yet so I can't look it up. It'll likely be an 8 pin or so chip with a nearby capacitor and inductor, so it should be easy to find.

Thanks, BradN, for the advice. Having another brain at work on a problem
is definitely an improvement - I'm sure mine runs at only half power some
times :)

Your comments reinforce my thinking that it would be safer to run a separate
cable to the DC input socket and avoid trying to power-up via the EXT connector.
If I shrink wrap the EXT cable and the power cable as one then it will look like a
single cable and avoid tangles or other problems.
 
Last edited by a moderator:
Does anyone know if we can buy a ready made serial cable for the GP2X? I am prepared to build one if I must...
 
is it possible to modify & use the tvout cable? can extra wires be soldered on the connector?

Has anyone tried connecting the GP32 to gp2x via serial cable.I guess you wont even need the max3232
 
A 1 on rs232 is -3 volts to -12 (or lower) a 0 is +3 to +12 (or higher) and -3 to +3 is no mans land...The data field is lsbit first so if you stand on your head when looking at a trace on a scope it will look "right"...

I am trying to modify a samsung cable, not an easy soldering job, not sure I am going to succeed. Anyone figure out where to find connectors like this? Ideally you would want to make a pcboard to solder the pins down to just like the samsung cable. Even better a breakout box/pcboard that brings out each pin to a hole or pad that is easier to solder to or get at.

David
 
dwelch posted on Jul 20 2006 at 09:00 PM said:
I am trying to modify a samsung cable, not an easy soldering job, not sure I am going to succeed. Anyone

Whew, got it. Word of advice, plan ahead, figure out how you are going to fit the thing back in the samsung backshell before you solder, not a lot of room and you are stressing the pins as you do it.

Hyperterm 115200 baud 8 bits no parity no handshake and you can watch your gp2x boot...

David
 
Last edited by a moderator:
Back
Top