Got rid of MCP4725 library. For now MCP4725 DACs used only for gate signals, CV will be back with another DAC

This commit is contained in:
2025-10-20 01:35:17 +03:00
parent d4bc4552e7
commit 338c66152f
3 changed files with 46 additions and 17 deletions

View File

@ -5,13 +5,8 @@
#include <Arduino.h>
#include <Wire.h>
#include "MCP4725.h"
#include "config.h"
MCP4725 DAC1(DAC_1_ADDR);
MCP4725 DAC2(DAC_2_ADDR);
bool updateCV1 = true;
bool updateCV2 = true;
bool sendGate1 = false;
@ -19,6 +14,8 @@ bool sendGate2 = false;
uint8_t CV1Note;
uint8_t CV2Note;
float DACNoteStep;
void setup()
{
// AcidStepSequencer Interface
@ -32,12 +29,20 @@ void setup()
// last pattern user had load before power off
loadLastPattern();
DACNoteStep = (1.0 / 12.0) * 4096 / DAC_MAX_VOLTAGE;
Wire.begin();
Wire.setClock(400000);
DAC1.begin();
DAC2.begin();
DAC1.setMaxVoltage(5.1);
DAC2.setMaxVoltage(5.1);
Wire.beginTransmission(0x60);
Wire.write(0x40);
Wire.write(0x00);
Wire.write(0x00);
Wire.endTransmission();
Wire.beginTransmission(0x61);
Wire.write(0x40);
Wire.write(0x00);
Wire.write(0x00);
Wire.endTransmission();
}
// User interaction goes here