Hello Evan Sawyer,
Thank you for your attention.
I was able to solve the problem.
My problem was not with the amplifier, because in my case, how I want to reduce the amplitude of the input signal and I'm using a differential type amplifier, the correct configuration is the one that is represented.
My problem was the ADC conversion time. The conversion time I was measuring was not the actual conversion time and when I requested the results of the conversion to the ADC the results were not correct. This issue is resolved.
Now I have another question.
I am using the TMS320F28377S and I want to detect only the transition of a signal from 1 to 0. My code is as follows:
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.XINT1_INT = &xint1_isr;
EDIS; // This is needed to disable write to EALLOW protected registers
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER1.bit.INTx4 = 1; // Enable PIE Group 1 INT4
IER |= M_INT1; // Enable CPU INT1
EINT; // Enable Global Interrupts
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 0; // GPIO
GpioCtrlRegs.GPADIR.bit.GPIO11 = 0; // input
GpioCtrlRegs.GPAQSEL1.bit.GPIO11 = 0; // XINT1 Synch to SYSCLKOUT only
EDIS;
EALLOW;
InputXbarRegs.INPUT4SELECT = 11; //Set XINT1 source to GPIO-pin
EDIS;
XintRegs.XINT1CR.bit.POLARITY = 0; // Falling edge interrupt
XintRegs.XINT1CR.bit.ENABLE = 1; // Enable XINT1
interrupt void xint1_isr(void)
{
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
In this the interrupt is always being active since the transition from 1 to 0 to the transition from 0 to 1 and this is not what I want. I just want to trigger an interrupt in the transition from 1 to 0.
Can you help me?
Greetings,
Carlos Martins