Can usart be used to interface MAX6969 led driver?

Thread Starter

Younes Thabet

Joined Jan 9, 2019
70
Hello,

I am using STM32F407 to interface a MAX6969 led driver, MAX6969 is usually interfaced using SPI MOSI/MISO lines ..
The problem is!, I am out of connectivity protocols (I2C/I2S/SPI/UART) only USART left and some GPIOs!

Can I use USARTto interface MAX6969 which have DIN, CLK, LE, OE pins!?
Or should I just set remaining pins to be GPIO_Output use them to connect to MAX6969 pins (DIN, CLK, LE, OE)!?

Thanks,
 

Yaakov

Joined Jan 27, 2019
5,476
You can connect multiple SPI slave devices to the same pins. You have to pull the CS (or SS) [in low on the desired slave to indicate it is the target. If you don't have enough GPIO to do that, you can use an SPI mux chip like the TI TS3A44159 or something similar.

In any case, SPI supports multiple slaves on the same bus.
 

Thread Starter

Younes Thabet

Joined Jan 9, 2019
70
A USART is not compatible with SPI. There is NO clock signal when you use a USART.
I think it has clock signal in addition to TX, RX. Hence synchronous!? that's actually what made me think i could use usart! a clock signal (USART_CK) that connects to CLK of MAX6969 and USART_RX to DIN.!
best way as @Yaakov mentioned is to use multiple slaves with gpios as Chip select..
 

Papabravo

Joined Feb 24, 2006
18,070
I think it has clock signal in addition to TX, RX. Hence synchronous!? that's actually what made me think i could use usart! a clock signal (USART_CK) that connects to CLK of MAX6969 and USART_RX to DIN.!
best way as @Yaakov mentioned is to use multiple slaves with gpios as Chip select..
A synchronous UART and SPI are still different, and IMHO different animals. In a synchronous USART transmission the clocks are continuous over all of the bytes in a frame. This is NOT necessarily the case with SPI. In SPI there are 8 clocks per byte and time gaps between bytes are allowed as long as CS* remains asserted (usually active low) for the entire transaction. SPI transactions are always full duplex, whereas USART transactions need not be.
 
Top