Pages: [1]   Go Down
Author Topic: looking for simple SPI Serial example  (Read 685 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Im trying to figure out how to send and receive a simple message (tx, rx) to SPI on a arduino uno rev3.
Can someone help me?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
to send and receive a simple message
From what?

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

some tranceiver, i have 2 arduino's so it would be like sending a message from one to the other, it doesnt matter what the message is.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

With no details I'd say you send data using Serial.write() and you get data using Serial.available() and Serial.read().

There are a gazillion examples on this forum or have a look here

http://www.gammon.com.au/forum/?id=10894
http://www.gammon.com.au/forum/?id=11425

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48569
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Keep in mind that SPI and Serial are two DIFFERENT ways of communicating. Which are you trying to do?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Serial would be nice but im using a mrf49xa so i cant get that to work because i need a clock, sdi, sdo, and cs.
So i figure why not use spi to do this. i dont see a better way to send and receive.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh SPI, maybe I should read the title smiley

In that case read here

http://www.gammon.com.au/forum/?id=10892

Nick has plenty of info and sample code.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: