2021-10-08 12:53 PM
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);
2021-10-08 01:56 PM
> ===> 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
2021-10-08 05:41 PM
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.
2021-10-10 11:12 AM
Thanks for your inputs,
could you please provide the sample code using SPI for driving LEDS
2021-10-10 11:12 AM
Thanks for your inputs,
could you please provide the sample code using SPI for driving LEDS
2021-10-10 11:14 AM
RS 2332 we ae using as intermediator for driving Leds