Reference

Communication Protocol Description

The module uses I2C communication with two available addresses: 0x60 and 0x61 (selected via ADDR switch).

API Description

Arduino Library Functions

  • DAC.init(address, ref_voltage): Initialize the DAC module with the specified I2C address and reference voltage.
  • DAC.outputVoltage(voltage): Output a constant voltage (in mV).
  • DAC.outputVoltageEEPROM(voltage): Output a constant voltage and store it in EEPROM.
  • DAC.outputSin(amp, freq, offset): Output a sine wave with specified amplitude (mV), frequency (Hz), and DC offset (mV).
  • DAC.outputTriangle(amp, freq, offset, dutyCycle): Output a triangle wave with specified amplitude (mV), frequency (Hz), DC offset (mV), and duty cycle (%).

Raspberry Pi Library Functions

  • mcp4725.setAddr_MCP4725(address): Set the I2C address of the DAC module.
  • mcp4725.outputVoltage(voltage): Output a constant voltage (in mV).
  • mcp4725.outputVoltageEEPROM(voltage): Output a constant voltage and store it in EEPROM.
  • mcp4725.outputSin(amp, freq, offset): Output a sine wave with specified amplitude (mV), frequency (Hz), and DC offset (mV).
  • mcp4725.outputTriangle(amp, freq, offset, dutyCycle): Output a triangle wave with specified amplitude (mV), frequency (Hz), DC offset (mV), and duty cycle (%).

Other Supplementary Information

Was this article helpful?

TOP