Skip to content

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

Notifications You must be signed in to change notification settings

thedalles77/cp2112_demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This code was forked from Nick Dademo's repo and modified to show more battery registers.

If using the CP2112 circuit board shown above and described in step 15 of: https://www.instructables.com/Battery-Powered-Raspberry-Pi-in-Repurposed-Laptop/

  • Wire the clock, data, and ground from the board to the cooresponding laptop battery connector pins.
  • The board will pull up the clock and data to 3.3 volts.
  • Connect a USB cable from a Windows 10 PC to the board.

If using the Silicon Laps CP2112EK evaluation kit:

  • 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 will be the text window shown above:

Tools/Environment:

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%