We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi, I want to do communication project on LPC2148. I want to use SPI. is it possible to use SPI to connect 2 or more ARM in master n slave mode?? where is chip select pin on ARM7??
plz help...
Please don't call me sir! You need to read in the user manual the chapter concerning "pin connect" (for the LPC4xx, it is chapter 9). It will tell you exactly which pins can take which role, and how to configure these roles.
thanks for replying.. Tamir I am using lpc2141_42_44_46_48 manual I found out that
SSEL0 â€" Slave Select for SPI0. Selects the SPI interface as a slave.
so it is clear that this pin( of slave ) should b connected to the pin of master but to which pin... can i use GPIO of master to connect it???
The master should also be configured as having SSEL so that the chip select is asserted upon data transmission/reception. Note that the LPC24xx does not do this automatically (I do not know if this applies to your device): one must clear a GPIO pin (note: the chip select pin will have to have a GPIO role, not SSEL) to select the slave (which one depends on your hardwre design of course). You better ask NXP for clarifications.
can you give me any link for it!!!
www.nxp.com/.../form.php
one thing is clear that if we want to connect two or more LPC2148 by SPI, then GPIO pins of master should b connected to the SSEL pins of the slave. but what to do of SCLK?? it is output pin of both the controllers?? is it become i/p for slave??
Have you _reallY_ read up on SPI?
Knowledge of SPI would include the fact that there can be multiple slaves.
And if you have multiple slaves, then you can't have a hard-coded slave-select pin on the master - or should the chip manufacturer create ssel0, ssl1, ssel2, ssel9 to support the use as master with 10 different slaves.
So you obviously can use a GPIO pin. What pin? That must obviously be up to you.
To allow multiple slaves to be connected at the same time, it should also be obvious what happens with the SPI signals when the chip isn't currently using the SPI interface.
If SCLK is responsible for clocking the data - do you think that both the master and the slave are independently trying to drive the SCLK signal? What is the reason why the SPI device needs to know if it is configured as master or as slave?
What does the user manual (the one you are well familiar with) say about the data direction of the clock signal?