2024-04-01 08:17 AM
Hello everyone, I have to communicate I2C to IC TM1640. In this datasheet of the IC, It show me this IC don't have address and not response ACK. So, my Stm get stucked when i wait for Txe bit is set.
How can I fix this?
Solved! Go to Solution.
2024-04-01 11:27 AM
Welcome @Bao, to the community!
Well, the TM1640 is an LED driver that firstly cannot work with 3.3V and secondly has no I2C interface, but a simple serial interface.
But before you connect this 5V device to the STM32F405 working with 3.3V, you should first think about a level shifter for DIN and SCLK between STM32 and TM1640 to bring the 3.3V level to the required 5V level (VIH min 70% of VDD, i.e. 3.5V).
As a serial interface you can use SPI in half-duplex and transmit-only mode, for which you can find details in RM0090, e.g. in section 29.3.4.
Hope that helps?
Regards
/Peter
2024-04-01 11:27 AM
Welcome @Bao, to the community!
Well, the TM1640 is an LED driver that firstly cannot work with 3.3V and secondly has no I2C interface, but a simple serial interface.
But before you connect this 5V device to the STM32F405 working with 3.3V, you should first think about a level shifter for DIN and SCLK between STM32 and TM1640 to bring the 3.3V level to the required 5V level (VIH min 70% of VDD, i.e. 3.5V).
As a serial interface you can use SPI in half-duplex and transmit-only mode, for which you can find details in RM0090, e.g. in section 29.3.4.
Hope that helps?
Regards
/Peter
2024-04-01 07:21 PM
Thank you for your solution. I will try and feedback it soon.