I've used the TWSxxx and RWSxxx (where xxx=MHz) extensively over the past 7-8 years. I have attached a couple of GIFs (captured at the receiver output) that illustrate the problem you have to deal with.
One GIF is of a marginally weak signal. The upper trace is the LINEAR output pin while the lower trace is the DIGITAL output pin. This happens to be an X-10 RF signal (which uses the NEC IR protocol). You would need to wait in a loop until you receive a valid preamble (e.g. using PulsIn) and then capture the next 32 bits.
The other GIF shows another approach with a preamble that is repeated a few times prior to the actual code. It takes 2-3 copies of the preamble to set the receiver AGC to a point where the preamble emerges from the noise. You would need to wait in a loop for the preamble and then capture the code which follows.
As I recall, Holtek merely repeats the entire code several times with the first copies used to set the AGC so you would have to listen all the time for a valid code.
One more tip: If you do not have access to a 'scope you can record these signals using LineIn of a soundcard. You just need a couple of resistors to form a voltage divider so that the voltage input to the card is in the 0-1V range. This has the added advantage that you can hear the codes, as well. The GIF with the single trace was recorded this way.
Bookmarks