spi interfacing between to 8051 uc

Status
Not open for further replies.

SurekhaIris

Member level 2
Joined
Aug 15, 2012
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,616
i am interfacing two 8051 microcontroller using spi,data recieve from hyperterminal is written to spi write which will read on another slave 8051 microcontroller side by spi read and shown in hyperterminal m tried so many times but the correct data is nt displayed in hyperterminal,
i dnt understand where is mistakes,


Please suggest,

status for master pin and slave:
cs,mosi,miso,sclk and also spcfg,spctl
 

Without your code and circuit it is impossible to find the fault, Post your code and circuit.
 

Thanks for the reply

for circiut diagarm m just simply interfacing the cs to cs,MOSI to MOSI,MISO to MISO and SCK to SCK pin,

For code i have attached code,please check and do the needful

Waiting for reply.

- - - Updated - - -

And also please suggest me if i want to interface sd card with p89v51rd2,wat is the hardware interface bz for sd card requires 3.3 v supply but p89v51rd2 has minimum 4.5 v supply is required please suggest.
 

Attachments

  • Test Code Master.rar
    23.7 KB · Views: 143
  • Test Code Slave.rar
    31 KB · Views: 128

for circiut diagarm m just simply interfacing the cs to cs,MOSI to MOSI,MISO to MISO and SCK to SCK pin,

You should connect MOSI to MISO & vice versa.

MISO -> Master In Slave out
MOSI -> Master Out Slave IN
 

Thanks for your reply.

m just checked but still it is nt working,watever hardware interfacing m done it is correct please check the code again, right nw m modifying some code master communicate with slave but slave not communicating with master please check and reply
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…