Skip to content

A library to talk to the SiC45x series buck converters using I2C

License

Notifications You must be signed in to change notification settings

scheffield/sic45x-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SiC45x

A library to talk to the SiC45x series buck converters using I2C (Wire). It provides implementations for almost all features of the SiC45x series buck converters as described in the datasheet. It is designed to be used with the Arduino Wire library.

Usage

Usag is straigt forward. A simple example looks as follows

#include "SiC45x.h"

SiC45x sic45x(0x0F);

void setup() {
  Serial.begin(115200);

  sic45x.begin();

  sic45x.setFrequencySwitch(1000);
  sic45x.setInterleave(SIC45X_INTERLEAVE_MODE_MASTER);
  sic45x.setVoutCommand(.5);

  sic45x.printStatusWord();

  sic45x.setOperation(
    SIC45X_OPERATION_ON_OFF_ENABLED
    | SIC45X_OPERATION_OFF_B_IMMEDIATE
    | SIC45X_OPERATION_MARGIN_COMMAND
    | SIC45X_OPERATION_MRGNFLT_FOLLOW
  );
}

void loop() {
  Serial.print(F("I_OUT: "))
  Serial.print(sic45x.getReadIout());
  Serial.println(F("A"))

  delay(1000);
}

A more complete setup can be found in the example sketch.

Regenerate API

SiC45x.h and SiC45x.cpp are generated from /extras/generateApi.js. The structure of the library can be updated by making changes to that file and rerunning the generation:

node generateApi.js

About

A library to talk to the SiC45x series buck converters using I2C

Resources

License

Stars

Watchers

Forks

Packages

No packages published