A13 SPI : device parallelization

Started by Thomas, November 29, 2012, 01:52:27 PM

Previous topic - Next topic

Thomas

Hi,
I'm interested duplicating a device (LCD 5110) on my SPI connection (embedded in A13 UEXT pins 7 8 9 10).
Please note that of course all the GND will be connected together, and the same for VCC.

1)The following wiring is correct ?
2)I'm not sure if I must connect RES to anything (it is active LOW so maybe to VCC ?)
3)I'm not sure if I must connect SCE to anything (it is active LOW so maybe to GND ?)


Thanks !

nvd

It will be better if you use GPIOs.

GPIO-1 -> RES1, RES2
GPIO-2 -> SCE1
GPIO-2 -> SCE2

Thus, you can reset both the chips with one signal and enable them individually.

saand

Hi Thomas,
To answer the questions you asked directly
1) The wiring you have is close but not correct. Chip enable would need to be pulled low for anything to come out on the LCDs.
Also at the moment the 2 LCDs will be showing the same thing. I am not sure if that is your intention.
Also D/C should be connected to a GPIO of some sort or if an SPI LCD driver has been written and you intend to use this you may need to find which if any of the pins are assigned to do this data / command function.

2) RES does not need to be connected however it may make your life easier. It is used to reset the device to a known state. typically that would be connected to a reset button that also resets the processor. If at the moment you are just power cycling your device whenever it doesn't work properly then dont bother with the reset.
If you do want to use it then  you should connect it to a GPIO or a reset pin of the processor (not sure if the reset pin is exposed on a connector or not)

3) SCE must be connected to something, either pulled low on both LCDs or connected to a single chip select line or to 2 chip select lines. see below for details

I assume when you say duplicate you mean you want to control 2 LCD devices at the same time and have different
information come out on the LCDs.

To do this with SPI you have 2 options
- Control them separately (Using separate CS:Chip Select lines)
- connect them electrically so that the data from one shifts to the other which only uses one chip select line. (Daisy Chaining)

Which best suits you usually depends on your application.

Separate CS chip select lines
- This allows you to connect the LCDs electrically so that they use the same SPI data and clock however the 2 different LCDs are "Selected" separately by the chip select line also called in your example SSEL and SCE. When the software wants to configure one of the LCDs it commands the specific chip select line low and sends out the data. Both LCDs receive the data on their pins but only the one that has the chip select line low takes the data in.
The issue you have is that the connector only has a single chip select line coming out SSEL so you would need to wire another chip select line or GPIO to one of the LCDs then in software command it appropriately

Daisy chaining
- This is common with SPI but only works if the devices you are using have a data out as well as a data in line.
With each clock edge data is shifted into the device. If the device has a data out on the connector then with each clock edge a bit of data will also come out.
You can connect the second LCDs data in to the first LCDs data out (if they have data out) and it will act as an extension to the first LCD.
If you want more info on this let me know.

good luck, let me know if you need further explanation on any of this.

Thomas


luckyLuc

Hi Thomas,

Did you compile your own kernel with SPI support? what version do you use ?
Please give some links.

Kind regards
Luc