Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

MarioGeier00/Microkontroller-Praktikum-RTC

Repository files navigation

Microkontroller-Praktikum-RTC

Using the realtime clock of the STM32 to display the date and time value and an I²C display.

Project description

Notion Project Documentation

  • Use the Real-Time-Clock RTC of the STM32
  • Display the time every second in the format TT:MM - HH:MM:SS
  • Using the UART, the time can be modified

Used components

Tasks

RTC & UART

  • sets the RTC with UART
  • checks the time input from UART
  • checks the date input from UART
  • uses interrupts to receive input
  • does not require to type the symbols : and -
  • considers leap years
  • document and beautify RTC code

Sync timer

  • uses interrupt to synchronize RTC value to the display
  • only synchronize data every second
  • use RTC alarm interrupt instead of timer interrupt

I²C display

  • initializes display
  • use the I²C-2 and set to 100kHz clock frequency (max rating of display)
  • connect PB -> SDA, PB9 -> SCL, GND and a supply voltage of 5V
  • I²C communication error lights up the red onboard led
  • check and document initialisation and transfer code

Reduce HAL_I2C_Transmit overhead

HAL_I2C_Transmit is expensive because of decreased I²C speed of the display!

  • send all characters to the display in one HAL_I2C_Transmit call
  • use asynchronous transmit to transfer the data to the display
  • only transfer changed chars

About

Use the Realtime Clock of the STM32 to display the date and time value and an I²C display

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages