2024-08-20 11:08 AM
Hello,
I need to implement a serial communication between MCU such as STM32F4xx or STM32F2xx and a Time Delay DS1023 but its datasheet doesn´t mention any standard communication protocol such as SPI.
Could i use three GPIOs as Serial Input, Serial Output and Latch Enable besides a MCO (Master Clock Output) pin (used as CLK) to implement it?
In case it is a possible solution or, in case there is a better way, knowing that will help me to decide which items to buy and how to do it.
Thanks in advance!
Alejandro Pinto
.
Solved! Go to Solution.
2024-08-20 11:39 AM - edited 2024-08-20 11:39 AM
Welcome @AlejandroPinto, to the community!
The first thing that springs to mind with such tasks is bit banging using some GPIO pins, which is perfectly feasible. After a cursory glance at the data sheet, however, I was able to see that you can also use an SPI port for serial communication - the timing of the SPI port would just have to be configured correctly. Details can be found in the reference manual of the respective STM32.
Please note that this is an old 5V device that requires a separate 5V supply. Fortunately, its CMOS inputs are almost TTL compatible, so you can control the device directly from the STM32 without a level shifter.
Hope that helps?
Regards
/Peter
2024-08-20 11:39 AM - edited 2024-08-20 11:39 AM
Welcome @AlejandroPinto, to the community!
The first thing that springs to mind with such tasks is bit banging using some GPIO pins, which is perfectly feasible. After a cursory glance at the data sheet, however, I was able to see that you can also use an SPI port for serial communication - the timing of the SPI port would just have to be configured correctly. Details can be found in the reference manual of the respective STM32.
Please note that this is an old 5V device that requires a separate 5V supply. Fortunately, its CMOS inputs are almost TTL compatible, so you can control the device directly from the STM32 without a level shifter.
Hope that helps?
Regards
/Peter
2024-08-28 09:25 AM
Thank you very much for your response Peter!
Best regards,
Alejandro Pinto