DS3231 RTC Module and STM32 || cubeide || I2C-LCD

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ค. 2024
  • Purchase the Products shown in this video from :: controllerstech.store
    ________________________________________________________________________________________
    Interface I2C-LCD with STM32 • LCD via I2C in STM32 |...
    To download the code goto controllerstech.com/ds3231-rt...
    Check out more VIDEOS on MODULES/SENSORS with STM32 • STM32 and SENSORS/MODULES
    Check out more VIDEOS on I2C with STM32 • STM32 I2C
    ________________________________________________________________________________________
    ****** SUPPORT US BY DONATING*****
    paypal.me/controllertech
    ******Join the Membership******
    / @controllerstech
    Join the Discord Server / discord
    Join the Telegram Group t.me/controllerstechdiscuss
    Follow me on Instagram / controllerstech
    For more info, visit www.controllerstech.com
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 76

  • @CrizzyD91
    @CrizzyD91 3 ปีที่แล้ว +5

    I just wanted to say that this channel is a brilliant resource along with the website. As a PhD student, I've learnt a lot over the past couple of days going through your content covering STM32. Your content is 10x better than the official training that STMicro provide!

  • @RobsonOliveiraDosSantos22
    @RobsonOliveiraDosSantos22 4 ปีที่แล้ว

    Keep up the good work mate 👍

  • @aohua9872
    @aohua9872 3 ปีที่แล้ว +1

    great job sir. I appreciate your channel

  • @gokhankarakaya6665
    @gokhankarakaya6665 2 ปีที่แล้ว +1

    Sen nasıl bir kralsın yaaaa (You're my hero

  • @thucnguyenvan6035
    @thucnguyenvan6035 4 หลายเดือนก่อน

    Thank you for great video!
    Could you take more video for setting Alarm by button

  • @balolforsex
    @balolforsex 4 ปีที่แล้ว +1

    Really helpful for my understanding and developments.

  • @francorengel4869
    @francorengel4869 3 ปีที่แล้ว

    thanks man, you saved my homework, by the way, this address is the same for the DS3232, if anyone asks

  • @furkanozata6775
    @furkanozata6775 ปีที่แล้ว

    thanks a lot for the video.

  • @Andr_e_y
    @Andr_e_y 4 ปีที่แล้ว

    Hi, thanks for the video. The temperature in the negative direction is not displayed correctly.

  • @eduardodelarosaferrer2205
    @eduardodelarosaferrer2205 4 ปีที่แล้ว

    Awesome !!

  • @mahmutbostan6080
    @mahmutbostan6080 4 ปีที่แล้ว +1

    very thank you bro

  • @edisonachinatrazo4246
    @edisonachinatrazo4246 7 หลายเดือนก่อน

    Muchas gracias amigo.

  • @vigneshwaransaminathan6418
    @vigneshwaransaminathan6418 3 ปีที่แล้ว

    Super sir! thanks

  • @truongtansang7500
    @truongtansang7500 4 ปีที่แล้ว +1

    Hi You! Could you review "STM32 Cube Monitor". Thank you very much!

  • @soranfatah1033
    @soranfatah1033 3 ปีที่แล้ว

    so good

  • @leelee1732
    @leelee1732 3 ปีที่แล้ว

    thank you

  • @nandoperu100
    @nandoperu100 4 ปีที่แล้ว

    Hi thanks very much for your video. I have a new suggestion about of use the internal RTC of STM in order to make a clock, could you please make a video?.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      There's already a video on internal rtc in stm32

  • @thangtruong9712
    @thangtruong9712 ปีที่แล้ว

    Hi, i want to ask you why i do the same you show. And i try to down load your project and run. but those characters in my LCD are wrong like /|??\\|| instead of right time and date. Thanks !

  • @sK27426
    @sK27426 3 ปีที่แล้ว

    1) For HAL_I2C_Write function and &hi2c1 - I am getting an error that it is not declared in this scope. Is there any header file that i need to add?
    2) For TIME time; - it says that it is redeclared in same name. the syntax and usage is correct for typedef struct. how to resolve this error?
    Could you please help out?

  • @canerboyraz9480
    @canerboyraz9480 ปีที่แล้ว

    for each read function, shouldn't we have added 0x01 to the device address? I tried the read functions with 0xD0 and 0xD1 as device addresses and it worked for both but still, I wanted to be sure if I'm doing right by adding 0x01 for the read operations. could you please tell me whether I am wrong.
    besides, I appreciate your quality content ♥

    • @ControllersTech
      @ControllersTech  ปีที่แล้ว +1

      The hal i2c read function itself adds the 1 to the address, so we don't need to do it ourselves.

  • @furkanklc5220
    @furkanklc5220 4 ปีที่แล้ว +1

    Hi,
    There are quite a few related examples with STM32 in your TH-cam channel. However, I couldnt find an example about LoRa. I want to transmit data from the sensor. Therefore, I have needed to use LoRa Sx1276-78. Can you share an example related with LoRa or share a beneficial link? From now on, thank you so much!

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      I don't have any LoRa device so it's not possible for now. Maybe in the future I'll get one and than try..

  • @satishm4635
    @satishm4635 4 ปีที่แล้ว

    Thanks man great video. Can we interface LCD directly to STM32 instead of I2C??

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      Yeah I am working on that. It will probably be the next video

    • @satishm4635
      @satishm4635 4 ปีที่แล้ว

      @@ControllersTech Thanks. I see the main challenge is that, easily available LCD has 5V level only

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว +1

      No there's no challenge with this. Actually LCD with pcf8574 attached are available at almost at the same price. And it uses only 2 wires. For that reason it's better to use the one with I2C.
      But anyway, for the curious reasons, we need to cover the one without i2c also... 😀

  • @toanmai2371
    @toanmai2371 2 ปีที่แล้ว

    how to alarm scholl?

  • @gabrielchies6785
    @gabrielchies6785 3 ปีที่แล้ว +1

    Hello! I am using the DS1307 right now. Anything in particular I should worry about, or it may be taken the same way as the DS3231? It did not work properly even though the same coding was used. It would be aprecciated if you could answer me. Thanks!

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      It's almost same... The i2c address might be different. Follow the video. How i used the datasheet to write the functions for ds3231, and use the same logic for ds1307.
      They are almost identical....

  • @diegofernandez7889
    @diegofernandez7889 4 ปีที่แล้ว

    Hello Controllers Tech, sorry with my English I'm Spanish. Good videos, i need your help if you can. I want to use the program PROTEUS with a stm32f103c6 and a LCD, but when i run the simulation run very slowly and the lcd do nothing, Do i need put in proteus a crystal oscillator? or what is the problem?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Hey buddy there is no point in using simulation for stm32.. F103 is very cheap, and you should buy it. There i a huge difference between simulation and running the on the actual hardware, and you don't learn properly
      Arm architecture is very complex and proteus won't work properly at all.
      HIGHLY ADVISED NOT TO USE SIMULATOR

    • @diegofernandez7889
      @diegofernandez7889 4 ปีที่แล้ว

      @@ControllersTech Yes i'm agree with you, i have the stm32l152, but a need to simulate a circuit for detected the current and i want programate this in proteus previously, for catch the current in adc and see the result in LDC.

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Ok I'll try doing a quick simulation on proteus and will let you know

  • @BenBilesBB-box
    @BenBilesBB-box 3 ปีที่แล้ว

    great tutorial video, the link to the code doesn't open , at least for me in Japan.. any chance you could take a look ? love the voice synthesiser quality! in chrome debugger Failed to load resource: net::ERR_CONTENT_DECODING_FAILED

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Fixed.. Try now

    • @BenBilesBB-box
      @BenBilesBB-box 3 ปีที่แล้ว

      @@ControllersTech amazing thanks.. just to say it's working really well on stm32h7. I read the time value at a set interval under a second with a counter on the MC and only print the value to the LCD if the seconds are anything different from last value. maybe i should have put the chip on another I2C bus and used DMA as my I2C1 is pretty busy read from other hardware ! interesting little chip , the temp sensor was an added bonus as i wasn't aware of that feature , or the alarms ! the temp sensor is by chance placed in the perfect place in my project for system temp!! thanks again for your great simple instructions :)

  • @youssefosama4466
    @youssefosama4466 2 ปีที่แล้ว

    The HAL_I2C_Mem_Write and HAL_I2C_Mem_Read always returns HAL_BUSY for me no matter what i do which is really weird
    anyone has solution to this ?

  • @RobotnikzSanoka
    @RobotnikzSanoka 2 ปีที่แล้ว

    Hi You have nice configured theme and colors in Cube IDE could export that and post it?

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      It's very old. I don't have the configuration now

  • @semihozkan8514
    @semihozkan8514 3 ปีที่แล้ว

    İnternal RTC has backup register, using this register we can check register and set time if not setted before. Does this module has this kind of control

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      Nope it doesn't

    • @imlassuom
      @imlassuom 2 ปีที่แล้ว

      ... you need to check power lost flag, in case the battery removed or empty when power lost the time need to be adjusted.

  • @xijinpingwasbroughtinbyccp889
    @xijinpingwasbroughtinbyccp889 ปีที่แล้ว

    How to change 24h format to 12h, guys?

  • @Loopyengineeringco
    @Loopyengineeringco 4 ปีที่แล้ว +3

    Step 1: Like video
    Step 2: watch video
    :-)

  • @CrizzyD91
    @CrizzyD91 3 ปีที่แล้ว

    Hi, I tried the project linked in your description but I can't get it to work, the numbers read are gibberish. To test that the hardware is connected correctly I use STM32 F103R8 Nucleo in the Arduino IDE with the DS3231 RTC module and it all works as expected, so I know the H/W is set-up correctly. I tried myself following the video but it didn't work. So, importing your project into my workspace and compiling/uploading the code to my nucleo board I check the values stored in the struct when the GetTime() function is called (I don't have an LCD, I want to just display in serial terminal eventually) and the numbers are still just random gibberish when I debug, I can't see a pattern at all. For example time.DayOfTheMonth = 155 and time.seconds = 212. Do you have any ideas on what I could do to fix this? Thanks

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว

      Are they updating every second ?
      Change the data type in that watch window.. wherever you are watching them

    • @CrizzyD91
      @CrizzyD91 3 ปีที่แล้ว

      @@ControllersTech Hi, thanks for the reply. Going in deeper to the i2c HAL library the HAL_I2C_Mem_Write() function actually returns a HAL_ERROR. So the RTC never actually receives anything. For some reason the i2c becomes stuck in BUSY and then throws an error after a timeout. Apparently this is documented in STs errata 2.13.7 but it's strange that I get this error but you don't and we're using the same chip.

    • @ControllersTech
      @ControllersTech  3 ปีที่แล้ว +1

      Better start a new project instead of importing mine. Follow the steps and it should work

    • @CrizzyD91
      @CrizzyD91 3 ปีที่แล้ว

      Scratch that last part about the ST errata. Although it IS in there, it still works using the Arduino library so that can't be the issue. I wonder if I'm providing the incorrect data to the i2c HAL_I2C_Mem_Write(), although I've straight up copied and pasted your version.

  • @franek.4078
    @franek.4078 3 หลายเดือนก่อน

    I need help, I'm doing everything like in the video, except I don't use the display, I use the terminal and it doesn't work properly. please help.

  • @ammarhasan70
    @ammarhasan70 ปีที่แล้ว

    can you show me the connections how you have connected ..
    you can gmail me

  • @tienleminh8129
    @tienleminh8129 2 ปีที่แล้ว

    I need to simulate ds3231 in proteus, but in proteus there is only stm32f103c6(32kflash), when I generated code in stm32cubeide with stm32f103c6, it said "region FLASH overflowed by 772 bytes" could you help me ?

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      That means the flash storage is not enough for the code.
      Either optimise the code or use registers level programming instead of HAL

    • @tienleminh8129
      @tienleminh8129 2 ปีที่แล้ว

      @@ControllersTech When I ticked "use float with scanf from newlib-nano" in properties CubeIDE, it had errors, but when I did't tick it, it had no problem, anyway thanks for your reply

  • @crissisgt
    @crissisgt 2 ปีที่แล้ว

    Hi,
    do you have the code? Link from describtion and from your website do not work, best regards

    • @ControllersTech
      @ControllersTech  2 ปีที่แล้ว

      It's working fine.. check again or try with incognito

    • @crissisgt
      @crissisgt 2 ปีที่แล้ว

      @@ControllersTech thank you, now it's working !

  • @cyberdientu
    @cyberdientu 3 หลายเดือนก่อน

    Sir, Can I write code of DS3231 at main.c?

  • @Cesar-dt9nl
    @Cesar-dt9nl 4 ปีที่แล้ว

    Can the code by uploaded via arduino ide?

  • @DungLe-eo7cp
    @DungLe-eo7cp 4 หลายเดือนก่อน

    please, why i can't load the download website

    • @ControllersTech
      @ControllersTech  4 หลายเดือนก่อน

      You can't load or can't download ?

  • @udhayakumar3065
    @udhayakumar3065 4 ปีที่แล้ว

    stm32 doesn't have built in rtc?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      It does. But boards like bluepill, and nucleo don't have battery holder so you can't store the time.

    • @udhayakumar3065
      @udhayakumar3065 4 ปีที่แล้ว

      @@ControllersTech for that external battery with connector is enough right?

    • @ControllersTech
      @ControllersTech  4 ปีที่แล้ว

      Yes but than you want to make sure that the battery is always connected. Or else the time will reset.

  • @patrykrys3153
    @patrykrys3153 5 หลายเดือนก่อน

    Why exactly memAddSize is 1 for mem_write in 7:10?

    • @ControllersTech
      @ControllersTech  5 หลายเดือนก่อน

      The size of the memory address ( the register address in the device we are reading from) is 1 byte long.