Dear Forum members,
I am using MC9S12XE 144Pin Pkg device in my application, I want to Interface 5 Nos. of SPI peripheral devices. As per datasheet of MC9S12XE 144Pin there are Four SPI module. But limitation is if I interface each slave device on each SPI module, I will be consuming more I/O’s in that case & I am low in I/O’s.I just want to know if I use following technique in which one of the SPI module say SPI0 used as common interface shared but between all the slave devices & controlling Salve selects of slaves through the General purpose Digital Outputs will it be fine. Only thing required in this case is I have to take care in software.Please kindly recommend me the proper way of interfacing in my case.
Of course it is OK to connect many slaves to the same SPI bus. Connecting chip select wires to GPIO pins is fine. Automatic /SS slave select rarely is fine for slave devices. Some slaves require short sync pulse, some require chip select kept active for 2,3 or more bytes transfer. GPIO is way more flexible.
Hi Kef,
Thanks for your valuable response.
Regards,
Saty