Pulsin input question

pilko

Senior Member
Hi everyone,
I need to measure the length of a pulse from a hall sensor that outputs only 2.5V

rather than using a comparator or amp to increase the output to logic level 1, I wondered if I could use "analog in" and a byte variable to input PULSIN as per code.

Code:
main:

readadc 1,b0

if b0>10 then let b1=1 else let b1=0 endif

pulsin b1,1,w1

goto main
 

BeanieBots

Moderator
That won't do what you think.
It will either do a pulsin on pin0 or pin1 depending on if b0 is > 10.

Pulsin ONLY works with a digital signal on a digital input.

To raise the level only requires a single transistor and two resistors.
 

pilko

Senior Member
Thanks hippy and boriz.
I don't know exact pulse lengths yet. It's all about reversing my Snowmobile engine.
 

inglewoodpete

Senior Member
PulsIn will not work on Port A.

You don't specify which chip you are using. However, Pulsin is limited to the standard digital input pins for your chip. If you have to add "PortA" or "PortC" in the statement then it is not a standard digital input pin.
 

pilko

Senior Member
Thanks Inglewoodpete. I guess I wasn't reading the replies very well, BeanieBots told me the same thing.
 

FBM-spec

New Member
I had exactly the same issue with my car memory seats, hall effect motor rev sensors...only giving 2.5 v ...............I used an opto isolator with the LED emitter driven from the hall effect device and the transistor O/P giving 0 to 5v for the pic digi input . Works a treat and full isolated:)
 
Top