| ampage Tube Amps / Music Electronics |
For current discussions, please visit Music Electronics Forum. |
| previous: Kursad [QUOTE]The ADSP-2181, oh and I goof... -- 7/17/2003 8:57 PM |
| steve conner | Re: not DSP chip but machine code is... Yep I have the "G21" C compiler (based on Gnu GCC so Analog had to give it away for free) and runtime libs for stuff like long division and FFTs. I'm still trying to figure out how to work it Unfortunately the application I'm working on is pretty demanding real-time. The DSP has to drive a 16-bit D/A and A/D (one channel only) at 100kHz, synthesize 10kHz sine and 5Hz sawtooth waves with DDS, do lock-in detection on the fundamental and second harmonic of the incoming data, then low-pass filter and vector sum the results. In order to service the 100kHz converters it needs to use DMA, and the DDS and lock-in probably need to be done in assembler, running on an interrupt. I hope to use C for everything else like the results analysis and user interface threads, because I can't be bothered with things like floating point, square rooting, long division, and printing the answer on an LCD panel, in assembler. But I have a problem with the big context switching overhead. When I go into the assembler routine all the registers that the C compiler might be using need to be saved onto the stack and restored afterwards. That's pretty much _all_ the registers on the chip, and I might be context switching like 400 times a second |
|---|---|
| Replies: |
| Kursad [QUOTE]But I have a problem with th... -- 7/18/2003 7:45 PM |