ltc1298
global
Posts: 6
Can anyone help me?? I'm new at this and I'm having some trouble testing out the ltc1298 ADC with the BS2.· I used the code provided by parallax and have no idea what its doing.·Im using a single 1 volt input and I'm trying to see what comes out.· I cant understand the program. please help
Comments
2) What parts do you understand and what don't you understand? Try to refer to specific portions of the examples.
3) If you're referring to some other example, please let us know which one it is.
·FOR oddSign = 0 TO 0·· ' Toggle between input channels.
··· GOSUB convert·· ' Get data from ADC.
··· DEBUG "channel ",DEC oddSign, ": ",DEC AD,CR·· ' Display data.
··· PAUSE 500····· ' Wait a half second.
· NEXT········ ' Change channels.
GOTO again····· ' Endless loop.
Modifying the For oddSign = 0 to 0, reads my·one input.· I tested it with a 5 volt dc source and my display was 4095 which is correct.· So I know I"m using code i dont need to use for one input source but I got it working.· Now my problem is actually hooking it up to the rest of my project.· Briefly the project consists of a mic, preamp then a/d to BS2.· I'm just trying to create a noise/audio detector that will display the spl level on a computer.· I have a gain of 30 on my preamp so that I dont pass the 5 volt max for the a/d.· Now, my signal generates a +/- sinusoidal signal.· Since I only need to measure the max amplitude to calculate my dB level, will the a/d just read my negative parts of the signal as a zero? or do I have to maybe create halfwave rectifier so that I only input the positive side of the signal?· Also, I tried to connect my input of the a/d to the ouput of my pream without even connecting any input to the preamp, just powering everything up and it was reading 4095.· I didnt have an input yet and it was reading 5 volts.· Any ideas?
Thank you!
Emily