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 CCS Technical Support

Vref doubt

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



Joined: 01 Jul 2011
Posts: 20

View user's profile Send private message

Vref doubt
PostPosted: Fri Nov 30, 2012 7:38 am     Reply with quote

Regards,

I'm trying to read the frequency of a chain pulses with the CCP module.
The problem is that the max voltage of the pulse is 2.5v. Is there any way in which I could change the reference voltage of the comparator?

And, in another way, if I use the timer 3 -for example- to do the same reading the chain as external pulses, can I change the reference voltage in which the timer 'sees' the pulse?

Thanks for advance.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Fri Nov 30, 2012 7:58 am     Reply with quote

Probably.

But, you need to tell us more:-

1) PIC.
2) Compiler.
3 etc

Mike
xxopiumxx



Joined: 01 Jul 2011
Posts: 20

View user's profile Send private message

PostPosted: Fri Nov 30, 2012 8:47 am     Reply with quote

pic: pic18f2550
comp: pcwhd 4.084

thanks ^^
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Fri Nov 30, 2012 8:49 am     Reply with quote

Can't you amplify the signal? op amp? transistor? add a DC bias?

You say comparator but mention CCP (capture/compare/PWM).
Did you mean Schmitt trigger input level? Which one is it?

g
_________________
CCS PCM 5.078 & CCS PCH 5.093
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Tue Dec 04, 2012 5:47 am     Reply with quote

The PIC18F2550 has an analogue comparator module.

Use that to convert your 2.5V signal to a 5V signal.
Then feed comparator output to the CCP module.

Mike
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