Skip to content

Demo code for reading SMBus battery parameters using the Silicon Labs CP2112 board.

Notifications You must be signed in to change notification settings

nickdademo/cp2112_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cp2112_demo

  • Ensure SDA and SCL lines are pulled-up to a voltage which is compatible with that of the target battery interface.
  • Setting J7=VIO pulls up the bus to 3.3V - this should be compatible with the majority of applications.
  • If you require a different bus voltage:
    • Set J7=EXT_PU and connect TB1(EXT_PU) to the battery interface voltage.

Program Output:

Device successfully opened.
Device successfully configured.
Voltage = 16403 mV
Current = 74 mA
RSOC = 97 %
Remaining Capacity = 5709 mAh
Average Time to Empty = 738 min(s)
Manufacturer Name = INSPIREDE
Charger connected.
Done! Exiting...

Tools/Environment:

About

Demo code for reading SMBus battery parameters using the Silicon Labs CP2112 board.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages