linshuqin329 / UPS-18650

a UPS for raspberry pi 1/2/3
31 stars 14 forks source link

Undocumented address 20 (0x14h) on MAX17040. Charge current? #7

Open tonimore opened 5 years ago

tonimore commented 5 years ago

Hello! I found that address 20 store some value, that looks like a charging current:

import ctypes
bus = smbus.SMBus(1) 
current = types.c_int16(bus.read_word_data(0x36, 20))

The value is positive when battery charging and visa verse. This address does not specified in the MAX17040 datasheet and I have no ideas why.