Categories
STM8 Cosmic C

Using STM8 Standard Peripheral Library with STVD Cosmic Compiler

Today we are going to use the STM8 standard peripheral library (SPL) with STVD IDE and Cosmic Compiler. You may already know from our previous tutorials that we used the stm8 bare-metal programming. We always used the GPIOs and all the Peripherals like UART etc. But ST makes a good Peripheral library for the STM8 […]

Categories
STM8 Cosmic C Examples

STM8S UART Example Code

UART is one of the rudimentary and crucial peripheral. Using UART in STM8 microcontroller is also effortless. We will use STM8S003F3 or STM8S103F3 Blue pill board for the demo purposes. But this code will equally work well on other variants of the STM8S microcontrollers. As I had tested this code on STM8S903K3 micro controller as […]

Categories
STM8 Cosmic C Examples STM32F103

STM8 TIMER 4 Example in Cosmic C

TIM4_CNTR register is used for counting value. TIM4_PSCR = 0x01 will divide input clock with 2 and finally 0th bit of TIM4_CR1 is used to enable or disable timer

Categories
Examples STM8 Cosmic C

LCD 4 bit mode interfacing with STM8 in C from scratch

We are going to interface LCD 4 bit mode with stm8s103f3 microcontroller. The code will be equally applicable for similar line STM8 microcontroller. The language we are going to use is C and the compiler we used is COSMIC C compiler for STM8. The IDE that we used for writing our code is STVD from […]