2024-11-05 03:10 AM - last edited on 2024-11-05 03:50 AM by SofLit
Hello all,
I'm new to STM32, I have been given a project to display the time and date on either an 16x2 lcd or an oled display using the internal RTC of my board.
I have the STM32 Nucleo f401re.
Can somebody help me?
Thanks and Regards
2024-11-05 03:17 AM - edited 2024-11-05 03:23 AM
Hello @adityapruthi01 and welcome to the community,
What kind of help you are looking for? did you have an issue with a project or you didn't start at all?
Inspire from this example: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Examples/RTC/RTC_Calendar
For LCD 16x2 lcd such as HD44780, you can find something on the internet:
2024-11-05 03:19 AM - edited 2024-11-05 03:22 AM
Welcome to the forum
@adityapruthi01 wrote:I'm new to STM32
Do you have any experience with any other microcontrollers? With programming in general?
@adityapruthi01 wrote:I have been given a project to display the time and date on either an 16x2 lcd or an oled display using the internal RTC of my board.
So what have you tried so far?
Should be RTC examples available for the Nucleo f401re ...
https://www.youtube.com/watch?v=pkT1asykALk
https://www.youtube.com/watch?v=eumKLXNlM0U
https://www.youtube.com/watch?v=gL8OoS9E1rw&list=PLnMKNibPkDnFCosVVv98U5dCulE6T3Iy8&pp=iAQB
2024-11-05 03:37 AM
Hi @SofLit
Thank you so much for responding.
I did try to see some git hub repository, https://github.com/guiguitz/RTC-OLED-Application like this.
I downloaded the zip file and from there headed to project file and ran it.
SSD1306 STM32Fxxx DESCRIPTION
VCC | 3.3V-5V | - |
GND | GND | - |
SCL | PB6-PB8 | Serial clock line |
SDA | PB7-PB9 | Serial data line |
I connected the oled as mentioned inside the repository for configuring the oled with my board.
I tried to run this on the STM32 Cube IDE but the oled won't turn on.
I don't even know what this code does.
Thanks for the links, i will just take a look.
2024-11-05 03:41 AM
Check your connections, wiring continuity, the LCD power supply etc .. This is what you need to do as a first step, then with a logic analyzer check SDA, SCL signals.
Otherwise, contact the developers.
2024-11-05 03:45 AM - edited 2024-11-05 03:46 AM
I would certainly suggest that you start with one of ST's own tutorials/examples.
You didn't say if you have any prior microcontroller experience?
The standard approach is to start simple, and build up step-by-step - don't leap straight into trying to do the entire project all at once!
Certainly the display is an advanced part of this project - start with basics before that.
2024-11-05 03:54 AM
Hi @Andrew Neil,
Thanks for replying.
Yes, I do have some experience with arduino board and esp boards, but only upto arduino IDE.
Thanks for the videos of the introductions.
But if you do have any content for using oled with the board and displaying the real time, on the oled, it will be very helpful for me.
Thanking you for you response.
Regards
2024-11-05 03:58 AM
Hello once again, @SofLit,
The oled is working usually, using the example code, of displaying garbage value on it of humidity sesnor.
I have connected SCL of the display to the PB6 (I2C1_SCL) pin of the board, the SDA to PB7 (I2C1_SDA), VCC to the +3V3, and GND to GND.
The oled is not an issue.
I tired contacting they seem not to respond. Well, it has only been one day, maybe that's the reason. But i have to complete this round about until 8th novemeber. I'm sorry for this asking this at such a short time, I thought of it as easy as arduino.
Regards
2024-11-05 03:59 AM
@adityapruthi01 wrote:
But if you do have any content for using oled with the board and displaying the real time, on the oled, it will be very helpful for me.
Forget about RTC for now and try to display something on the LCD by using the driver provided in the link you shared.
These four files are needed to handle the LCD:
2024-11-05 04:09 AM
@adityapruthi01 wrote:I do have some experience with arduino board and esp boards, but only upto arduino IDE.
You can do Arduino on STM32:
https://community.st.com/t5/stm32-mcus/stm32-arduino-stm32duino-tutorial/ta-p/49649
https://docs.arduino.cc/libraries/stm32duino-examples/