Connecting a TFT Display to STM32 via FSMC, Using the SSD1963 as an Example.

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

Here's how it happened: one of the site's visitors sent me, as a gift, a 5-inch TFT display controlled by the SSD1963 driver. About ten days later the parcel arrived, but the box it was packed in was dented and the display itself was broken. I wrote to the sender about it, and he immediately ordered the same display on eBay in my name, for which I thank him. No more than two weeks had passed since...

Creating a Project in Keil uVision.

Creating a Project in Keil uVision.
STM32

One of the questions that comes up when switching to STM32 is: "Which development environment should I choose?" The most popular ones are probably Coocox, IAR and Keil uVision; I use the last one. Its main advantage over the others is a powerful simulator with peripheral support and many virtual instruments. All these goodies "make life easier" for an experienced developer and help a beginner figure out the rich...

Methods of Galvanic Isolation.

Methods of Galvanic Isolation.
Схемотехника

The classic definition of galvanic isolation goes like this: galvanic isolation is the transfer of energy or a signal between electrical circuits without electrical contact between them. But I think beginners have questions after reading this definition: How is it done and why is it needed? It can be done in many ways, for example with a transformer...

How to Determine Frequency from a Lissajous Figure.

How to Determine Frequency from a Lissajous Figure.
Схемотехника

One of my previous articles described how to determine the phase difference of two signals from a Lissajous figure. But Lissajous figures have another interesting property: if the frequency of one of the oscillations is known, you can determine the frequency of the other from the shape of the figure. To determine the frequency ratio, draw a horizontal and a vertical line crossing the figure. These...

Driving a MOSFET with PWM.

Driving a MOSFET with PWM.
Схемотехника

In one of my previous articles we looked at how to choose a mosfet operating in switching mode, but it said nothing about the power losses that occur when the switch toggles, the so-called dynamic losses. Now the same thing in plain language: imagine we have a small motor and want to turn it on; to do this, we need to apply voltage to it. If we want to turn...

How to Connect an AVR Microcontroller to an Android Tablet Using the HC-05 Bluetooth Module.

How to Connect an AVR Microcontroller to an Android Tablet Using the HC-05 Bluetooth Module.

At the end of the previous article I wrote that I had managed to create an interface for Android, and in this article I'll try to describe the process. Why "try"? Because I have almost no experience creating Android apps, and in truth there's little I can explain clearly. Okay, enough excuses, time to get down to business. First, download and install Android Studio; how to do this...

Connecting the HC-05 Bluetooth Module to a Microcontroller.

Connecting the HC-05 Bluetooth Module to a Microcontroller.

About a year ago I ordered an HC-05 Bluetooth module on AliExpress. At the time I didn't yet know what I might need it for, but wireless technologies lured me with their mystery. When I ordered it, there was a whole range of Bluetooth modules on the market, from HC-03 to HC-09, but some of them can work either in master mode (HC-04-M) or in slave mode (HC-06-S), while the HC-05 can work in...

STM32 Input Capture Mode.

STM32 Input Capture Mode.
STM32

Capture mode is a special timer mode that works like this: when the logic level on a certain microcontroller pin changes, the value of the counter register is written to another register, called the capture register. What is it for? This mode lets you measure the pulse width or period of a signal. The STM32 capture mode has some features:...

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

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

The algorithms for drawing geometric shapes on a TFT display were covered earlier here, so in this article I'll just give the implementation of the functions for the ILI9341. To fill the screen with the desired color in the previous article, we used the TFT_Fill_Screen() function; the same function can fill a rectangle or square of the required size if you set the coordinates of the working...

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

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

In the previous article we looked at how to initialize a TFT display controlled by the ILI9341 driver; in this one we'll learn to display characters and strings. But first we need to clarify one thing: whereas with the SSD1289 you need to specify two coordinates and the color of a point to draw it on the display, with the ILI9341 you specify 4 coordinates that bound the working area, and then the color of each newly...

TFT Display Initialization for AVR, Using the ILI9341 as an Example.

TFT Display Initialization for AVR, Using the ILI9341 as an Example.
Дисплеи

About a year ago an article appeared on this site about how to initialize a TFT display controlled by the SSD1289, and about a month ago one of the site's visitors wrote to me. The gist of the letter was that he had ordered a display via the link in the article but couldn't get it working, and he offered to send me this display and several others, and I, in turn, would publish the code...

STM32: Triggering the ADC from a Timer.

STM32: Triggering the ADC from a Timer.
STM32

The other day I needed to start an ADC conversion once per second, and it immediately became clear that this can't be done with the SMPR[2:1] bits, which set the number of cycles between ADC samples, so I had to find another way. The maximum number of cycles between samples that can be set with these bits is 239.5. If you add the conversion time of 12.5...

A Diagnostic Cable for Opel.

A Diagnostic Cable for Opel.
Железо

At one point I assembled a Masterkit adapter that lets you diagnose cars over the K-line. Sometimes I use this adapter to read and clear fault codes at friends' requests. By the way, the other day I bought an OBD connector for it so I don't have to poke wires into the diagnostic socket...

Installing an SSD in an ASUS N750JV Laptop.

Installing an SSD in an ASUS N750JV Laptop.
Железо

When I bought my laptop, I simply didn't have enough money for an SSD, and I didn't know about AliExpress back then, so I made do with what I had. After a few years of using the laptop, it became clear that it really, really needed an SSD. A search on AliExpress showed that SSDs are no longer a luxury and cost much less, so the choice was obvious: order one. But first I had to answer two questions: first,...

Ordering PCBs from Seeed Studio.

Ordering PCBs from Seeed Studio.
Электроника

I usually make the boards for my projects myself. The process used to be a chore, but after I mastered the photoresist technique it became enjoyable. There is one more thing, though, that takes a lot of time and effort: soldering vias. If there are a few dozen of them, it's no big deal, but if there are more than a hundred, it's too much. This was exactly such a case, when the number...

Modular Programming.

Modular Programming.

Once a beginner embedded developer has had enough of blinking LEDs, he will certainly decide to write something more serious, and like any beginner he will have only one wish: "to get it all working as fast as possible!!!". In this attempt to prove himself, he will write everything in one file without thinking about the program's structure, but after a while, when part of the plan has been implemented, it will become clear that...

UDB1005S DDS Signal Generator Review.

UDB1005S DDS Signal Generator Review.
Железо

I've been using the UDB1005S signal generator, built on DDS technology, for a long time; I bought it on AliExpress for $30. In short, the UDB100x series includes 3 models: UDB1002, UDB1005 and UDB1008; the last digit determines the maximum operating frequency, and the letter S at the end, if present, means the generator supports sweep_mode. The generator is based on an FPGA + MCU combination; the MCU handles...

Making a Printed Circuit Board with Dry Film Photoresist.

Making a Printed Circuit Board with Dry Film Photoresist.
Электроника

A favorite pastime should bring pleasure; otherwise it's not a favorite pastime and there's no point doing it. But things don't always work out right away... Repeated attempts to make a quality PCB with 0.3mm traces and gaps using the toner transfer method never succeeded. It's not that I couldn't make a board: I made boards and they worked, but the process was not very pleasant, because from...

How an Instrumentation Amplifier Works.

How an Instrumentation Amplifier Works.
Схемотехника

In one of my previous articles I described how I analyze op-amp circuits. Looking at how various elements behave in the feedback loop is not very interesting: a bunch of formulas and nothing more, and there's plenty of that on the internet already. In my opinion, it will be more interesting to look at the classic instrumentation amplifier circuit; to be precise, we'll derive it through logical reasoning. By the way...