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.
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...
Let’s say something about SPI. SPI (or Serial Peripheral Interface) is a protocol named by Motorola. With him you can control sensors, SD card and much more. SPI protocol works in a ways where there is one master and multiple slaves, In other words, master is our STM32F429 Discovery board and let’s say, SD card is slave.
In first tutorial about discovery board we were blinking led. But I said nothing about system clock speed. In while loop we just use
// Waste some tome
for (i = 0; i < 500000; i++);
for some delay, to actually see how led was blinking. We didn’t know at which clock speed our processors work and for first time, I think you didn’t even ask yourself.
Your first blinky project works, but you don’t know how? I will explain GPIO (General Purpose Input/Output) CMSIS Library. This library is used to work with physical pins on microcontroller. You can set pins to input or output, put them low (0 volts) or HIGH (3,3 volts), select pull resistors, choose output type and select clock speed.