UPS HAT (E) Register

From Waveshare Wiki
Jump to: navigation, search

Introduction

  • It is easy to operate and use as the UPS HAT (E) can read module information through I2C communication. The module slave address: 0x2D.

Register Table

  • ID Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x00 R
Fixed value: 0x0a
  • Automatically Rebooting Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x01 R/W
Fixed value: 0x0b, write "0x55" to power off and enable the incoming call function
  • Charging Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x02 R 1: charging
0: non-charging
1: fast charging
0: no fast charging
1: VBUS is powered
0: VBUS is not powered
Fixed: 00
000: standby, 001: trickle charge,
010: constant current charge; 011: constant voltage charge;
100: Charging pending, 101: Full state, 110: Charge timeout
  • Communication Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x03 R
Fixed: 000000
1: BQ4050 communication is normal;
0: BQ4050 communications error
1: IP2368 communication is normal;
0: IP2368 communication error
  • Type-C VBUS Voltage Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x11 R
VBUS voltage data high 8bit(mV)
0x12 R
VBUS voltage data low 8bit(mV)
  • Type-C VBUS Current Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x12 R
VBUS current data low 8bit(mA)
0x13 R
VBUS current data low 8bit(mA)
  • Type-C VBUS Power Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x14 R
VBUS power data high 8bit(mW)
0x15 R
VBUS power data high 8bit(mW)
  • Battery Voltage Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x20 R
Battery total voltage data low 8bit(mV)
0x21 R
Battery total voltage data high 8bit(mV)
  • Battery Current Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x22 R
Battery current data low 8bit(mA)
0x23 R
Battery current data high 8bit(mA)
Signed sixteen bits, positive indicates charging current, negative indicates output current
  • Battery Percent Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x24 R
Battery percent data low 8bit(%)
0x25 R
Battery percent data high 8bit(%)
  • Battery Remaining Capacity Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x26 R
the low 8bit(mAh) of battery remaining capacity data
0x27 R
the high 8bit(mAh) of battery remaining capacity data
  • Battery Remaining Discharge Time Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x28 R
the low 8bit(min) of the battery remaining discharge time data
0x29 R
the high 8bit(min) of the battery remaining discharge time data
  • Battery Remaining Charging Time Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x2a R
The low 8bit(min) of the battery remaining charging time data
0x2b R
The high 8bit(max) of the battery remaining charging time data
  • Cell 1 Voltage Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x30 R
The low 8bit(mV) of the cell 1 voltage data
0x31 R
The high 8bit(mV) of the cell 1 voltage data
  • Cell 2 Voltage Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x32 R
The low 8bit(mV) of the cell 2 voltage data
0x33 R
The high 8bit(mV) of the cell 2 voltage data
  • Cell 3 Voltage Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x34 R
The low 8bit(mV) of the cell 3 voltage data
0x35 R
The high 8bit(mV) of the cell 3 voltage data
  • Cell 4 Voltage Register
Register R/W BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
0x36 R
The low 8bit(mV) of the cell 4 voltage data
0x37 R
The high 8bit(mV) of the cell 4 voltage data