Freq/ADC
labsmoke
Posts: 38
hi.
is there anyway i can both count the frequency and use the sigma delta ADC on the same pin?
im using the demo board and i wish to both count the frequency and read the analog value of the condenser mic...
because when i try to just do exactly that i get strange readings from the freq count, probably because the sigma delta hookup sends out some freq on that pin to calculate the AD value right?
Post Edited (labsmoke) : 12/12/2007 8:15:02 PM GMT
is there anyway i can both count the frequency and use the sigma delta ADC on the same pin?
im using the demo board and i wish to both count the frequency and read the analog value of the condenser mic...
because when i try to just do exactly that i get strange readings from the freq count, probably because the sigma delta hookup sends out some freq on that pin to calculate the AD value right?
Post Edited (labsmoke) : 12/12/2007 8:15:02 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
when i stop the cog running the ADC, the frequency reading comes out fine..(naturally)..
can someone point out some sort of trick? has anyone attempted this?
ive downloaded the "microphone to vga" snippet. but that routine only measures the signal over a given time period right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
what i need to do is measure the voltage and the frequency of a signal, both readings simulatenously on the same wire..store this in two separate variables.. thats it...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
i shall do it·the opamp way.. its probably best in the long run...
thanks!
If you are using an AC coupled circuit, splitting the signal to the capacitor and another Propeller pin could get you close to·looking for, but it wont be perfectly issolated (charge can be injected back through the capacitor into the input signal. To what degree this happens is dependent on the capacitor value and the output resistance of the input signal.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 12/12/2007 9:11:25 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
but ive just bypassed the sigma hookup with a seperate wire that extracts the frequency. its working quite good.. BUT, i need to make the freqcount more sensitive.
im using this code, this is the "DAT" section, (downloaded from OBEX):
········ org
entry·· mov···· ctra, ctra_············ 'establish mode and start counter
······· mov···· frqa, #1··············· 'increment for each edge seen
······· mov···· cnt_, cnt·············· 'setup time delay
······· add···· cnt_, cntadd
:loop·· waitcnt cnt_, cntadd··········· 'wait for next sample
······· mov···· new, phsa·············· 'record new count
······· mov···· temp, new·············· 'make second copy
······· sub···· new, old··············· 'get delta
······· mov···· old, temp·············· 'set next delta's base
······· wrlong· new, par
······· jmp···· #:loop
ctra_·· long··· %01010 << 26 + 6······· 'mode + APIN
cntadd· long··· 80_000_000············· '
cnt_··· res···· 1
new···· res···· 1
old···· res···· 1
temp··· res···· 1
my question is: How can i make this code more amplitude sensitive?
(Since i dont·know assambler i would really like some help)
Post Edited (labsmoke) : 12/13/2007 5:52:22 PM GMT
Or "closed loop": Have the pin self-bias at the threshold point, by using the feedback pin as in sigma delta, but with an added resistor between the feedback and the input pin. The mic still feeds the input pin directly through the capacitor. With zero signal from the mic, the frequency detected will be very high. But a signal from the mic of sufficient amplitude will I think override the "DC" feedback.
If you want both frequency and amplitude, that will take more work in programming, starting from the sigma-delta sampling. What frequencies and amplitudes are you looking for?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com