]> sigrok.org Git - sigrok-dumps.git/blame - i2c/wii_nunchuk/README
morse: demodulated synthetic Wikipedia signal
[sigrok-dumps.git] / i2c / wii_nunchuk / README
CommitLineData
4c10034e
UH
1-------------------------------------------------------------------------------
2Nintendo Wii Nunchuk controller
3-------------------------------------------------------------------------------
4
5This is a collection of example captures of I2C traffic from/to a Nintendo
6Wii Nunchuk game controller.
7
8A Dangerous Prototypes Buspirate (v4) was used as I2C master to talk to the
9Nunchuk controller.
10
11Details:
12https://en.wikipedia.org/wiki/Wiimote#Nunchuk
13http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck
14http://dangerousprototypes.com/docs/Bus_Pirate
15http://dangerousprototypes.com/2009/08/19/bus-pirate-wii-nunchuck-quick-guide/
16
17
18Logic analyzer setup
19--------------------
20
21The logic analyzer used was a Saleae Logic (at 1MHz):
22
23 Probe I2C pin
24 -------------------
25 3 (red) SCL
26 7 (blue) SDA
27
28
29Buspirate setup
30---------------
31
32Connections:
33
34 Buspirate Nunchuk I2C breakout adapter
35 ----------------------------------------
36 GND - (GND)
37 +3.3 + (VCC)
38 MOSI d (SDA)
39 CLK c (SCL)
40
41The basic setup after connecting to the Buspirate on /dev/ttyACM0
42(115200, 8n1) via minicom was:
43
44 HiZ>m (mode)
45 (1)>4 (I2C)
46 (1)>2 (I2C mode: hardware)
47 (1)>1 (speed: 100kHz)
48 I2C>W (enable Buspirate power supplies)
49
50See below for further per-file I2C commands used.
51
52
53sigrok
54------
55
56The sigrok command line used was:
57
58 sigrok-cli -d fx2lafw:samplerate=1mhz --time <ms> \
59 -p '3=SCL,7=SDA' -o <filename>
60
61The <ms> and <filename> parameters vary depending on the file.
62
63
64wii_nunchuk_init.sr
65-------------------
66
67I2C>[0xa4 0x40 0x00]
68I2C START BIT
69WRITE: 0xA4 ACK
70WRITE: 0x40 ACK
71WRITE: 0x00 ACK
72I2C STOP BIT
73
74
75wii_nunchuk_set_reg.sr
76----------------------
77
78I2C>[0xa4 0x00]
79I2C START BIT
80WRITE: 0xA4 ACK
81WRITE: 0x00 ACK
82I2C STOP BIT
83
84
85wii_nunchuk_data_idle.sr
86------------------------
87
88No buttons were pressed, the analog stick was not moved.
89
90I2C>[0xa5 r:6]
91I2C START BIT
92WRITE: 0xA5 ACK
93READ: 0x74 ACK 0x7F ACK 0x7B ACK 0x20 ACK 0x7D ACK 0xC7
94NACK
95
96
97wii_nunchuk_data_left.sr
98------------------------
99
100No buttons were pressed, the analog stick was moved to the left.
101
102I2C>[0xa5 r:6]
103I2C START BIT
104WRITE: 0xA5 ACK
105READ: 0x12 ACK 0x7C ACK 0x48 ACK 0x2C ACK 0x97 ACK 0x2F
106NACK
107I2C STOP BIT
108
109
110wii_nunchuk_data_right.sr
111-------------------------
112
113No buttons were pressed, the analog stick was moved to the right.
114
115I2C>[0xa5 r:6]
116I2C START BIT
117WRITE: 0xA5 ACK
118READ: 0xD6 ACK 0x61 ACK 0x4E ACK 0x28 ACK 0x93 ACK 0x2B
119NACK
120I2C STOP BIT
121
122
123wii_nunchuk_data_top.sr
124-----------------------
125
126No buttons were pressed, the analog stick was moved to the top.
127
128I2C>[0xa5 r:6]
129I2C START BIT
130WRITE: 0xA5 ACK
131READ: 0x74 ACK 0x7E ACK 0x8E ACK 0x70 ACK 0x48 ACK 0x97
132NACK
133I2C STOP BIT
134
135
136wii_nunchuk_data_bottom.sr
137--------------------------
138
139No buttons were pressed, the analog stick was moved to the bottom.
140
141I2C>[0xa5 r:6]
142I2C START BIT
143WRITE: 0xA5 ACK
144READ: 0x75 ACK 0x19 ACK 0x43 ACK 0x2F ACK 0x65 ACK 0xA3
145NACK
146I2C STOP BIT
147
148
149wii_nunchuk_button_c.sr
150-----------------------
151
152The C button was pressed.
153
154I2C>[0xa5 r:6]
155I2C START BIT
156WRITE: 0xA5 ACK
157READ: 0x75 ACK 0x7F ACK 0x70 ACK 0x56 ACK 0x9F ACK 0xED
158NACK
159I2C STOP BIT
160
161
162wii_nunchuk_button_z.sr
163-----------------------
164
165The Z button was pressed.
166
167I2C>[0xa5 r:6]
168I2C START BIT
169WRITE: 0xA5 ACK
170READ: 0x75 ACK 0x7F ACK 0x80 ACK 0x78 ACK 0x64 ACK 0x6C
171NACK
172I2C STOP BIT
173
174
175wii_nunchuk_orientation_vertical_top.sr
176---------------------------------------
177
178The Nunchuk was in vertical ("normal") position.
179
180I2C>[0xa5 r:6]
181I2C START BIT
182WRITE: 0xA5 ACK
183READ: 0x75 ACK 0x7F ACK 0x81 ACK 0x78 ACK 0x63 ACK 0x5F
184NACK
185I2C STOP BIT
186
187
188wii_nunchuk_orientation_vertical_bottom.sr
189------------------------------------------
190
191The Nunchuk was in vertical position, help upside-down.
192
193I2C>[0xa5 r:6]
194I2C START BIT
195WRITE: 0xA5 ACK
196READ: 0x75 ACK 0x7F ACK 0x71 ACK 0x83 ACK 0x5D ACK 0xD3
197NACK
198I2C STOP BIT
199
200
201wii_nunchuk_orientation_horizontal_left.sr
202------------------------------------------
203
204The Nunchuk was in horizontal position, pointing to the left.
205
206I2C>[0xa5 r:6]
207I2C START BIT
208WRITE: 0xA5 ACK
209READ: 0x75 ACK 0x7F ACK 0x25 ACK 0x7E ACK 0x7B ACK 0xEB
210NACK
211I2C STOP BIT
212
213
214wii_nunchuk_orientation_horizontal_right.sr
215-------------------------------------------
216
217The Nunchuk was in horizontal position, pointing to the right.
218
219I2C>[0xa5 r:6]
220I2C START BIT
221WRITE: 0xA5 ACK
222READ: 0x75 ACK 0x7F ACK 0x8F ACK 0x7E ACK 0x75 ACK 0x4B
223NACK
224I2C STOP BIT
225
226
227wii_nunchuk_init_reg_3xdata.sr
228------------------------------
229
230I2C>[0xa4 0x40 0x00]
231I2C START BIT
232WRITE: 0xA4 ACK
233WRITE: 0x40 ACK
234WRITE: 0x00 ACK
235I2C STOP BIT
236
237I2C>[0xa4 0x00]
238I2C START BIT
239WRITE: 0xA4 ACK
240WRITE: 0x00 ACK
241I2C STOP BIT
242
243I2C>[0xa5 r:6]
244I2C START BIT
245WRITE: 0xA5 ACK
246READ: 0x75 ACK 0x7F ACK 0x77 ACK 0x4F ACK 0x82 ACK 0x3B
247NACK
248I2C STOP BIT
249
250(for the above values, no button was pressed)
251
252I2C>[0xa4 0x00]
253I2C START BIT
254WRITE: 0xA4 ACK
255WRITE: 0x00 ACK
256I2C STOP BIT
257
258I2C>[0xa5 r:6]
259I2C START BIT
260WRITE: 0xA5 ACK
261READ: 0x75 ACK 0x7F ACK 0x75 ACK 0x44 ACK 0x82 ACK 0x34
262NACK
263I2C STOP BIT
264
265(for the above values, the Z button was pressed)
266
267I2C>[0xa4 0x00]
268I2C START BIT
269WRITE: 0xA4 ACK
270WRITE: 0x00 ACK
271I2C STOP BIT
272I2C>[0xa5 r:6]
273I2C START BIT
274WRITE: 0xA5 ACK
275READ: 0x75 ACK 0x7F ACK 0x77 ACK 0x43 ACK 0x83 ACK 0x5D
276NACK
277I2C STOP BIT
278
279(for the above values, the C button was pressed)
280