Initializing a 1602A LCD Display with a KS0066U Controller.

Initializing a 1602A LCD Display with a KS0066U Controller.
Дисплеи

This display had been lying around unused for a while. And then I wanted to hook it up to one of my projects. Of course, you could try to find a library with ready-made functions, but then you won't get the complete picture of how the display works, and that doesn't suit us. Once you've figured out how an LCD display works, it won't be hard to write your own library for the required...

How to Program and Debug AVR Microcontrollers.

How to Program and Debug AVR Microcontrollers.

The first question a beginner embedded developer faces is how to program a microcontroller. To program a microcontroller, you need three components: the chip you want to program; a programmer; and a special program on the computer that controls the programmer. Every microcontroller has a programming mode; in this mode some microcontroller pins change their...

How to Connect an Encoder to STM32.

How to Connect an Encoder to STM32.
STM32

One of my previous articles about encoders described how they work and ways to process the data coming from them. The methods described can be implemented on simple microcontrollers like the Atmega; more advanced ones, like STM32, have a dedicated encoder interface that processes the data from the encoder by itself and, based on this data, increments or decrements the value...

How to Flash the miniSTM32F103V.

How to Flash the miniSTM32F103V.
STM32

The simplest and most accessible way to flash an STM32 is with the bootloader; in this article we'll look at how to do it using the miniSTM32F103V board as an example. First, let's figure out what a bootloader is. A bootloader is simply a program that is stored in a certain section of memory and can rewrite the microcontroller's flash. It is programmed during chip manufacturing...

STM32 ADC.

STM32 ADC.
STM32

Let's look at the features of the ADC in STM32. 12-bit resolution; reference voltage from 2.4 to 3.6 volts; sampling rate up to 1MSPS; 18 channels (16 external and 2 internal: reference voltage and temperature sensor); interrupt at the end of regular and injected conversions; interrupt from the window comparator (Analog watchdog); DMA transfer for regular...

Connecting an Incremental Encoder to a Microcontroller.

Connecting an Incremental Encoder to a Microcontroller.

An incremental encoder looks like a potentiometer, but unlike a potentiometer it has no end positions: it can rotate in both directions an unlimited number of turns. It should also be noted that an incremental encoder doesn't rotate smoothly like a potentiometer, but in steps. You can see one on car radios, oscilloscopes, stereo systems, washing machines and other...

SPI Protocol Basics.

SPI Protocol Basics.

SPI (Serial Peripheral Interface) is a serial peripheral communication protocol. It was developed by Motorola but is now used by many manufacturers. It is designed for communication between microcontrollers, as well as with all kinds of peripherals: sensors, ADCs, memory chips, clocks. But still, the most common use of SPI is writing a program into the memory...

Connecting a TFT Display to the STM32F103VET6 via FSMC, Using the SSD1289 as an Example.

Connecting a TFT Display to the STM32F103VET6 via FSMC, Using the SSD1289 as an Example.
Дисплеи

Recently a board with an STM32VET6 that I ordered on AliExpress arrived, and in this article we'll try to connect a TFT display to it; by the way, the board has a dedicated header for it. Unlike the Atmega, STM32 has a special interface for connecting a display, called FSMC, also known as the external memory controller. The idea of FSMC is as follows: when connected via FSMC...

A Circuit for Testing Quartz Crystals with an LED, Manhattan Style.

A Circuit for Testing Quartz Crystals with an LED, Manhattan Style.
Электроника

Many hobbyists build circuit prototypes using pad-per-node construction (Zhutyaev's method); in the West this method is called "Manhattan-style construction". The idea is that the junctions of two or more components are placed on a pad, and the pad itself can be made in two ways: either cut/drilled out or glued on. I think the title of the article makes it clear that...

Displaying an Image on a TFT Display from an SD Card, Using the SSD1289 as an Example.

Displaying an Image on a TFT Display from an SD Card, Using the SSD1289 as an Example.
Дисплеи

In the previous article we converted an image into an array and wrote this array to an SD card; now let's try to display it on a TFT display. To work with the SD card, we'll use the Petit FatFs library, which is designed for 8-bit microcontrollers with little memory. The library consists of 5 files: integer.h - a header file that describes the basic data types...

How to Test a Quartz Crystal Resonator.

How to Test a Quartz Crystal Resonator.
Схемотехника

One of the main reasons quartz crystal resonators fail is simply being dropped, so if a TV remote, a car alarm key fob or any other device containing a crystal stops working, the first thing to do is check it. Checking the oscillation on the board isn't always possible, because the oscilloscope probe has some capacitance, which is usually...

Displaying an Image on a TFT Display from an SD Card, Using the SSD1289 as an Example (Converting an Image to an Array)

Displaying an Image on a TFT Display from an SD Card, Using the SSD1289 as an Example (Converting an Image to an Array)
Дисплеи

In previous articles we dealt with the TFT display and the resistive touch panel; to master all the capabilities the module offers, let's try connecting the memory card, namely writing an image to an SD card and displaying it. Jumping ahead a bit, I'll say that the binary of the image (320x240) came out at 150K, while the Atmega16 has 16K of flash and 1K of RAM, so no matter...

How an Automatic Tire Inflation System Works.

How an Automatic Tire Inflation System Works.
Авто

The Hummer and many military vehicles have been equipped with a tire inflation system for many years. This is done to improve the vehicle's off-road capability on bad roads or in bad weather. Currently, most mass-produced cars are equipped only with a tire pressure monitoring system. Let's look at the advantages such a system provides, since a badly deflated...

How Electric Vehicle Magnetic Fields Affect People.

How Electric Vehicle Magnetic Fields Affect People.
Авто

When hybrid cars first appeared on the roads, rumors spread that the magnetic fields generated while these cars are driving could affect the health of drivers and passengers. To date, studies have been carried out in seven countries, and they established that the magnetic fields generated while electric and hybrid cars are driving pose no...

The "Transparent" Car System.

The "Transparent" Car System.
Авто

Recently, Japanese engineers have been working hard on a system that will rid drivers of "blind spots". One of the names of this system is the "transparent" car system. It makes the car's interior surfaces transparent, so that a driver looking at the back seat will see what's happening near the rear bumper. Implementing this technology requires...

How an Operational Amplifier (Op-Amp) Comparator Works.

How an Operational Amplifier (Op-Amp) Comparator Works.
Схемотехника

Before we start dealing with the comparator, let's recall what an operational amplifier (op-amp) is. An operational amplifier has five pins and is shown on schematics as a triangle, as in the figure below. Let's take a closer look at the pins: two pins for connecting power, the positive and negative supply voltage; two inputs, one non-inverting, labeled V+, and one...

How a PCV Valve Works, or Removing Crankcase Gases.

How a PCV Valve Works, or Removing Crankcase Gases.
Авто

First, let's figure out where gases in the crankcase come from at all, and what a crankcase is. The crankcase (oil pan) is the part of the engine where the crankshaft is usually located, and when the car isn't running, all the oil is stored in it. The picture above shows that the pistons are located above the crankcase and are connected to the crankshaft by connecting rods. Let's take a closer look at how a piston is built. In...