How to Get Touch Point Coordinates and Calibrate a Resistive Touch Panel, Using the XPT2046 as an Example.

How to Get Touch Point Coordinates and Calibrate a Resistive Touch Panel, Using the XPT2046 as an Example.
Дисплеи

In the previous article we looked at how to initialize the controller; in this one we'll figure out how to get the touch coordinates and calibrate the touch panel. Before determining the touch coordinates, the touch itself has to be detected; for this we'll use the dedicated T_IRQ pin, which goes to logic zero when the panel is touched. It would be good to connect it to a pin responsible for...

How a Resistive Touch Screen Works, Using the XPT2046 Controller as an Example.

How a Resistive Touch Screen Works, Using the XPT2046 Controller as an Example.
Дисплеи

As you know, touch screens today come in 2 types: resistive and capacitive. Their main difference for the user is that a resistive screen responds to pressure, while a capacitive one responds to touch. Let's look at how each of them is built. A resistive screen is a glass liquid crystal display covered with a flexible membrane. On the facing...

How an Adaptive Front-Lighting System (AFS) Works.

How an Adaptive Front-Lighting System (AFS) Works.
Авто

Most manufacturers, with the exception of Valeo, call the adaptive lighting system the Adaptive Front-lighting System (AFS); Valeo calls it BeamAtic. A large number of accidents happen at night, and one of the reasons is poor road lighting. Although all cars drive with their lights on at night, sometimes this isn't enough to avoid...

Drawing Geometric Shapes on a TFT Display, Using the SSD1289 as an Example.

Drawing Geometric Shapes on a TFT Display, Using the SSD1289 as an Example.
Дисплеи

In the previous article we learned to display characters and strings on a TFT display; in this one we'll learn to draw geometric shapes. There aren't that many geometric shapes useful for building a graphical interface; the main ones are the rectangle and the circle, and those are what we'll learn to draw, in two variants, filled and unfilled. I'll say right away that the article will describe in detail...

Displaying Characters and Strings on a TFT Display, Using the SSD1289 as an Example.

Displaying Characters and Strings on a TFT Display, Using the SSD1289 as an Example.
Дисплеи

First of all, I'd like to say that the display's shorter side is X and the longer side is Y. In the previous article we looked at how to initialize the display; in this one we'll learn to display characters and strings. Let's start with characters. Characters are a set of points filled in a certain order. To display a point, you need to perform the following sequence...

How to Measure Output Impedance.

How to Measure Output Impedance.
Схемотехника

I think many people know that if you turn on the high beams, the heater and the rear window defroster in a running car, the voltage produced by the alternator drops; people also say the voltage sags. How does this relate to electronics? In electronics everything follows the same scenario: if you connect a low-resistance load to a signal generator, the voltage at its terminals...

Initializing a TFT Display for AVR, Using the SSD1289 as an Example.

Initializing a TFT Display for AVR, Using the SSD1289 as an Example.
Дисплеи

The other day a TFT display arrived, driven by an SSD1289 controller, with a resistive touch panel on an XPT2046 and an SD card slot, in short, this one. We'll use an Atmega16 as the controlling microcontroller. I didn't look for ready-made initialization examples; I decided to figure out how it works and write my own. First, let's deal with the connection interface. Communication with the SSD1289 controller can take place...

How to Get DC from AC Voltage, or How a Diode Works.

How to Get DC from AC Voltage, or How a Diode Works.
Схемотехника

To understand how to get DC voltage from AC, we need to figure out how alternating current differs from direct current and how a diode works. Alternating current (AC) is an electric current that changes in magnitude and direction over time or, in a special case, changes in magnitude while keeping its direction in the electrical circuit...

How an Immobilizer Works.

How an Immobilizer Works.
Авто

An immobilizer is a type of anti-theft system that prevents the engine from starting. Early immobilizers used 32-bit encryption, which corresponds to billions of combinations. Newer immobilizers, including car alarm key fobs, use 40-bit encryption. One of the first immobilizers was installed on the Mustang in 1997 by Ford...

How a Driver Fatigue Monitoring System Works.

How a Driver Fatigue Monitoring System Works.
Авто

It's no secret that falling asleep at the wheel causes many serious accidents. If a trip lasts more than 4 hours, the driver's reaction time increases several times over, and nighttime can also play a role. Let's look at what solutions automakers offer for this problem. One of the simplest devices monitoring the driver's state (whether they've fallen asleep...

How to Light an LED by Clapping Your Hands, or How a Peak Detector Works.

How to Light an LED by Clapping Your Hands, or How a Peak Detector Works.
Схемотехника

First of all, a peak detector is designed to register the maximum or minimum amplitude of a signal. The simplest peak detector can be built from two parts, a diode and a capacitor. When a signal of arbitrary shape is applied to the input of a peak detector, the capacitor charges as shown in the picture below, so the voltage across the plates...

How to Suppress Inductive Spikes, or Why a Diode Is Connected in Parallel with a Relay.

How to Suppress Inductive Spikes, or Why a Diode Is Connected in Parallel with a Relay.
Схемотехника

In circuits where a relay coil is driven by a transistor, a diode is always connected in parallel with the coil. Let's figure out what role the diode plays. Below is a circuit showing that if a certain voltage is applied to the gate of a field-effect transistor, the transistor becomes equivalent to a wire, meaning its resistance tends to zero. Let's build the circuit shown below and...

Transistor Circuit Configurations.

Transistor Circuit Configurations.
Схемотехника

However a transistor is connected in a circuit, the input and output currents will flow through one of its terminals; this terminal is called common. There are three bipolar transistor configurations: common emitter; common collector; common base. Let's start with the common emitter circuit. the input signal is applied to the base; the output signal is taken from the collector;...

How a Traction Control System Works

How a Traction Control System Works
Авто

The traction control system appeared in the 1970s, and at that time building such a system was a non-trivial task. Today every car is equipped with many electronic control units, including ABS, and the throttle, the injectors and even the spark are controlled by the engine control module (ECM). The mention of ABS was...

How a Sleeve Valve Engine Works.

How a Sleeve Valve Engine Works.
Авто

During World War II, German engineers developed one of the best aircraft of that era, the Focke-Wulf Fw 190 fighter shown in the preview. In its day it had no equal in the air, and only the invention of a powerful unconventional engine, which many have probably never heard of, helped restore the balance in the air. Because of the power it could deliver, it...

How a Car Inverter Works.

How a Car Inverter Works.
Авто

Today many cars have extra gadgets such as an mp3 player, a GPS navigator or a dashcam. These devices can run from the cigarette lighter or from their own battery. But what if on the road you need to use a device we usually plug into a wall outlet? For example, we want to charge a laptop or a dead phone. In that case we...

How to Measure the Length of a Coaxial Cable and Its Characteristic Impedance with an Oscilloscope.

How to Measure the Length of a Coaxial Cable and Its Characteristic Impedance with an Oscilloscope.
Схемотехника

To transmit information over a transmission line, the load impedance must equal the line's characteristic impedance. If this condition isn't met and the load impedance at the end of the line is high, the signal energy, having reached the end of the line, can't leave it and is reflected back. After some time the reflected signal returns to the input of the line and adds to...