Skip to content

Commit cb57c06

Browse files
committed
Separate G27 and G25 shifter documentation
The pinout difference between the two is significant enough to necessitate separate documentation. The G27 documentation page is based on notes from disassembling my own G27 shifter.
1 parent 5e14a0a commit cb57c06

File tree

4 files changed

+101
-9
lines changed

4 files changed

+101
-9
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Run one of the library examples in the Arduino IDE by going to `File -> Examples
2424
* [Logitech Two Pedal Peripheral (Gas, Brake)](http://dmadison.github.io/Sim-Racing-Arduino/docs/logitech_pedals.html)
2525
* [Logitech Three Pedal Peripheral (Gas, Brake, Clutch)](http://dmadison.github.io/Sim-Racing-Arduino/docs/logitech_pedals.html)
2626
* [Logitech Driving Force Shifter (G923 / G920 / G29)](http://dmadison.github.io/Sim-Racing-Arduino/docs/logitech_shifter.html)
27-
* [Logitech G25 / G27 Shifter](http://dmadison.github.io/Sim-Racing-Arduino/docs/logitech_shifter_g25.html)
27+
* [Logitech G27 Shifter](http://dmadison.github.io/Sim-Racing-Arduino/docs/logitech_shifter_g27.html)
28+
* [Logitech G25 Shifter](http://dmadison.github.io/Sim-Racing-Arduino/docs/logitech_shifter_g25.html)
2829

2930
## Adapters
3031

docs/pages/devices/logitech_shifter_g25.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Logitech G25 / G27 Shifter {#logitech_shifter_g25}
1+
# Logitech G25 Shifter {#logitech_shifter_g25}
22

3-
The [Logitech G25](https://en.wikipedia.org/wiki/Logitech_G25) and [Logitech G27](https://en.wikipedia.org/wiki/Logitech_G27) shifters are implemented using the SimRacing::LogitechShifterG25 and SimRacing::LogitechShifterG27 classes, respectively. The G25 and G27 shifters function identically, except for the lack of sequential mode on the G27.
3+
The [Logitech G25](https://en.wikipedia.org/wiki/Logitech_G25) shifter is implemented using the SimRacing::LogitechShifterG25 class. See the LogitechShifterG25_Print.ino and LogitechShifterG25_Joystick.ino examples for reference.
44

5-
See the LogitechShifterG25_Print.ino, LogitechShifterG27_Print.ino, LogitechShifterG25_Joystick.ino, and LogitechShifterG27_Joystick.ino examples for reference.
5+
The G25 shifter is near-identical to the [G27 shifter](@ref logitech_shifter_g27). It includes a "sequential" shifting mode, and pins 1 and 7 of the connector are swapped (respectively: power/clock for the G25, clock/power for the G27). These pin swaps are done in the wiring between the DE-9 and internal J11 connector; the circuit board appears to be identical.
66

77
These notes are based off of disassembling my own G25 shifter, with the internal PCB marked "202339-0000 REV. A1".
88

@@ -14,7 +14,7 @@ These notes are based off of disassembling my own G25 shifter, with the internal
1414

1515
<sup>DE-9 graphic from [Aeroid](https://commons.wikimedia.org/wiki/User:Aeroid) @ [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:DE9_Diagram.svg#/media/File:DE-9_Female.svg), modified for scale, colors, and creation of a complementary male version. These graphics are licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).</sup>
1616

17-
Both the G25 and G27 Logitech shifters connect to the wheel base units using [a female DE-9 connector](https://en.wikipedia.org/wiki/D-subminiature). Note that most jumper wires with [DuPont headers](https://en.wikipedia.org/wiki/Jump_wire) will not fit snugly into a DE-9 connector. For reliability and ease of use it's recommended to use a mating male DE-9 connector when interfacing with the shifter.
17+
The Logitech G25 shifter connects to the wheel base unit using [a female DE-9 connector](https://en.wikipedia.org/wiki/D-subminiature). Note that most jumper wires with [DuPont headers](https://en.wikipedia.org/wiki/Jump_wire) will not fit snugly into a DE-9 connector. For reliability and ease of use it's recommended to use a mating male DE-9 connector when interfacing with the shifter.
1818

1919
Note that the DE-9 connector is often erroneously referred to as DB-9. These are the same thing.
2020

@@ -38,9 +38,9 @@ Pin #3 (Latch / Chip Select) is shared between the onboard EEPROM and the shift
3838

3939
Pin #5 (Data In) is used exclusively by the EEPROM. It is also connected to the "Power" LED through a 330 Ohm resistor. Driving this pin LOW will turn on the LED. As the "Sequential Mode" LED is connected using a 470 Ohm resistor, I would recommend using a 100-120 Ohm resistor in series so that the pair are closer in brightness.
4040

41-
Pin #7 (Clock) is connected to the clock inputs of both the EEPROM and the shift registers. It is floating but should typically be held LOW by the microcontroller. Pulsing the pin HIGH (LOW / HIGH / LOW) will shift one bit of data. Be wary of driving this pin to ground without protection, as this pin is also used as a joint power input for the [Logitech Driving Force Shifter](@ref logitech_shifter).
41+
Pin #7 (Clock) is connected to the clock inputs of both the EEPROM and the shift registers. It is floating but should typically be held LOW by the microcontroller. Pulsing the pin HIGH (LOW / HIGH / LOW) will shift one bit of data. Be wary of driving this pin to ground without protection, as this pin is also used as a joint power input for the [Logitech Driving Force Shifter](@ref logitech_shifter) and the [Logitech G27 Shifter](@ref logitech_shifter_g27).
4242

43-
The power pins (#1 / #9) are connected together within the DE-9 connector. Either one can be used, but it is recommended to use #9 for better forwards-compatibility with the [Logitech Driving Force Shifter](@ref logitech_shifter).
43+
The power pins (#1 / #9) are connected together within the DE-9 connector. Either one can be used, but it is recommended to use pin 9 for compatibility with the other shifters.
4444

4545
The shifter's electronics are theoretically compatibile with both 3.3V and 5V logic. Be sure to use the appropriate voltage for the logic level of your microcontroller.
4646

@@ -52,11 +52,11 @@ The shifter includes 12 user-facing buttons:
5252
* One directional pad (D-Pad)
5353
* Four red buttons in a straight line
5454

55-
The shifter also contains two internal buttons: a button on the bottom of the shifter to indicate that it's in reverse, and a button on the sequential mode dial to indicate that it's in sequential mode. These buttons are implemented as part of the SimRacing::LogitechShifterButtons class.
55+
The shifter also contains two internal buttons: a button on the bottom of the shift column to indicate that it's in reverse, and a button on the sequential mode dial to indicate that it's in sequential mode.
5656

5757
### Shift Registers
5858

59-
These buttons are connected to the external DE-9 connector through a series of NXP 74HC165D parallel-to-serial shift registers.
59+
These buttons are connected to the external DE-9 connector through a pair of NXP 74HC165D parallel-to-serial shift registers.
6060

6161
| Button | Register | Bit | Offset | Enum |
6262
|-----------------------|----------|-----|--------|--------------------------------------------------|
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Logitech G27 Shifter {#logitech_shifter_g27}
2+
3+
The [Logitech G27](https://en.wikipedia.org/wiki/Logitech_G27) shifter is implemented using the SimRacing::LogitechShifterG27 class. See the LogitechShifterG27_Print.ino and LogitechShifterG27_Joystick.ino examples for reference.
4+
5+
The G27 shifter is near-identical to the [G25 shifter](@ref logitech_shifter_g25). It is missing the "sequential" mode switch and mechanics, and pins 1 and 7 of the connector are swapped (respectively: power/clock for the G25, clock/power for the G27). These pin swaps are done in the wiring between the DE-9 and internal J11 connector; the circuit board appears to be identical (including unpopulated pads for the sequential mode switch and sequential mode LED).
6+
7+
These notes are based off of disassembling my own G27 shifter, with the internal PCB marked "210-001096 REV. 001".
8+
9+
## Connector
10+
11+
| ![DE-9_Male](DE9_Male.svg) | ![DE-9_Female](DE9_Female.svg) |
12+
| :-----------------------: | :---------------------------: |
13+
| DE-9 Male Connector | DE-9 Female connector |
14+
15+
<sup>DE-9 graphic from [Aeroid](https://commons.wikimedia.org/wiki/User:Aeroid) @ [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:DE9_Diagram.svg#/media/File:DE-9_Female.svg), modified for scale, colors, and creation of a complementary male version. These graphics are licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).</sup>
16+
17+
The Logitech G27 shifter connects to the wheel base unit using [a female DE-9 connector](https://en.wikipedia.org/wiki/D-subminiature). Note that most jumper wires with [DuPont headers](https://en.wikipedia.org/wiki/Jump_wire) will not fit snugly into a DE-9 connector. For reliability and ease of use it's recommended to use a mating male DE-9 connector when interfacing with the shifter.
18+
19+
Note that the DE-9 connector is often erroneously referred to as DB-9. These are the same thing.
20+
21+
## Pinout
22+
23+
| Function | DE-9 Pin | Internal J11 Pin | Data Direction | Wire Color | Necessary | Recommended Pin |
24+
|---------------------------|----------|------------------|----------------|------------------|-----------|-----------------|
25+
| Clock (SCLK) | 1 | 6 | In | Purple | X | 6 |
26+
| Data Output (SDO) | 2 | 7 | Out | Gray | X | 7 |
27+
| Latch / Chip Select | 3 | 5 | In | Yellow | X | 5 |
28+
| X Axis Wiper | 4 | 3 | Out | Orange | X | A0 |
29+
| Data In (SDI) / Power LED | 5 | 2 | In | White | | |
30+
| Ground | 6 | 8 | - | Black (Sheathed) | X | GND |
31+
| Power | 7 | 1 | - | Red | | |
32+
| Y Axis Wiper | 8 | 4 | Out | Green | X | A2 |
33+
| Power | 9 | 1 | - | Red | X | VCC |
34+
35+
Pin #1 (Clock) is connected to the clock inputs of both the EEPROM and the shift registers. It is floating but should typically be held LOW by the microcontroller. Pulsing the pin HIGH (LOW / HIGH / LOW) will shift one bit of data. Be wary of driving this pin to ground without protection, as this pin is also used as a joint power input for the [Logitech G25 Shifter](@ref logitech_shifter_g25).
36+
37+
Pin #2 (Data Output) is connected directly to the output of the EEPROM, and connected to the output of the shift registers through a 1000 Ohm resistor.
38+
39+
Pin #3 (Latch / Chip Select) is shared between the onboard EEPROM and the shift registers. It is floating but should typically be held HIGH by the microcontroller. It must be pulsed once (HIGH / LOW / HIGH) to latch the data into the shift registers. Holding it LOW instructs the EEPROM to listen for commands.
40+
41+
Pin #5 (Data In) is used exclusively by the EEPROM. It is also connected to the "Power" LED through a 330 Ohm resistor. Driving this pin LOW will turn on the LED.
42+
43+
The power pins (#7 / #9) are connected together within the DE-9 connector. Either one can be used, but it is recommended to use pin 9 for compatibility with the other shifters.
44+
45+
The shifter's electronics are theoretically compatibile with both 3.3V and 5V logic. Be sure to use the appropriate voltage for the logic level of your microcontroller.
46+
47+
## Buttons
48+
49+
The shifter includes 12 user-facing buttons:
50+
51+
* Four black buttons in a diamond pattern
52+
* One directional pad (D-Pad)
53+
* Four red buttons in a straight line
54+
55+
The shifter also contains one internal button on the bottom of the shift column to indicate that it's in reverse.
56+
57+
### Shift Registers
58+
59+
These buttons are connected to the external DE-9 connector through a pair of NXP 74HC165D parallel-to-serial shift registers.
60+
61+
| Button | Register | Bit | Offset | Enum |
62+
|-----------------------|----------|-----|--------|--------------------------------------------------|
63+
| (Unused) | Bottom | D7 | 15 | SimRacing::LogitechShifterG27::BUTTON_UNUSED1 |
64+
| Reverse | Bottom | D6 | 14 | SimRacing::LogitechShifterG27::BUTTON_REVERSE |
65+
| (Unused) | Bottom | D5 | 13 | SimRacing::LogitechShifterG27::BUTTON_UNUSED2 |
66+
| Sequential Mode | Bottom | D4 | 12 | SimRacing::LogitechShifterG27::BUTTON_SEQUENTIAL |
67+
| Red #3 | Bottom | D3 | 11 | SimRacing::LogitechShifterG27::BUTTON_3 |
68+
| Red #2 | Bottom | D2 | 10 | SimRacing::LogitechShifterG27::BUTTON_2 |
69+
| Red #4 | Bottom | D1 | 9 | SimRacing::LogitechShifterG27::BUTTON_4 |
70+
| Red #1 | Bottom | D0 | 8 | SimRacing::LogitechShifterG27::BUTTON_1 |
71+
| Black Up | Top | D7 | 7 | SimRacing::LogitechShifterG27::BUTTON_NORTH |
72+
| Black Right | Top | D6 | 6 | SimRacing::LogitechShifterG27::BUTTON_EAST |
73+
| Black Left | Top | D5 | 5 | SimRacing::LogitechShifterG27::BUTTON_WEST |
74+
| Black Down | Top | D4 | 4 | SimRacing::LogitechShifterG27::BUTTON_SOUTH |
75+
| Directional Pad Right | Top | D3 | 3 | SimRacing::LogitechShifterG27::DPAD_RIGHT |
76+
| Directional Pad Left | Top | D2 | 2 | SimRacing::LogitechShifterG27::DPAD_LEFT |
77+
| Directional Pad Down | Top | D1 | 1 | SimRacing::LogitechShifterG27::DPAD_DOWN |
78+
| Directional Pad Up | Top | D0 | 0 | SimRacing::LogitechShifterG27::DPAD_UP |
79+
80+
Data from the shift registers can be read using the Data Output (DE-9 #2), Latch (DE-9 #3), and Clock (DE-9 #1) pins. The latch must be pulsed LOW (HIGH / LOW / HIGH), then data read out via the data output pin while the clock is pulsed repeatedly from LOW to HIGH.
81+
82+
All buttons will report a '1' state if they are pressed, and a '0' state if they are unpressed. Internally, all of these buttons are held to ground with 10k pull-downs.
83+
84+
The red buttons are numbered from left to right, 1-4. The black buttons use cardinal directions.
85+
86+
## EEPROM Storage
87+
88+
The Logitech shifter has an internal EEPROM chip, presumably for storing settings and calibration data. In my shifter this is an [ST Microelectronics M95010-W](https://www.st.com/resource/en/datasheet/m95010-w.pdf) in an SO8 package. It has 1 Kbit of memory and can be read and written to via the DE-9 connector. The EERPOM does not need to be used in order to retrieve the control surface data from the shifter.
89+
90+
This library does not implement EEPROM support, either for reading from the EEPROM or utilizing its data.

docs/pages/supported_devices.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111

1212
- @subpage logitech_pedals
1313
- @subpage logitech_shifter
14+
- @subpage logitech_shifter_g27
1415
- @subpage logitech_shifter_g25

0 commit comments

Comments
 (0)