Dear Friends,

I was planning to write a basic program for decoding the HT6012 signals by using pic 16F877. As you have understood the some part of the program can be written in Basic but the decoding part must be written in asm.
This chip having one resistor to fix the frequency and I used 1MOhm, it means the clok frequency is 3KHz. If you check the data sheet you will see that the chip having about 36 clock LOW period as Header (pilot) signal after that one clock as HIGH for sync. After that 12 bits of address and data bits are coming. Each adress or data bits are 6 clock.
Now, if sombody has worked on this matter may be he can give me an idea how to catch the pilot signal and how to obtain the address and data bits.
One sample code will be better for me but even one good idea will be ok for me.

I need yor help and waiting your replies.
Here is the shape of the one data package
Pilot periode 36 clocks sync
...|-|_________________________|-|............12 pcs. address and data bits
HIGH bit = ____|--|____|--|
LOW bit = __|----|__|----|
Z bit = ____|--|__|----|

It will be enough for me to get the address and data bits in a right way. I was checking the bits as follows;
- pass first clock and come to second clock and check the bit if it is low or high.
- pass 2 clocks and check again the bit if it is high or low.
By the way you should obatin the following froms ;
- If the address bit is HIGH , the two bits will be 00
- If the address bit is LOW, the two bits will be 11
- If the address bit is Z, the two bits will be 01
It was the my system but I could not get any success until now.

ERO