PSOC 4 De-Multiplexer SPIM UDB Component Timing issues ????

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ThLe_297461
Level 2
Level 2
Welcome! 5 replies posted First question asked

 Hello Folks,

   

I have a second problem which i think needs a seperate thread.

   

 

   

I got a SSD1306 OLED Display running connected to a PSOC 4. 

   

Now i wanted to connect two. Yes I know the SPI Bus is able to control more than one Device. but the displays i have dont have a chip select input -.- its really sad. so i thought its running via SPIM_UDB so i would hook MOSI and SCK to two de multiplexer and then switch between them with a control register. The D/C and RESET pins i control already seperate.

   

NOPE not working. I got a dissortet Transmission and also missing bytes while Data transmit to the RAM. Then i thought i could use a analog switch but the editor dislikes my idea.

   

 

   

Are there any possibilities to do that ? Maybe that my port choosing is not quite effective for the demux.

   

Ah, if i rewire the ports in the TopDesign each Display works seperately . ( if i hookup each set of pins directly to the UDB component).  

   

here the connection chart:

   

SCK_1 = 1.5

   

MOSI_1=1.4

   

RST_1= 1.3

   

D/C_1 = 1.2

   

 

   

SCK_2 = 0.1

   

MOSI_2=0.0

   

RST_2= 4.3

   

D/C_2 = 4.2

   
        
   
        
   
    Ah the SCB SPI component is occupied by a non working rfid reader which i mentioned in a seperate thread.   
   
        
   
    Thank You for opinions   
0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The SSD1306 data sheet says that even in 3-wire-SPI mode /CS is used as chip-select. So this should work as expected.

   

If you module really has only the SCLK and SDIN pins: use an OR gate in each of the SCLK lines to your displays. Only the display where the second input to the OR is 0 gets a clock, for the other one it stays 1 all the time. The OR allows you to use digital signals all the time, I guess the analog mux might not be fast enough for your purposes.

0 Likes
ThLe_297461
Level 2
Level 2
Welcome! 5 replies posted First question asked

 The thing with the OR gates does the trick.

   

 

   

Two OR for the two Wires ( SCL and MOSI ) for each Display

   

 

   

And then one NOT and a 1 BIT wide CONTROL REGISTER. Nice thing.

   

Works really well.

   

Ill post later some schematics and screenshots.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        To give proper credit: I found this idea in an AppNote from Analog Devices, since their accelerometers use the CS signal to switch between I2C and SPI, so it doesn't disable the SPI interface.   
0 Likes