Single master multiple slave implentation using PIC microcontroller

Status
Not open for further replies.

Siddft

Junior Member level 2
Joined
Oct 19, 2012
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore
Visit site
Activity points
1,432
Hello All,

I am trying to implement Single Master Multiple slave implementation using PIC microcontroller.

I am using PIC18F4550 as Master and PIC18F4520 as slave.

Slaves will convert the values of potentiometer(A/D conversion) and communicate those values to master using SPI protocol.

I am getting values correctly from slave to master in Single master single slave implemetation.

But when i connect more slaves to master then 'm not getting the values properly, i think there migth be some problem with DELAY(SYNC problem) so how to overcome from this problem.

If anybody have sample code for Single Master Multiple slave implementation plz share it.


Advance thanks,
Siddesh
 

Hi there,

Use daisy chain connection for multi slave communication. beacuse currently only one chip select pin you are using for slave selection it is wrong method.

Try daisy chain spi configuration and revert back me.

Best regards,
 

Attachments

  • 4609Fig05.gif
    12.6 KB · Views: 148
  • images.jpg
    10.1 KB · Views: 131
  • Diag.png
    14.7 KB · Views: 144
  • 350px-SPI_three_slaves_daisy_chained.svg.png
    11.8 KB · Views: 188
  • spi_interface_4.jpg
    33.7 KB · Views: 152

hello Jinzpaul4u ,

rite noe 'm implementing using Typical SPI bus configuratiion.

I am using 2 slave selects D0 and D1.

Thanks

- - - Updated - - -

'll try with daisy chain configuration
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…