cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SPI for CD4094BE shift register

Bkris.2
Associate II

Hi Experts,

I have a project like below. I am trying to send the data using SPI but the LEDS are not glowing in sending pattern.

I am new to STM32. Could anyone please let me know if SPI can be used in this scenario OR not.

STM32f207 ======> RS232 ======> CD4094 ==========> LEDS (1 to 8)

CD4094 (serial to parallel communication)

Code Snippet::

===============

uint8_t test = 0xFF;

status = HAL_SPI_Transmit(&hspi1, (uint8_t*)&test,1,100);

5 REPLIES 5

> ===> RS232 ====>

Why? How?

Observe waveforms on relevant pins of the shift register using oscilloscope or logic analyzer. For starter, you can also slowly bit-bang the SPI on given pins (i.e. simulate in software, by manipulating pins set to GPIO Output).

JW

TDK
Guru

You should be able to drive this effectively with an SPI signal. Note that there are two inputs, STROBE and DATA, in addition to the clock.

It doesn't look like you should be using RS232 here, unless you are simply using it as an intermediate.

If you feel a post has answered your question, please click "Accept as Solution".

Thanks for your inputs,

could you please provide the sample code using SPI for driving LEDS

Thanks for your inputs,

could you please provide the sample code using SPI for driving LEDS

RS 2332 we ae using as intermediator for driving Leds