From c239fc53c9b26ada15bccf9372abd0f954b2ca61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=93=B2=E5=B1=8E=E5=B0=86=E5=86=9B?= <37292630+wlmh110@users.noreply.github.com> Date: Tue, 11 Jan 2022 11:16:07 +0800 Subject: [PATCH] Updated PiSugar 3 Series (markdown) --- PiSugar-3-Series.md | 50 +-------------------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/PiSugar-3-Series.md b/PiSugar-3-Series.md index 21fd684..a442f92 100644 --- a/PiSugar-3-Series.md +++ b/PiSugar-3-Series.md @@ -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.