User Tools

Site Tools


uic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
uic [2025/02/08 01:04] arisoturauic [2025/04/18 12:00] (current) arisotura
Line 11: Line 11:
 | 1   | PA0  | SWIM pin | | 1   | PA0  | SWIM pin |
 | 2   | PA1/NRST  | Reset | | 2   | PA1/NRST  | Reset |
-| 3   | PA2  | DPAD right | +| 3   | PA2  | DPAD right (active low) 
-| 4   | PA3  | DPAD left | +| 4   | PA3  | DPAD left (active low) 
-| 5   | PA4  | DPAD down |+| 5   | PA4  | DPAD down (active low) |
 | 6   | PA5  | Left joystick Y | | 6   | PA5  | Left joystick Y |
 | 7   | PA6  | Left joystick X | | 7   | PA6  | Left joystick X |
Line 22: Line 22:
 | 12  | VccA        | Analog supply voltage | | 12  | VccA        | Analog supply voltage |
 | 13  | Vref+       | ADC positive reference | | 13  | Vref+       | ADC positive reference |
-| 14  | PG0  | DPAD up |+| 14  | PG0  | DPAD up (active low) |
 | 15  | PG1  | Expansion detect (through 1k resistor) | | 15  | PG1  | Expansion detect (through 1k resistor) |
 | 16  | PG2  | Headphone detect (active low) | | 16  | PG2  | Headphone detect (active low) |
Line 30: Line 30:
 | 20  | PE1  | Blue LED? | | 20  | PE1  | Blue LED? |
 | 21  | PE2  | Red LED | | 21  | PE2  | Red LED |
-| 22  | PE3  | Button ZL | +| 22  | PE3  | Button ZL (active low) 
-| 23  | PE4  | Button L |+| 23  | PE4  | Button L (active low) |
 | 24  | PE5  | Sync button (active low) | | 24  | PE5  | Sync button (active low) |
-| 25  | PD0  | Button ZR | +| 25  | PD0  | Button ZR (active low) 
-| 26  | PD1  | Button R | +| 26  | PD1  | Button R (active low) 
-| 27  | PD2  | Wifi board powered up (input, from wifi board pin 11) |+| 27  | PD2  | Wifi board powered up (input, from wifi board pin 11) (or WoWL signal?) |
 | 28  | PD3  | Unused?? (output, not connected to anything) | | 28  | PD3  | Unused?? (output, not connected to anything) |
 | 29  | Vcc3  | Supply voltage | | 29  | Vcc3  | Supply voltage |
Line 51: Line 51:
 | 41  | PF4  | UIC SPI - compass chipselect | | 41  | PF4  | UIC SPI - compass chipselect |
 | 42  | PF5  | UIC SPI - gyroscope chipselect | | 42  | PF5  | UIC SPI - gyroscope chipselect |
-| 43  | PF6  | Button A | +| 43  | PF6  | Button A (active low) 
-| 44  | PF7  | Button B | +| 44  | PF7  | Button B (active low) 
-| 45  | PD4  | Button X | +| 45  | PD4  | Button X (active low) 
-| 46  | PD5  | Button Y |+| 46  | PD5  | Button Y (active low) |
 | 47  | PD6  | Right joystick X | | 47  | PD6  | Right joystick X |
 | 48  | PD7  | Right joystick Y | | 48  | PD7  | Right joystick Y |
Line 65: Line 65:
 | 55  | Vcc2  | Supply voltage | | 55  | Vcc2  | Supply voltage |
 | 56  | GND2  | Ground | | 56  | GND2  | Ground |
-| 57  | PC2  | Button + | +| 57  | PC2  | Button + (active low) 
-| 58  | PC3  | Button - | +| 58  | PC3  | Button - (active low) 
-| 59  | PC4  | HOME button |+| 59  | PC4  | HOME button (active low) |
 | 60  | PC5  | TV button | | 60  | PC5  | TV button |
 | 61  | PC6  | Left joystick button | | 61  | PC6  | Left joystick button |
-| 62  | PC7  | ?? output, to PMIC pin 13 |+| 62  | PC7  | ?? shutdown output? output, to PMIC pin 13 |
 | 63  | PE6  | Blue LED (?) (to Q104) | | 63  | PE6  | Blue LED (?) (to Q104) |
