How to clock SPI for use in bit banging

Thread Starter

emoney123

Joined Jun 4, 2012
32
hello,

I am trying to decode asynchronous binary data stream without having to bit bang through the whole process. I assume i can use SPI to do this but am unsure of how to generate a clock for the SPI. Could someone who has some experience with this please give any guidance.
Thank you
 

MrChips

Joined Oct 2, 2009
34,807
Begin by letting us know what processor you are using.
Then what IDE platform.
What language are you using, ASM or C?
Where is the binary data stream coming from?
What is the format of the data stream? NRZI, phase encoded?
How many bits?
Post an oscilloscope screen shot of the binary stream or a drawing of the waveform.
 

Thread Starter

emoney123

Joined Jun 4, 2012
32
I'm using a SAM (ARM) processor programming in C through AVR Studio.
The binary data stream in coming from another application at 1.5MHz NRZ and I belive it is 80 bits long.
I don't want to bit bang this so I was hoping there was a better way.
Thanks
 

Thread Starter

emoney123

Joined Jun 4, 2012
32
Sorry, that was a typo... I meant to say Atmel Studio. Yes I believe I would like to use the hardware SPI module however I am unfamiliar with how I would do that. Specifically generating a clock for the serial stream.
 

MrChips

Joined Oct 2, 2009
34,807
I'm using a SAM (ARM) processor programming in C through AVR Studio.
The binary data stream in coming from another application at 1.5MHz NRZ and I belive it is 80 bits long.
I don't want to bit bang this so I was hoping there was a better way.
Thanks
It would help if you told us the application that is sending the data stream.
SPI clock is generated by the SPI master.
If the application is sending the data stream then it should be configured as the master and will generate the clock.
 
Top