View previous topic :: View next topic |
Author |
Message |
xxopiumxx
Joined: 01 Jul 2011 Posts: 20
|
Vref doubt |
Posted: Fri Nov 30, 2012 7:38 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Fri Nov 30, 2012 7:58 am |
|
|
Probably.
But, you need to tell us more:-
1) PIC.
2) Compiler.
3 etc
Mike |
|
![](templates/subSilver/images/spacer.gif) |
xxopiumxx
Joined: 01 Jul 2011 Posts: 20
|
|
Posted: Fri Nov 30, 2012 8:47 am |
|
|
pic: pic18f2550
comp: pcwhd 4.084
thanks ^^ |
|
![](templates/subSilver/images/spacer.gif) |
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Fri Nov 30, 2012 8:49 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Tue Dec 04, 2012 5:47 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|