Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

ADC and DAC

ADC and DAC

2006-04-20 by sherifkamelzaki

hi  i am using LPC2138 and my application is related to voice

something like storing the voice for 4 s then playing it back 

i test the adc and Dac after each other it worked but when i try to 
store the values of the ADc to resend them later to the DAC but the 
output sounded lick tic tic tic

thank you

Re: ADC and DAC

2006-04-20 by rtstofer

--- In lpc2000@yahoogroups.com, "sherifkamelzaki"
<sherifkamelzaki@...> wrote:
>
> hi  i am using LPC2138 and my application is related to voice
> 
> something like storing the voice for 4 s then playing it back 
> 
> i test the adc and Dac after each other it worked but when i try to 
> store the values of the ADc to resend them later to the DAC but the 
> output sounded lick tic tic tic
> 
> thank you
>

How did you pace the output?  If you took a sample every 200 uS then
you need to send that sample out every 200 uS.

Richard

Re: [lpc2000] ADC and DAC

2006-04-20 by Peter Jakacki

sherifkamelzaki wrote:
> hi  i am using LPC2138 and my application is related to voice
>
> something like storing the voice for 4 s then playing it back 
>
> i test the adc and Dac after each other it worked but when i try to 
> store the values of the ADc to resend them later to the DAC but the 
> output sounded lick tic tic tic

I got a big laugh out of "lick tic tic tic". Tell us what you would like 
us to do?. Perhaps we could change it to "tic tic tic lick" or "lick sip 
suck" instead.

Oh, I know! You actually want a psychic to help you work out the code 
you wrote without you telling them and then they can give you the 
correct code. Sorry, you have the wrong newsgroup, please go to 
alt.kooks.psychic.answers


Seriously, if you want help then you had better explain yourself to the 
same level that you expect answers and here's a hint. State the kind of 
specific information you would like.

I have done wave file playback on the LPC2138 so I may be able to help you.

*Peter*

Re: ADC and DAC

2006-04-20 by ian.scanlon

--- In lpc2000@yahoogroups.com, "sherifkamelzaki" <sherifkamelzaki@...> 
wrote:
>
> hi  i am using LPC2138 and my application is related to voice
> 
> something like storing the voice for 4 s then playing it back 
> 
> i test the adc and Dac after each other it worked but when i try to 
> store the values of the ADc to resend them later to the DAC but the 
> output sounded lick tic tic tic
> 
> thank you
>

Must agree with Peter on the lack of detail (perhaps effort) in the 
request.  
What is the period of the licking sound? is there any audio? If no 
audio then it should be a very simple problem (find the audio). 
Assuming the analog works, and there is some of the original audio, the 
ticking is most likely a problem of discontinuous data.  A skipped 
sample or a missing sample. Here are some ideas on isolating the 
problem at bit.

Start with know data. You can make a very simple sine wave table (or a 
ramp or triangle..) with a few repeating values if you make the period 
an even multiple of the sample period.  

Modify the code so data from the sine table is saved instead of the ADC 
values, keeping everything else the same.  Look at the data that you 
stored.  It should be the same as the sine table.  If not, look at how 
your buffers, pointers, storage system in general works. The problem 
must be in there somewhere.

Perform the same test for the output stream. Modify code to output data 
from sine table instead of the stored data.  With a steady tone, you 
will clearly hear any data problems.

If you have a good steady tone audio source, use it to test the input 
stage.  Apply clean, loud sine wave to the input and check the stored 
data.  You can even printf out all the data after storage, capture to a 
file with something like HyperTerminal, import into excel and you can 
graph what it is you have captured and easily see anything that would 
make a pop or a tick

So the problem must be in the front, the middle or the end.  Use known 
data and it won't take long to find it.

Good luck,
Ian

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.