I've seen the posting on "Measuring a pulse with 1us resolution", but Acetoel only want to measure one single pulse. I want to measure the successive pulses from the infrared reciever to decode the signal. Can somebody give me some direction how to do that. My infrared remote control transmits a signal with different pulse width indicating '0' or '1'. (Tested on digital scope)
Thanks
Willie
___________________________
This message was ported from CCS's old forum
Original Post ID: 13071
Tomi Guest
Re: Measuring infrared pulses
Posted: Wed Mar 26, 2003 3:14 am
Maybe you don't need to measure the pulse width. Just wait for a rising edge then wait [("0" pulse width + "1" pulse width)/2] time then check the input line. If it is (already) "0" then the bit is 0. If it is (still) "1" then the bit is 1.
:=Hi there
:=
:=I've seen the posting on "Measuring a pulse with 1us resolution", but Acetoel only want to measure one single pulse. I want to measure the successive pulses from the infrared reciever to decode the signal. Can somebody give me some direction how to do that. My infrared remote control transmits a signal with different pulse width indicating '0' or '1'. (Tested on digital scope)
:=
:=Thanks
:=Willie
___________________________
This message was ported from CCS's old forum
Original Post ID: 13072
Willie Erasmus Guest
Posted: Wed Mar 26, 2003 3:45 am
<font face="Courier New" size=-1></font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 13075
Sherpa Doug Guest
Re: Measuring infrared pulses
Posted: Wed Mar 26, 2003 8:00 am
Perhapse I can rephrase what Tomi said:
Let x be the length of a short pulse ("0").
Let y be the length of a long pulse ("1").
Assume pulses are active high.
1) Wait for the start of a pulse.
2) Wait (x+y)/2. By now a short pulse will have ended, but a long pulse will not have ended.
3) Test the input. If it is low it must have been a short pulse. If it is still high it must have been a long pulse.
4) Wait for the start of the next pulse....
SherpaDoug
:=Maybe you don't need to measure the pulse width. Just wait for a rising edge then wait [("0" pulse width + "1" pulse width)/2] time then check the input line. If it is (already) "0" then the bit is 0. If it is (still) "1" then the bit is 1.
:=
:=
:=:=Hi there
:=:=
:=:=I've seen the posting on "Measuring a pulse with 1us resolution", but Acetoel only want to measure one single pulse. I want to measure the successive pulses from the infrared reciever to decode the signal. Can somebody give me some direction how to do that. My infrared remote control transmits a signal with different pulse width indicating '0' or '1'. (Tested on digital scope)
:=:=
:=:=Thanks
:=:=Willie
___________________________
This message was ported from CCS's old forum
Original Post ID: 13085
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