-| 64  | PE7  | Power button (active low) |+| 64  | PE7  | Power button (active low) (actually PMIC pin 24) |
  
 Pins 1 and 2 are connected to test points TP233 and TP234 respectively. Pin 1 doesn't seem to be connected to anything else. Pin 2 is connected to a simple reset circuit. Pins 1 and 2 are connected to test points TP233 and TP234 respectively. Pin 1 doesn't seem to be connected to anything else. Pin 2 is connected to a simple reset circuit.
Line 188: Line 188:
 | 0x06      | 0          | 0              | EEPROM write enable | | 0x06      | 0          | 0              | EEPROM write enable |
 | 0x07      | 0          | 128            | query input data | | 0x07      | 0          | 128            | query input data |
-| 0x08      | 2          | 0              | |+| 0x08      | 2          | 0              | set status LED brightness |
 | 0x09      | 1          | 0              | begin firmware update | | 0x09      | 1          | 0              | begin firmware update |
 | 0x0A      | 0          | 6              | set various battery thresholds | | 0x0A      | 0          | 6              | set various battery thresholds |
 | 0x0B      | 0          | 4              | get UIC firmware version | | 0x0B      | 0          | 4              | get UIC firmware version |
 | 0x0C      | 102        | 0              | ? | | 0x0C      | 102        | 0              | ? |
-| 0x0D      | 1          | 0              | +| 0x0D      | 1          | 0              | set mic status bit0-1 
-| 0x0E      | 1          | 0              | |+| 0x0E      | 1          | 0              | set mic status bit2-3 |
 | 0x0F      | 0          | 2              | get previous and current UIC state | | 0x0F      | 0          | 2              | get previous and current UIC state |
 | 0x10      | 0          | 1              | get battery level | | 0x10      | 0          | 1              | get battery level |
 | 0x11      | 1          | 0              | ? | | 0x11      | 1          | 0              | ? |
 | 0x12      | 1          | 0              | toggle backlight | | 0x12      | 1          | 0              | toggle backlight |
-| 0x13      | 0          | 1              | +| 0x13      | 0          | 1              | get wifi board ready status 
-| 0x14      | 0          | 0              | ? | +| 0x14      | 0          | 0              | ? delay shutdown by resetting shutdown timer?? | 
-| 0x15      | 0          | 0              | reboot? go idle? +| 0x15      | 0          | 0              | reboot in state 11 
-| 0x16      | 0          | 0              | ? set 'battery low' blinking light? |+| 0x16      | 0          | 0              | shutdown (will reboot in state 11 if AC connected) |
 | 0x17      | 1          | 0              | ? | | 0x17      | 1          | 0              | ? |
 | 0x18      | 0          | 1              | ? | | 0x18      | 0          | 1              | ? |
Line 279: Line 279:
  
 Query input data. Query input data.
 +
 +Important note: polling input too often may cause the UIC to return bogus data. For reference, the stock firmware polls every ~5.5 milliseconds.
  
 Response: Response:
Line 352: Line 354:
  
 The input data is little-endian. The input data is little-endian.
 +
 +
 +==== Command 08 ====
 +
 +Set status LED brightness for the given LED.
 +
 +First parameter byte is the number of the LED to set: 0 is the HOME button LED, 1 is the blue battery LED, 2 is the red battery LED, and 3 is the amber battery LED. Any value higher than 3 is interpreted as 3.
 +
 +Second parameter byte is the brightness, ranging from 0 (off) to 255 (full brightness).
 +
 +Note that only one battery LED can be active at a time. Setting any of the blue/red/amber LEDs turns off the other battery LEDs.
 +
 +This command will be ignored if the UIC is overriding the battery LED (for example, during the blue LED fade-out at boot).
  
  
Line 380: Line 395:
  
 Get battery level. The returned battery level is expressed in steps, based on the thresholds set by command 0x0A. Get battery level. The returned battery level is expressed in steps, based on the thresholds set by command 0x0A.
 +
 +Returns 0 when the AC adapter is connected.
  
 Response: one byte, the battery level step. Response: one byte, the battery level step.
uic.1738976649.txt.gz · Last modified: 2025/02/08 01:04 by arisotura

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki