-# Power Board Control Registers
+# Power Board Communication
## Communication
UART, 57600 baud, 8N1
| 2 | Voltage V_in | (RO)|
| 3 | Current C_in | (RO)|
| 4 | Temperature | (RO)|
-| 5 | [15:4] Firmware; [3:2] reserved; [1] Switch ; [0] LED | (RO)|
+| 5 | [15:4] Firmware; [1] red LED; [0] yellow LED | (RO)|
| 6 | Current Offset | |
| 7 | Voltage V_out | (RO)|
* Bit [2..0]: 0-7 voltage level.
* Each step increases voltage by about 200 mV.
* One setting per group and channel.
-
### Register 2: input voltage
* Input voltage in multiples of 38.6 mV
### Register 4: temperature
* die temperature of one DCDC converter
- * Temperature = ((v*2-250)/9.5)+25
+ * Temperature = ((v*2-250)/9.5)+25 (LSB: 2 mV, 9.5mV/K, 250mV @ 25°C)
### Register 5: info
* Bit [15..4] Firmware Version
+ * Bit [1] Switch yellow LED (near USB)
+ * Bit [0] Switch red LED (near USB)
+
### Register 6: current offset
* correction offset for current measurement. Currently not used
* output voltage of one voltage of each group
* in units of 5 mV
+## Scan Chain Command
+Command "S00" - returns the number of boards present in the chain, excluding the master
+controller (Power Distributor)
+## Answers
+Answers are of the same format as requests, but starting with 'A' and controller "00".
-## Command Line Tool
+# Power Distributor Registers
+
+Distributor has controller number 0xFF, group 0, channel 0.
+All other addresses are forwarded to UART
+
+
+## Registers
+
+
+| Registers | Description | Mode |
+|:---------:|-------------------------------------------------------|:----:|
+| 4 | Temperature in °C/100 | (RO) |
+| 5 | [15:4] Firmware | (RO) |
+| A | [3:0] CB3 - CB0 pins | (RW) |
+
+
+# Command Line Tool
All registers can be read and written using `mdc_powerboard.pl`.
mdc_powerboard.pl -d DEVICE -b BOARD [-c CHANNEL] [-o OUTPUT] -r REGISTER [-v VALUE]
* mount 2 screws to secure green power socket
* check R42 / R43 solder bridges
+* remove metal cross from small cage
* add serial number sticker
* connect 5V to pin 2 and GND to pin 3
* power consumption: ~ 950 mW
* short boot pins, press reset button
* program
* reset, check power consumption
-* install display
+* install display, reset
* connect LAN cable
* put MAC to database file
* serials/serials_powerdistributor.db
* test temperature sensor
- * command:
+ * command: `./mdc_powerboard.pl -d 192.168.10.103 -b -1 -r 4`
* connect LVDS pulse generator to Reference time connector
* check all 20 outputs for proper signals
* mount to base plate