Tech Support > Computer Hardware > Microprocessors > SPI problem - newbie - interfacing between two philips micros
SPI problem - newbie - interfacing between two philips micros
Posted by abhay on September 7th, 2006


hi all,
i m interfacing my philips micro sdk lpc936(slave) wid philips arm
micro sdk lpc2138(master).i m sending seven segment pattern thru master
..the slave pin SS is connected to one port pin of master thet provides
it logic high to select it as slave.
do need to check the status of SS pin on slave side periodically
between byte transfers?
i m doing this wid polling on master side & interrupt driven on slave
side.

i hav configured master spiclk as cclk/31 (58.5895/31.33 = 1.843MHz) &
of slave as cclk/4 (7.373/4 = 1.843MHz) .do i need to consider
anything else for spiclk.

however do we need to set spiclk on slave side also ,as it shud take
that as input frm master only ?
also do reply if there is anyother point that i m not taking into
consideration
i wud also appreciate directC source code for spi configuration of
lpc936.

Posted by Dan Henry on September 8th, 2006


On 6 Sep 2006 21:08:12 -0700, "abhay" <abhaym244@gmail.com> wrote:

No. Why would you need to check it between byte transfers? Why would
you need to check it at all? It's SPIF that you want to check, which
indicates that the master has asserted SS, clocked in a byte, and
negated SS. That's all you need to check.

A slave is clocked by the master.

Dan Henry

Posted by abhay on September 8th, 2006



Dan Henry wrote:
are not in exact multiples of spiclk from master.also how wud the
interrupt be generated & how we gonna detect it.do u have some code
regarding my problem?i wud be thankful to you in that case.


Posted by Meindert Sprang on September 8th, 2006


"abhay" <abhaym244@gmail.com> wrote in message
news:1157699797.437978.182110@p79g2000cwp.googlegr oups.com...

That's got nothing to do with it. There is no such thing as a slave clock
generator. The slave is clocked by the CLK of the SPI bus.

The interrupt is generated after 8 clock pulses from the master, when SS is
asserted.

Meindert



Posted by manish.k.vashishtha@gmail.com on September 11th, 2006


I'm also facing the similar problem while interfacing the two micros
where one is running at 50 MHz as master and the other at 10 MHz as
slave. The limit mentioned for the SPI clock is 4.5MHz. I have clocked
it at 2.5MHz and also at 1Mhz. There is no interrupt getting generated
also the data is not transferred even in the polled way. What shall we
keep in mind for having SPI for the commnication between these micros
and I have to use mutiple of slave micros for one of my projects.


Similar Posts