Reading Synchronous Data input

Hello,

I am working with an RF module (HopeRF RFM22B) in Direct Mode where it's providing a clock on GPIO1 and data on GPIO2. Everything that the receiver picks up is coming across the data line. I am looking to decode an OOK/ASK transmission. If I can get teh binary version of that transmission, I can determine the format of the transmission. (Manchester v. NRZ, Preamble length, etc) After spending a evening reading about Synchronous data and the Arduino, I am looking for some advice on how to take this data in and convert it into a binary stream. It looks like I could buy the Bus Pirate board and use the logic analyzer, but I am only looking at one channel, and I think it might be overkill if I can do it on the Arduino board without extra hardware. Is there a library that is already written that can perform this?

Thanks,

Jay

I'd buy a logic analyser anyway :), the most useful gadget you will ever own.

Meanwhile you could feed the signals into the SPI pins, GPIO1 -> SCK, GPIO2 -> MOSI and set the chip up as a slave.


Rob

Take a look at: http://www.open.com.au/mikem/arduino/VirtualWire.pdf

This is a good library that uses OOK radios (In my day we called that CW ... )

A tutorial here: http://www.creativeapplications.net/sound/wireless-arduino-of-tutorial/

This is nontrivial and no reason to reinvent this....

Let us know how you make out....

Ironically the data that I am trying to decode is from an OOK transmission. :slight_smile:

Virtualwire doesn't look like it has the ability to have an external clock, only Asynchronous (agreed upon transmission rate).

the most useful gadget you will ever own

Ever tried opening a beer bottle, or getting a Boy Scout out of a horse's hoof with a logic analyser?

Thought not.

Swiss Army knife, every time.

Yeah good point, make that the second most useful tool...actually the third most, a MIG welder is more useful :slight_smile:

BTW, I gather a "Boy Scout" or "horses hoof" have another meaning in your neck of the woods, if not I'm having trouble picturing that scenario.


Rob

Jay, I think Mike also did a library for HopeRF???

http://www.open.com.au/mikem/arduino/HopeRF/

Or is it a different RF? Hope Not...

Different. That code only handles FSK transmissions, and it's a different board.

If it were me, I'd write a loop to sample both data streams (data and clock) as frequently as I could and fill a buffer. Then, when the buffer is full, I'd send the data to a PC to look at. That would give a good sense of the bit rate and perhaps a slower sample rate would give information about the data format.

The data should probably be sampled on the rising or falling edge of the clock. Once you figure out which you will have a stream of bits to play with.

Update:

Bought a DISCO USB Oscilloscope on eBay, bad news is that it was DOA. :frowning:

Also bought a Bus Pirate from SparkFun. Very cool little gizmo. I am not quite sure how to get it to do what I want (or if it even can). The RFM22 is streaming data out pin GPIO2 (with a clock on GPIO1). I know that I need to setup the Bus Pirate in RAW2WIRE mode (now known as Raw-wire binary mode). I can make individual read commands, but now sure how I can get it to continuously get it to stream it out to serial output. I would like to pipe that all into a file and capture 10 minutes of data, then go looking for the data I know id there (namely the 5 ASCII char Transmitter ID). There are a couple of unknown settings (lsb/msb), but I figure I can try them all until I see the data I am looking for.