Hi,
i am having a problem in getting a output from the DAC0 pin,
i enabled all registers which are needed for the output to come at DAC0.
microcontroller: STM32F103C8T
Vcc = +15v
Vss = -15v
Vaa=Vdd= 5v
Vio= 3.3v
/LDAC = /RESET = /CLEAR = 3.3v
TOG0=TOG1=TOG2= Gnd they are grounded
SPI configuration
CS : /CS
CLK: SCLK
MISO : SDO
MOSI : SDI
Vref= using internal refernce 2.5v
for SPICONFIG_____________________________________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x03);//enable spiconfig
SPIx_Transfer(0x0A);
SPIx_Transfer(0x8E);//Enable streaming mode ,sdo,sdo updates at falling edge
SPIx_DisableSlave();
for GENCONFIG_____________________________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x04);// GENconfig
SPIx_Transfer(0x3F);//activate the internal reference
SPIx_Transfer(0x00);//DAC does not operate in differentiate mode
SPIx_DisableSlave();
for BRDCONFIG__________________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x05);//enable BRDCONFIG
SPIx_Transfer(0xFF);
SPIx_Transfer(0xFF);
for DACPWDWN_____________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x09);//Enable DACPWDWN
SPIx_Transfer(0x00);
SPIx_Transfer(0x00);
SPIx_DisableSlave();
for BRDCAST________________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x0F);//Enable BRDCAST
SPIx_Transfer(0xFF);
SPIx_Transfer(0xFF);
SPIx_DisableSlave();
for DACRANGE________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x0A);//enable DACRANGE_a
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_DisableSlave();
SPIx_EnableSlave();
SPIx_Transfer(0x0B);//Enable DACRANGE_b
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_DisableSlave();
SPIx_EnableSlave();
SPIx_Transfer(0x0C);//Enable DACRANGE_c
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_DisableSlave();
SPIx_EnableSlave();
SPIx_Transfer(0x0D);//Enable DACRANGE_d
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_Transfer(0x11);//set the output range for corresponding DAC from 0 to 10v
SPIx_DisableSlave();
for DAC0_______________________________________________
SPIx_EnableSlave();
SPIx_Transfer(0x10);//Enable DAC0
SPIx_Transfer(0xFF);
SPIx_Transfer(0xFF);
SPIx_DisableSlave();
i attached the DAC schematic below
i attached my program below
is there any correction please tell it.
i am not getting the output voltage at DAC0 output pin.
my output is only 0.3v is comming at DAC0 out pin.
i need to get some voltage as minimum voltage as 1v but not 0v.
Thanking you,