Hello,
I m newbie in DSP.
I have EZ Kit 21369 and I try to add an amplification in the example Talkthru
Analog In-Out (ASM).
The code of example :
#include
.section /pm seg_pmco;
.global _talkThroughISR;
_talkThroughISR:
r10=dm(RXSP0A); // Read new left sample from ADC
dm(TXSP1A)=r10; // Write to DAC1
dm(TXSP1B)=r10; // Write to DAC2
dm(TXSP2A)=r10; // Write to DAC3
dm(TXSP2B)=r10; // Write to DAC4
rti;
_talkThroughISR.end:
So I have modified :
bit set mode1 ALUSAT;
r10=dm(RXSP0A); // Read new left sample from ADC
dm(TXSP1A)=r10; // Write to DAC1
dm(TXSP1B)=r10; // Write to DAC2
dm(TXSP2A)=r10; // Write to DAC3
r11=0x3FFFFFFF; // ampli 0,5
r10=r10*r11 (SSF);
dm(TXSP2B)=r10; // Write to DAC4
rti;
_talkThroughISR.end:
I Try any amplifications but there always overflow ; I look the output with
oscilloscope with a sinusoal signal input.
I try r10=ashift r10 by -1 instead of multiplication, and the output signal
is always overflow.
Can you help me I dont understand.
Thank You
Franckyos