Category: STM32F4

Library 12- OneWire library for STM32F4 34

Library 12- OneWire library for STM32F4

1-Wire is a device communications bus system designed by Dallas Semiconductor Corp. that provides low-speed data, signaling, and power over a single signal. It’s used in some temperature sensors, like DS18B20 temp sensor and many others products from Dallas. OneWire key features Single Contact Sufficient for Control and Operation Unique ID Factory-Lasered in Each Device Power Derived from Signal Bus (“Parasitically Powered”) Multidrop Capable: Supports Multiple Devices on Single Line Exceptional ESD Performance source: maximintegrated.com 17th May, 2014: There was some new functions added!...

PWM graph 136

STM32F4 PWM tutorial with TIMERs

In this tutorial, I will show you, how to implement PWM outputs on STM32F4xx devices. This is for a lot of people pretty hard work, but believe me, it’s quite quick and easy. I will go step by step on how to make a PWM output on specific timer. Update: I made a library for PWM, available here. STM32F4 timers They have up to 14 timers inside. Table below shows their description. You have to know, that let’s say F401 doesn’t...

ILI9341 Button library for STM32F4 52

Library 11- Button library for ILI9341 LCD and STMPE811 touch controller on STM32F429 Discovery board

Now we have both, LCD controller and touch controller configured and we can use this. For this purpose i made a library for buttons. This library can draw buttons on LCD and check if touch has been pressed on any enabled button. Library Features Set X and Y location of button Set button’s width and height By default 10 buttons are supported Use labels Custom background image or color Border around button Selectable font Disable/Enable button Selectable color for label,...

STMPE811 touch sensor on STM32F429-Discovery board 25

Library 10- STMPE811 Touch screen driver for STM32F429 Discovery board

STM32F429 Discovery board has LCD with ILI9341 controller and resistive touch screen with STMPE811 controller from STMicroelectonics. The STMPE811 is a 4-wire resistive touch screen controller with a GPIO (general purpose input/output) port expander able to interface a microcontroller or a main digital ASIC via I2C or SPI serial interface. The STMPE811 offers great flexibility, as each I/O can be configured as input, output or specific functions. The touch screen controller is enhanced with a movement tracking algorithm to avoid excessive...

Library 09- I2C for STM32F4 126

Library 09- I2C for STM32F4

I2C or Inter-Integrated Circuit is a multimaster serial single ended bus. This protocol is commonly used with RTC modules, temperature sensors, EEPROMs, IO expanders and more. I2C protocol uses 2 wires: SCL: Serial Clock, clock for serial synchronization SDA: Serial data, bidirection line for receving and transmitting Both wires need external pull up resistor, from about 4k7 to 47k, if you don’t use pull up resistors in MCU. In our case, you don’t need external pull ups, because library uses internal in STM32F4.

ILI9341 LCD on STM32F4 267

Library 08- ILI9341 LCD for STM32F4

On STM32F429 Discovery board there is LCD with ILI9341 controller. It has 240 x 320 pixels resolution and 16bit or 18bit color depth, what gives you 65536 or 262144 different colors. It has also a possibility of different way of connection, like serial, parallel, with VSYNC and HYSNC. STM32F429 has also LTDC driver for LCD like that, but this driver we will use later. For now we will use SPI for driving in serial mode and some other pins for controlling. I...