CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Any suggestions for this design?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Slick05



Joined: 05 Feb 2005
Posts: 14

View user's profile Send private message

Any suggestions for this design?
PostPosted: Fri Feb 11, 2005 8:49 pm     Reply with quote

Hi, I have a circuit using the 18f458 where I have a microphone going to an amplifer , going to the A/D of the PIC. The microphone generates a signal of amplitude 50mV (roughly). Could you recommend me an amplifer that will give it a 5V peak to peak amplification with a 2.5V DC value? The reaon I need this is I am building a frequency counter, so I need to count the peaks of the incoming signal. Thanks!
dvsoft



Joined: 28 Nov 2003
Posts: 46

View user's profile Send private message

PostPosted: Sat Feb 12, 2005 2:30 am     Reply with quote

hello

you can use a histeresis comparator

look at www.cypress.com

seek: AN2108 - Standard - Hysteresis Comparator with PSoc

Alain
Guest








PostPosted: Sat Feb 12, 2005 7:45 am     Reply with quote

For a frequency counter you probably want to count the zero crossings rather than the peaks. Could you capacitor couple the signal to get rid of DC, compare it to zero with a comparator chip, and bring the result into the PIC through a digital pin? Or use an internal comparator in the PIC if your chip has one. I don't see the need for an A/D in a frequency counter.

Sherpa Doug
Slick05



Joined: 05 Feb 2005
Posts: 14

View user's profile Send private message

PostPosted: Sat Feb 12, 2005 11:10 am     Reply with quote

Well I have already wrote the software, I just need an amplifier for the input signal....
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

How about an Op-amp?
PostPosted: Sat Feb 12, 2005 8:05 pm     Reply with quote

Sounds like a job for a rail-to-rail opamp. You can adjust the input differential to get the DC offset you need.
Slick05



Joined: 05 Feb 2005
Posts: 14

View user's profile Send private message

PostPosted: Sun Feb 13, 2005 8:48 pm     Reply with quote

Yeah, I tried implementing the frequency counter by sampling the signal with the PIC 18F458 and then counting the peaks, but the processor does not have enough RAM to do this robustly. I like the idea of a comparator and counting zero-crossings and sending a pulse to the PIC every zero-crossing. Can anyone recommend me a comparator chip? Thanks!
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Feb 13, 2005 9:21 pm     Reply with quote

You can use a simple capactive discriminator circuit to get spikes at zero crossing to use for triggering interrupts..
Slick05



Joined: 05 Feb 2005
Posts: 14

View user's profile Send private message

PostPosted: Sun Feb 13, 2005 10:44 pm     Reply with quote

Would I be able to use the comparator built into the 18f458? I've never used the comparator before so I'm not sure how it works...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group