Difference between revisions of "Raspberry Juice"
Jump to navigation
Jump to search
(→Use) |
|||
Line 10: | Line 10: | ||
= Use = |
= Use = |
||
The Raspberry Juice can be found using I2C or SPI at address 0xA4, and has the following read ports: |
The Raspberry Juice can be found using I2C or SPI at address 0xA4, and has the following read ports: |
||
All times are in ms, and are 32 bits in size. |
|||
{| border=1 |
{| border=1 |
||
! Port !! Returned value (in milliseconds) |
! Port !! Returned value (in milliseconds) |
||
Line 16: | Line 17: | ||
|- |
|- |
||
| 0x21 || Time until power on |
| 0x21 || Time until power on |
||
<!-- |
<!-- |
||
|- |
|- |
||
| |
| 0x28 || Absolute scheduled time of power off |
||
|- |
|- |
||
| |
| 0x29 || Absolute scheduled time of power on |
||
--> |
--> |
||
|- |
|||
| 0x30 || button active || 0: don't react to button press. 1: react to button press (default), others: undefined. |
|||
|- |
|||
| 0x31 || external input active || 0: inactive (default), 1: active, others: undefined. |
|||
|- |
|||
| 0x32 || external input polarity || 0: active low (default), 1: active high, others: undefined. |
|||
|- |
|||
| 0x33 || power set on/off state || 0: off, 1: on, others: undefined. |
|||
|- |
|||
| 0x38 || button active powerupstate || 0: don't react to button press. 1: react to button press (default), others: undefined. |
|||
|- |
|||
| 0x39 || external input active powerupstate || 0: inactive (default), 1: active, others: undefined. |
|||
|- |
|||
| 0x3a || external input polarity powerupstate || 0: active low (default), 1: active high, others: undefined. |
|||
|- |
|||
| 0x3b || power set on/off state powerupstate || 0: off, 1: on, others: undefined. |
|||
|} |
|} |
||
Line 31: | Line 50: | ||
|- |
|- |
||
| 0x21 || Set the time in milliseconds until power on |
| 0x21 || Set the time in milliseconds until power on |
||
|- |
|||
| 0x30 || button active || 0: don't react to button press. 1: react to button press (default), others: undefined. |
|||
|- |
|||
| 0x31 || external input active || 0: inactive (default), 1: active, others: undefined. |
|||
|- |
|||
| 0x32 || external input polarity || 0: active low (default), 1: active high, others: undefined. |
|||
|- |
|||
| 0x33 || power set on/off state || 0: off, 1: on, others: undefined. |
|||
|- |
|||
| 0x38 || button active powerupstate || 0: don't react to button press. 1: react to button press (default), others: undefined. |
|||
|- |
|||
| 0x39 || external input active powerupstate || 0: inactive (default), 1: active, others: undefined. |
|||
|- |
|||
| 0x3a || external input polarity powerupstate || 0: active low (default), 1: active high, others: undefined. |
|||
|- |
|||
| 0x3b || power set on/off state powerupstate || 0: off, 1: on, others: undefined. |
|||
|} |
|} |
||
Revision as of 14:33, 31 July 2014
Overview
The Raspberry Juice serves as a power switch for the Raspberry Pi. This expansion board can turn the power on or off at a scheduled time.
Specifications
The Juice always uses about 2mA/10mW. The board is rated for a maximum current of 1A.
Use
The Raspberry Juice can be found using I2C or SPI at address 0xA4, and has the following read ports: All times are in ms, and are 32 bits in size.
Port | Returned value (in milliseconds) | |
---|---|---|
0x20 | Time until power off | |
0x21 | Time until power on | |
0x30 | button active | 0: don't react to button press. 1: react to button press (default), others: undefined. |
0x31 | external input active | 0: inactive (default), 1: active, others: undefined. |
0x32 | external input polarity | 0: active low (default), 1: active high, others: undefined. |
0x33 | power set on/off state | 0: off, 1: on, others: undefined. |
0x38 | button active powerupstate | 0: don't react to button press. 1: react to button press (default), others: undefined. |
0x39 | external input active powerupstate | 0: inactive (default), 1: active, others: undefined. |
0x3a | external input polarity powerupstate | 0: active low (default), 1: active high, others: undefined. |
0x3b | power set on/off state powerupstate | 0: off, 1: on, others: undefined. |
Additionally, the following can be written to the Juice:
Port | Effect | |
---|---|---|
0x20 | Set the time in milliseconds until power off | |
0x21 | Set the time in milliseconds until power on | |
0x30 | button active | 0: don't react to button press. 1: react to button press (default), others: undefined. |
0x31 | external input active | 0: inactive (default), 1: active, others: undefined. |
0x32 | external input polarity | 0: active low (default), 1: active high, others: undefined. |
0x33 | power set on/off state | 0: off, 1: on, others: undefined. |
0x38 | button active powerupstate | 0: don't react to button press. 1: react to button press (default), others: undefined. |
0x39 | external input active powerupstate | 0: inactive (default), 1: active, others: undefined. |
0x3a | external input polarity powerupstate | 0: active low (default), 1: active high, others: undefined. |
0x3b | power set on/off state powerupstate | 0: off, 1: on, others: undefined. |
So, for instance, writing 10000 to port 0x21 and 1000 to 0x20 will cut the power in 1 second, and then turn on the power 9 seconds later.