How to interpret a TTL signal with 16F887?

Status
Not open for further replies.

calamaro

Newbie level 3
Joined
Oct 8, 2009
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,301
Hi to all, I have a 16F887 pic and I have connected at pin RA4 a TTL signal like in attached picture. How can I write a function that recognise the time of a low or high signal transmitted? If the signal is (low or high) for 256µs I have to put into an array 0 otherwise if the signal is 512µs I have to put into an array 1. Like in the picture the time measure of signal must be from low to high of the square wave.

Thanks to all for your help
 

hameeds01 said:
u can use Capture Pulse Width from CCP Register

I've never used CCP Module, could you post an example please?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…