Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI (seria lperipheral interface) Frame doubt

Status
Not open for further replies.

vinothmct

Member level 1
Member level 1
Joined
May 2, 2012
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,584
I have 16 bits of data . I have to send it to slave device . First i have to select slave signal and pull clock line low to start transmission . After that depending upon mode bit will transferred ouit and received on master . MY doubt is SPI send only 8 bit data after sending 8 bit data do we need to pull SSEL line high and then low or we can send any number of data continously?

In slave mode, if the
SS line is not deasserted between the successive transmissions then the content of the
SPI Data Register is not transmitted, instead the last received byte is transmitted. If the
SS line is
deasserted for at least minimum idle time ( half SCK cycle) between successive transmissions then the
content of the SPI Data Register is transmitted.
In master mode, with slave select output enabled the
SS line is always deasserted and reasserted between
successive transfers for at least minimum idle time.


Bolded part was found in SPI motorola spec . So if i have to send 16 bits of data i have to deassert (pull SS to high then to low?) then transfer another 8 bits?
 
Last edited:

I am unsure on the specifics of the device you are using, but can provide a general answer. For the master, the select line should be activated (pulled low), all the data sent (ie all 16 bits), then the select line released. It should not be pulsed between the bytes.

The text above is referring to deasserting and reasserting the SS line between transfers, not bytes. A transfer can be multiple bytes long.

Clayton
 

I am unsure on the specifics of the device you are using, but can provide a general answer. For the master, the select line should be activated (pulled low), all the data sent (ie all 16 bits), then the select line released. It should not be pulsed between the bytes.

The text above is referring to deasserting and reasserting the SS line between transfers, not bytes. A transfer can be multiple bytes long.

Clayton

How many bytes is it possible to send in a single transfer?
 

There is no limit.

Some SPI devices have pass-through where data going in to the input pin appears on an output pin so you can chain devices together and send bytes to all of them in one transfer. For example, you might have two devices that use 16 bits of data each, you clock 32 bits into the first device and 16 of them 'overflow' into the second device. By driving the select line at the right time you can ensure the appropriate bits get read in to the correct device.

Brian.
 

Hello!
Usually you don't need to release chip select. I've seen only one device that needed to
deassert, I'm not sure, but I think it was a RTC chip (max 1390).
The advantage is also that you can feed the SPI bus with DMA.
Dora.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top