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...

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...

Flashing AVR via a Bootloader.

Flashing AVR via a Bootloader.

Since I didn't get a USB programmer right away, and flashing via the COM port was slow and inconvenient, I had to find a way out of the situation, and it was to use a bootloader. One of my previous articles described how to flash an STM32 using its bootloader, but on STM32 the bootloader is programmed into the chip at the factory during manufacturing, whereas here we'll have to flash it ourselves. Here's how it looks in...

A Microcontroller-Based Scale: Connecting the HX711 to an Atmega16.

A Microcontroller-Based Scale: Connecting the HX711 to an Atmega16.
Схемотехника

This scale has been sitting unused for a long time. One day it simply stopped turning on, and my attempt to repair it failed, so I decided to restore it and at the same time figure out how it works. For this I ordered an HX711 board from AliExpress. This chip contains a programmable gain amplifier and a sigma-delta ADC; it was specifically designed for...

Drawing a Custom Character on a 1602A LCD Display.

Drawing a Custom Character on a 1602A LCD Display.
Дисплеи

In previous articles we looked at how to initialize an LCD display and output characters to it using the character generator table (CGROM). Previous articles also mentioned a type of memory called CGRAM, in which you can store your own characters. I should say that its size is limited and it can hold up to 8 characters. One character that can come in handy and that isn't in the standard...

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 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...

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...

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...