Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Question about PIC SPI

Status
Not open for further replies.

DarkMoon

Newbie level 4
Joined
Oct 24, 2012
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Linköping, Sweden, Sweden
Activity points
1,322
Hello all,

I'm doing a project involving a PIC taking sensory data and transferring it to another PIC via RF.
The idea was to use the SPI interface connected to two RF modules(one receiver and one transmitter), at first it thought this was going to be easy, just connect the SDO and SDI, but after some thinking I realized that I would need SCK and send that as well but I have no idea how to do that using the modules.
Any ideas would be appreciated.

The RF modules datasheet
 

The idea was to use the SPI interface connected to two RF modules(one receiver and one transmitter)

The RF modules datasheet
Are you sure this is the correct datasheet provided? I didn't see any SPI involved with those modules.
 

No mistake those are the correct ones, they sent anything that gets on the inpunt
Could you please point out which pins are which, MISO, MOSI and SCK?
 

The datasheet which you have provided the link, refers to standard FM TX/RX modules, which only provide a data out or data in line depending on whether the device is a transmitter or receiver.

These devices do not provide an SPI interface, however they do require some method of encoding/decoding the data, either by an additional hardware device or software routine.

BigDog
 

Could you please point out which pins are which, MISO, MOSI and SCK?

The modules don't have such pins that is the problem.

The datasheet which you have provided the link, refers to standard FM TX/RX modules, which only provide a data out or data in line depending on whether the device is a transmitter or receiver.

These devices do not provide an SPI interface, however they do require some method of encoding/decoding the data, either by an additional hardware device or software routine.

BigDog

Yeah I've done the decoding/encoding part on the PIC, but I've overlooked the SPI part.
So there is no way to make this work with SPI or should I try another way ?
 

The modules don't have such pins that is the problem.

The pins to which alexxx is referring, are in fact the standard SPI interface.

And since these devices do not provide an SPI interface, they are not present on the RF modules.


Yeah I've done the decoding/encoding part on the PIC, but I've overlooked the SPI part.
So there is no way to make this work with SPI or should I try another way ?

The RF modules require asynchronous serial data, not synchronous serial data like that provided by the SPI interface.

There are methods of using a UART accompanied by encoding/decoding implement at the software level:



You should also be aware the viable baud rates when using these types of RF modules is quite limited, typically in the 2400 bps range or less.


BigDog
 
UART it is then.
The data sheet states that they can go up to 9.6kbps, but anyway
its not meant to send huge amounts of data so lower rates will be fine as well.

Thanks a lot !!!
 

.
The data sheet states that they can go up to 9.6kbps, but anyway
its not meant to send huge amounts of data so lower rates will be fine as well.

Those are absolute maximum ratings possible only in the most ideal circumstances.

Also note, the datasheet states the transmitter is capable of a maximum 9600 bps, however the receiver has a maximum rate of only 4800 bps.

Therefore the absolute maximum connection speed is 4800 bps, you also need to consider the overhead required to implement the encoding/decoding scheme.

I would recommend testing the system at the 1200 bps range and then incrementally increasing the baud rate until the connection is no longer viable.


BigDog
 

Those are absolute maximum ratings possible only in the most ideal circumstances.

Also note, the datasheet states the transmitter is capable of a maximum 9600 bps, however the receiver has a maximum rate of only 4800 bps.

Therefore the absolute maximum connection speed is 4800 bps, you also need to consider the overhead required to implement the encoding/decoding scheme.

I would recommend testing the system at the 1200 bps range and then incrementally increasing the baud rate until the connection is no longer viable.


BigDog

I was just thinking about doing tests, but it will have to wait, the hardware hasn't arrived yet
and I need to to corrections to the schematics.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top