This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

communication in RAM7 LPC2148

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...

Parents
  • 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???

Reply
  • 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???

Children
  • 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!!!

  • 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?