Skip to content

Async Rust driver for the MCP4725 DAC

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt
Notifications You must be signed in to change notification settings

ThatRedox/mcp4725-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp4725-async

GitHub Actions Workflow Status Codecov (with branch) docs.rs

An async driver for the MCP4725 DAC using embedded_hal_async. It supports sending commands over I2C.

Warning: This is currently untested on real hardware.

The driver can be initialized by calling new with an I2C interface and the chip address:

// Address corresponds to A2,A1=0, and A0 tied to Vss
let mut mcp = MCP4725::new(i2c, 0b1100000);

To quickly set the DAC output:

// Set DAC to 0xFFF = Full scale, don't write to eeprom
mcp.set_voltage(0xFFF, false);
// Set DAC to 0x800 = Half scale, don't write to eeprom
mcp.set_voltage(0x800, false);
// Set DAC to 0x000 = Zero volts, write to eeprom
mcp.set_voltage(0x000, true);

License

Licensed under either of

at your option.

About

Async Rust driver for the MCP4725 DAC

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Packages

No packages published

Languages