DSPRelated.com
Forums

Talkthru and led lightind on SHARC ADSP-21364

Started by mskodacek February 11, 2009
Hi Everybody,

I have an ADSP-21364 EZKIT LITE, And I want to make an Amplitude
(volume) meter application. So low volume signal no led lightning,
hiw volume signal all leds lightning. I want to build it on Talkthru
Analog IN-OUT example. I start to modify SPORTisr.asm, but it doesn't
work and I cant move on. Can someone help me please?

Here is modified SPORTisr from Analog In-Out(asm) from ADSP-21364
examples.
source code I modified... :( but doesn't work. I started with blink
if there is an input signal.
I don't understand how to make correct contidion: if there is low
sound - no led lights,
if there is high
amplitude sound some sound - turn on led.
Hope the explanation what I want is clear.
Thank to everybody who can help me. Martin

//////////////////////////////////////////////////////////////////////////
// Configure the SW9 switch position 6 to OFF to use the LEDs as
Flags.

#include
#define LED_address 0x1400000

.section /pm seg_pmco;
.global _talkThroughISR;

_talkThroughISR:
ustat1=dm(SYSCTL); //SYSCTL
bit set ustat1 PPFLGS|FLG0EN|FLG1EN|FLG2EN|FLG3EN;
dm(SYSCTL)=ustat1;
bit set FLAGS FLG8O |FLG9O | FLG10O | FLG11O | FLG12O |
FLG13O | FLG14O | FLG15O;//
nop;
bit clr FLAGS FLG8 |FLG9 | FLG10 | FLG11 | FLG12 | FLG13 |
FLG14 | FLG15;//
nop;nop;nop;nop;

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

r11 = 0; // this is problem
r11= PASS r10; // this is problem
if eq jump ledlight;

ledlight:
nop;
bit tgl FLAGS FLG8 ;//|FLG9 | FLG10 | FLG11 | FLG12 | FLG13 |
FLG14 | FLG15

rti;
_talkThroughISR.end:
//--------