Tag Archives: STM32F103C8T6


STM32’s internal RTC

A Real Time Clock (RTC) is a timing element dedicated for keeping time. In many applications, especially where precise timed-operations are needed to be performed, a RTC is a very useful tool. Examples of such applications apart from clocks and watches include washing machines, medicine dispensers, data loggers, etc. Basically a RTC is a timer-counter but unlike other timers of a MCU it is much more accurate. Previous to this post, we explored STM32 timers but those were useful for applications like PWM generation, time-bases and other waveform-related tasks. Those were not suitable for precise time-keeping. In most 8-bit MCUs like the regular PICs and AVRs, there are no built-in RTC modules and so we need to use dedicated RTC chips like the popular DS1302 or PCF8563 when we need an on-board precise time-keeping device. Those chips also need some additional circuitry, wiring and circuit board space. At present, however, most modern MCUs come packed with literally every possible hardware a designer may think of. It is only up to a designer to decide which resources to use from a modern-era micro to meet a specific design goal. Gone are the days when MCUs were manufactured for application specific requirements and also gone are the days of implementing and involving multiple assets in a design. Thus cost, time and space are dramatically reduced, resulting smarter, sleeker and smaller affordable devices. Fortunately STM32s are in that list of those modern era microcontrollers. STM32 MCUs come with built-in RTC modules that require no additional hardware support. This tutorial covers basic features of STM32’s internal RTC and  how to use it for time-keeping applications.

Block_Diagram_Simplified

Read more

STM32 Analogue-to-Digital Converter (ADC)

Most of us who have experienced 8-bit MCUs previously know how much important it is to have an Analogue-to-Digital Converter (ADC) built-in with a microcontroller. Apart from other hardware extensions unavailable in the early era microcontrollers, many former 8051 microcontroller users shifted primarily to more robust Atmel AVRs and Microchip PICs just for this important peripheral. I don’t feel it necessary to restate the advantages of having such a peripheral embedded in a micro. In traditional 8-bit MCUs aforementioned, the ADC block is somewhat incomplete and users have to work out tricky methods to solve certain problems. The ADC block of STM32 micros is one of the most advanced and sophisticated element to deal with in the entire STM32 arena. There are way too many options for this block in a STM32 micro. In this issue, we will explore this block. ADC Hardware Block Diagram Read more