How to Test Drive SPI ?

Status
Not open for further replies.

pkshima

Member
I want to learn SPI. For that I am looking for a short sweet example circuit with code to wet my hands. I can then play around with that and learn.

So does anyone here know of any site/project/tutorial that can help me.
If it is of any help, I am looking forward to using a PIC16F876A or 886 with Hitec C.
I will be using SPI to talk to TI CC2500 based RF transceiver modules.

If only I had an oscilloscope, I could have given a shot at writing code from scratch myself. Else I guess I am pretty much a blind man ?

Thanks & Regards,
Pradeep
 
Last edited:
Well it's doubtful the OP would have Proteus then.

Thats right. I dont.
If I had to buy anything, I would just buy a scope.

But more importantly, I dont want to make my learning curve even longer. Its already been longer than I bargained for.

All I wanted was to transfer some bits from one pic to another wirelessly. Tried it with cheap RF modules. Realized it would take more coding (manchester routines) than the main project(robot) itself and which also will need a scope. HT12E/D didnt work too well.

So switching to CC2500 based modules for which I need to learn SPI first. And so on ....
Also had to switch from PIC16F628 to PIC16F876A / 886 to have HW SPI.

I guess I have already Shaved the Yak a lot
 
Last edited:
So switching to CC2500 based modules for which I need to learn SPI first. And so on ....
Also had to switch from PIC16F628 to PIC16F876A / 886 to have HW SPI.

I think you made another wrong turn. If your aim was a simple RF link, you aren't going to find it using CC2500's. These modules are meant for fairly sophisticated mesh and P2P networks and require a decent amount of setup and processing. If you were using an MSP430, you could fall back on the supplied SimpliciTI stack.

The simplest digital RF module I know of for relatively low data rate applications is the RFM12B's. There's still some setup required, but it's fairly straight forward and there's setup and data transfer example code in the programming guide.
SparkFun Electronics - RFM12B-S2 Wireless Transceiver
 
I tried buying RFM12 but couldnt get them locally, so resorted to CC2500.
Also, somehow, I didnt like the RFM 12 docs. They lack a basic introduction to the device first. They jump straight to listing commands and stuff without giving an idea why and what all commands exist.
Agreed CC2500 docs dont do too well either but I had a feeling the info I need is somewhere in there
 
Well, if you can't get them there's not much you can do, but I guarantee you will have a difficult time trying to get the CC2500 working if you couldn't implement encoding for the basic ASK modules.

I'm not certain what document you were reading for the RFM12B, maybe the Programming Guide, because the spec sheet doesn't go straight into commands. There's a reason the documentation is simple, it's because using it is simple. There's a reason the CC2500 spec sheet is 96 pages, because using it is not simple. There are several code examples you can find google searching for doing simple RX/TX or even P2P using RFM12B modules, there are none using the CC2500/CC1100.
https://www.electro-tech-online.com/custompdfs/2010/04/RF12B-IC.pdf

Actually, if you want more comprehensive documentation, the RFM12B is a module made by HopeRF. The module is based on the Silicon labs Si4421. You can use the datasheet for that if you want, but the RFM12B datasheet and programming guide has everything you would actually need.
https://www.silabs.com/pages/Downlo...ts/TechnicalDocs/Si4421.pdf&src=ProductMatrix
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…