From: Uwe Hermann Date: Sat, 12 May 2012 23:35:54 +0000 (+0200) Subject: Add various Wii Nunchuk (I2C) dumps. X-Git-Tag: sigrok-dumps-0.1.0~3 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4c10034e25636ec298aa725bee9c80e869eeb6f6;p=libsigrokdecode.git Add various Wii Nunchuk (I2C) dumps. --- diff --git a/i2c/wii_nunchuk/README b/i2c/wii_nunchuk/README new file mode 100644 index 0000000..d235554 --- /dev/null +++ b/i2c/wii_nunchuk/README @@ -0,0 +1,280 @@ +------------------------------------------------------------------------------- +Nintendo Wii Nunchuk controller +------------------------------------------------------------------------------- + +This is a collection of example captures of I2C traffic from/to a Nintendo +Wii Nunchuk game controller. + +A Dangerous Prototypes Buspirate (v4) was used as I2C master to talk to the +Nunchuk controller. + +Details: +https://en.wikipedia.org/wiki/Wiimote#Nunchuk +http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck +http://dangerousprototypes.com/docs/Bus_Pirate +http://dangerousprototypes.com/2009/08/19/bus-pirate-wii-nunchuck-quick-guide/ + + +Logic analyzer setup +-------------------- + +The logic analyzer used was a Saleae Logic (at 1MHz): + + Probe I2C pin + ------------------- + 3 (red) SCL + 7 (blue) SDA + + +Buspirate setup +--------------- + +Connections: + + Buspirate Nunchuk I2C breakout adapter + ---------------------------------------- + GND - (GND) + +3.3 + (VCC) + MOSI d (SDA) + CLK c (SCL) + +The basic setup after connecting to the Buspirate on /dev/ttyACM0 +(115200, 8n1) via minicom was: + + HiZ>m (mode) + (1)>4 (I2C) + (1)>2 (I2C mode: hardware) + (1)>1 (speed: 100kHz) + I2C>W (enable Buspirate power supplies) + +See below for further per-file I2C commands used. + + +sigrok +------ + +The sigrok command line used was: + + sigrok-cli -d fx2lafw:samplerate=1mhz --time \ + -p '3=SCL,7=SDA' -o + +The and parameters vary depending on the file. + + +wii_nunchuk_init.sr +------------------- + +I2C>[0xa4 0x40 0x00] +I2C START BIT +WRITE: 0xA4 ACK +WRITE: 0x40 ACK +WRITE: 0x00 ACK +I2C STOP BIT + + +wii_nunchuk_set_reg.sr +---------------------- + +I2C>[0xa4 0x00] +I2C START BIT +WRITE: 0xA4 ACK +WRITE: 0x00 ACK +I2C STOP BIT + + +wii_nunchuk_data_idle.sr +------------------------ + +No buttons were pressed, the analog stick was not moved. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x74 ACK 0x7F ACK 0x7B ACK 0x20 ACK 0x7D ACK 0xC7 +NACK + + +wii_nunchuk_data_left.sr +------------------------ + +No buttons were pressed, the analog stick was moved to the left. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x12 ACK 0x7C ACK 0x48 ACK 0x2C ACK 0x97 ACK 0x2F +NACK +I2C STOP BIT + + +wii_nunchuk_data_right.sr +------------------------- + +No buttons were pressed, the analog stick was moved to the right. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0xD6 ACK 0x61 ACK 0x4E ACK 0x28 ACK 0x93 ACK 0x2B +NACK +I2C STOP BIT + + +wii_nunchuk_data_top.sr +----------------------- + +No buttons were pressed, the analog stick was moved to the top. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x74 ACK 0x7E ACK 0x8E ACK 0x70 ACK 0x48 ACK 0x97 +NACK +I2C STOP BIT + + +wii_nunchuk_data_bottom.sr +-------------------------- + +No buttons were pressed, the analog stick was moved to the bottom. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x19 ACK 0x43 ACK 0x2F ACK 0x65 ACK 0xA3 +NACK +I2C STOP BIT + + +wii_nunchuk_button_c.sr +----------------------- + +The C button was pressed. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x70 ACK 0x56 ACK 0x9F ACK 0xED +NACK +I2C STOP BIT + + +wii_nunchuk_button_z.sr +----------------------- + +The Z button was pressed. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x80 ACK 0x78 ACK 0x64 ACK 0x6C +NACK +I2C STOP BIT + + +wii_nunchuk_orientation_vertical_top.sr +--------------------------------------- + +The Nunchuk was in vertical ("normal") position. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x81 ACK 0x78 ACK 0x63 ACK 0x5F +NACK +I2C STOP BIT + + +wii_nunchuk_orientation_vertical_bottom.sr +------------------------------------------ + +The Nunchuk was in vertical position, help upside-down. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x71 ACK 0x83 ACK 0x5D ACK 0xD3 +NACK +I2C STOP BIT + + +wii_nunchuk_orientation_horizontal_left.sr +------------------------------------------ + +The Nunchuk was in horizontal position, pointing to the left. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x25 ACK 0x7E ACK 0x7B ACK 0xEB +NACK +I2C STOP BIT + + +wii_nunchuk_orientation_horizontal_right.sr +------------------------------------------- + +The Nunchuk was in horizontal position, pointing to the right. + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x8F ACK 0x7E ACK 0x75 ACK 0x4B +NACK +I2C STOP BIT + + +wii_nunchuk_init_reg_3xdata.sr +------------------------------ + +I2C>[0xa4 0x40 0x00] +I2C START BIT +WRITE: 0xA4 ACK +WRITE: 0x40 ACK +WRITE: 0x00 ACK +I2C STOP BIT + +I2C>[0xa4 0x00] +I2C START BIT +WRITE: 0xA4 ACK +WRITE: 0x00 ACK +I2C STOP BIT + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x77 ACK 0x4F ACK 0x82 ACK 0x3B +NACK +I2C STOP BIT + +(for the above values, no button was pressed) + +I2C>[0xa4 0x00] +I2C START BIT +WRITE: 0xA4 ACK +WRITE: 0x00 ACK +I2C STOP BIT + +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x75 ACK 0x44 ACK 0x82 ACK 0x34 +NACK +I2C STOP BIT + +(for the above values, the Z button was pressed) + +I2C>[0xa4 0x00] +I2C START BIT +WRITE: 0xA4 ACK +WRITE: 0x00 ACK +I2C STOP BIT +I2C>[0xa5 r:6] +I2C START BIT +WRITE: 0xA5 ACK +READ: 0x75 ACK 0x7F ACK 0x77 ACK 0x43 ACK 0x83 ACK 0x5D +NACK +I2C STOP BIT + +(for the above values, the C button was pressed) + diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_bottom.sr b/i2c/wii_nunchuk/wii_nunchuk_data_bottom.sr new file mode 100644 index 0000000..037d915 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_bottom.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_button_c.sr b/i2c/wii_nunchuk/wii_nunchuk_data_button_c.sr new file mode 100644 index 0000000..021ca1f Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_button_c.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_button_z.sr b/i2c/wii_nunchuk/wii_nunchuk_data_button_z.sr new file mode 100644 index 0000000..3e39403 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_button_z.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_idle.sr b/i2c/wii_nunchuk/wii_nunchuk_data_idle.sr new file mode 100644 index 0000000..430e2f5 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_idle.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_left.sr b/i2c/wii_nunchuk/wii_nunchuk_data_left.sr new file mode 100644 index 0000000..f0f1319 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_left.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_right.sr b/i2c/wii_nunchuk/wii_nunchuk_data_right.sr new file mode 100644 index 0000000..a2728de Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_right.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_data_top.sr b/i2c/wii_nunchuk/wii_nunchuk_data_top.sr new file mode 100644 index 0000000..7f14196 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_data_top.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_init.sr b/i2c/wii_nunchuk/wii_nunchuk_init.sr new file mode 100644 index 0000000..e971744 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_init.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_init_reg_3xdata.sr b/i2c/wii_nunchuk/wii_nunchuk_init_reg_3xdata.sr new file mode 100644 index 0000000..a7232fc Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_init_reg_3xdata.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_orientation_horizontal_left.sr b/i2c/wii_nunchuk/wii_nunchuk_orientation_horizontal_left.sr new file mode 100644 index 0000000..daf77b0 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_orientation_horizontal_left.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_orientation_horizontal_right.sr b/i2c/wii_nunchuk/wii_nunchuk_orientation_horizontal_right.sr new file mode 100644 index 0000000..d8ba631 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_orientation_horizontal_right.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_orientation_vertical_bottom.sr b/i2c/wii_nunchuk/wii_nunchuk_orientation_vertical_bottom.sr new file mode 100644 index 0000000..846d710 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_orientation_vertical_bottom.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_orientation_vertical_top.sr b/i2c/wii_nunchuk/wii_nunchuk_orientation_vertical_top.sr new file mode 100644 index 0000000..f7d4521 Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_orientation_vertical_top.sr differ diff --git a/i2c/wii_nunchuk/wii_nunchuk_set_reg.sr b/i2c/wii_nunchuk/wii_nunchuk_set_reg.sr new file mode 100644 index 0000000..4c8015a Binary files /dev/null and b/i2c/wii_nunchuk/wii_nunchuk_set_reg.sr differ