Hello tacbanon
What i read from the waveform is diferent than you.
First the sensor has an internal pull up resistor so the idle state is 1
then you must send a low pulse and release back to 1 (blue color)
then the sensor places data line low for sometime then back to high for sometime
and after that sends the 40 bits in a row
from the waveform it seems that a zero is a short pulse and a 1 a long pulse ( Twice the width ? )
the problem is that i don't see anyware the pulse duration nor for ack pulse or 0 and 1 pulse duration.
In the past i found a sample code in proton basic to decode infrared sony protocol that i ported
to picbasic pro.
As far as i remenber it was based on a array with the proper number of elements
and used pulsin in a loop to wait for a start pulse that was longer than the others
after detecting the start pulse you enter another loop
with a counter wait a cicle time , read the port and store 0 or 1 on each increasing array number
this aproach is not wat you need here because the sony infrared protocol (as far as i remenber ) was fixed leght bits
with 0 or 1
Here you have to use pulsin in a loop to measure the width of the 40 positive incoming pulses and decide what to store on
the array 0 or 1 based on that.
Sorry for my english . If i have time i will search for that code and post it to see if it can help you.
Bookmarks