Which register should I use for SPI in P89v51rd2 ?

Status
Not open for further replies.

Ram Prasadh

Member level 2
Joined
Feb 16, 2011
Messages
51
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,725
Working with SPI in PIC uses the SSPBUF(Synchronous serial Port Buffer register) which is used for the SPI transfer. Is the SBUF register in the p89v51rd2, which is used for the Serial communication,also used for the SPI transfer in P89v51rd2? I dont find any particular register used solely for the SPI transfer in P89v51rd2 as there is in PIC. I have set all the settings like the MOSI, MISO, SCK,SPCR register etc , but just wanted to know which register I have to use for the transfer of the data through SPI (like the SSPBUF in PIC).
 

From going thru the datasheet of the ic that you have mentioned, it seems that 'SPDR - SPI Data Register' is used for the purpose.. the address for the SPDR is 86H and it is not bit addressable... hope this info helps...
 

you can use any Port pins for spi purpose!!!
 

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