Updated PiSugar 3 Series (markdown)

铲屎将军 2022-01-11 11:16:07 +08:00
parent ed9be6a28e
commit c239fc53c9

@ -53,55 +53,7 @@ PiSugar 3 is the third generation of PiSugar Raspberry Pi battery power supply s
## Table of I2C
Control Register Address: 0x57
Register address 7 6 5 4 3 2 1 0
0x02 Power supply Charging switch Output switch Device turns on when power is connected Anti-Mistaken Touch Retention Power button state
R RW RW RW RW R R
0x03 Retention Automatic hiberate Retention Soft shutdown Soft shutdown sign Retention
R RW R RW R R
0x04 Chip temperature, -40-85 degrees Celsius, 0 means -40 degrees Celsius
R
0x06 Software watchdog Retention Kick the dog Retention
RW R W R
0x07 Software watchdog timeout setting (*2s)
RW
0x08 Retention Custom button
R RW
0X20 Charging protection Retention SCL awakening Retention
RW R RW R
0x22 High battery voltage
RW
0x23 Low battery voltage
RW
0x2A The proportion of electricity (0-100%)
R
0x30 Write protection Retention Write protection Retention Write protection Retention
RW R RW R RW R
0X31 RTC-YY
RW
0X32 RTC-MM
RW
0X33 RTC-DD
RW
0X34 RTC-WeekDay
RW
0X35 RTC-HH
RW
0X36 RTC-mm
RW
0X37 RTC-SS
RW
0X40 Timing boot Retention
RW R
0X44 Retention ALM-WeekDay
R RW
0X45 ALM-HH
RW
0X46 ALM-mm
RW
0X47 ALM-SS
RW
![I2C address table](https://cdn.pisugar.com/img/I2Ctable.png)
* In the I2C register, the retention bit is reserved for the system test interface and it is forbidden to read-in the data.
* When directly modifying the I2C register, you need to read the value of the corresponding register first. Write the calculated value into this register after performing AND operation on the BIT bits that need to be modified. At the same time, make sure that only the bits that need to be modified are modified, and the values of other bits cannot be modified at will.