dept: Computer Science - Page 13 of 23

228 articles found.

PWM with STM32

Overview, PWM signal generation through timer in STM32, STM32 configuration with STCube, Basic configuration, Timer 2 configuration, The initialization code, Dimming LED,

PWM stands for P ulse- W idth M odulation. Once the switching frequency (f sw ) has been chosen, the ratio between the switch-on time (T ON ) and the switch-off time (T OFF ) is varied. This is commonly called duty-cycle (D). The duty cycle can be between 0 and 1 and is generally expressed as a percentage (%). D = T ON / (T ON + T OFF ) = T ON x f sw The variation of the pulse width, made at a high frequency (kHz), is perceived as continuous and can be translated into a variation of the rotation speed of a motor, dimming a LED, driving an encoder, driving power conversion, and etc. The use of PWM is also widely used in the automotive sector in electronic control units (ECU - Electronic Control Unit) to manage the energy to be supplied to some actuators, both fixed and variable frequency. A ...

Using DAC with STM32

Overview of DAC, DAC on STM32 platform, DAC in manually mode, Configuration of DAC in manual mode, Diving into the initialization code, Driving DAC to generate a reference voltage, Using DAC in data memory access (DMA) mode with a timer, Sinewave generation

A D igital to A nalog C onverter( DAC ) performs the task of converting digital words of n bits into voltages whose amplitude will be proportional to the value of the code expressed by the words themselves. Since the input binary words represent a succession of finite codes, the voltage coming out of a DAC cannot be continuous over time but is made up of as many levels as the converted codes are. This means that the devices to which the analog signal produced by a DAC is sent must filter it with a low-pass characteristic (integrating action). The operating criterion of a DAC is simple: in fact, it is sufficient to have a succession of as many voltages as there are convertible codes, obtained for example by means of a weighted resistance network (i.e. the value proportional to the code impl ...

How to use ADC with STM32?

Using ADC with STM32, ADC channel selection, ADC setting, ADC regular conversion mode, Injected simultaneous mode, Regular simultaneous mode

An A nalog to D igital C onverter ( ADC ) converts a continuous signal (usually a voltage) into a series of discrete values ??(sequences of bits). The main features are: Resolution (in analog terms): It is the minimum variation of the analog input voltage that can determine the variation of the LSB, that is of the least significant bit of the output code. Since the quantization step Q corresponds to the LSB, it can be said that the resolution coincides with the quantization step Q (and therefore is measured in Volts). We can say that the quantization step Q corresponds to the LSB because two contiguous quantization bands, each of amplitude Q, are identified by codes that differ only for the least significant bit. Resolution (in digital terms): It is the number n of bits present at the conv ...

STM32 SPI Communication

SPI communication with STM32, SPI in polling mode, SPI in interrupt mode, SPI in DNA mode, SCLK, MOSI, SS

The SPI ( S erial P eripheral I nterface) protocol, or rather the SPI interface, was originally devised by Motorola (now Freescale) to support their microprocessors and microcontrollers. Unlike the I2C standard designed by Philips, the SPI interface has never been standardized; nevertheless, it has become a de-facto standard. National Semiconductor has developed a variant of the SPI under the name Microwire bus. The lack of official rules has led to the addition of many features and options that must be appropriately selected and set in order to allow proper communication between the various interconnected devices. The SPI interface describes a single Master single Slave communication and is of the synchronous and full-duplex type. The clock is transmitted with a dedicated line (not necess ...

Write and Read an I2C EEPROM with STM32

I2C eeprom, Write and Read an EEPROM with STM32, STM32CubeMX project, Serial I2C, I2C EEPROM with STM32

EEPROMs ( E lectrically E rasable P rogrammable R ead- O nly M emories) allow the non-volatile storage of application data or the storage of small amounts of data in the event of a power failure. Using external memories that allow you to add storage capacity for all those applications that require data recording. We can choose many types of memories depending on the type of interface and their capacity. EEPROMs are generally classified and identified based on the type of serial bus they use. The first two digits of the code identify the serial bus used: Parallel: 28 (for example 28C512) much used in the past but now too large due to having many dedicated pins for parallel transmission Serial I2C: 24 (for example 24LC256) Serial SPI: 25 (for example 25AA080A) Serial - Microwire: 93 (for exa ...

Databases and CRUD operations in C#

C#, C# crud, C# crud operations, crud c#, c# sql, sql database C#

Are you here to learn about Databases and CRUD operations in the C# programming language? If so, then you will be an expert in no time. Learning Databases and CRUD operations in C# is not a piece of cake. But, if you know all the terms and steps of CRUD operations and databases in C#, it will not be rocket science for you. This article contains all the information you should know regarding databases and CRUD operations. So, keep reading till the end! C# Programming Language: An Overview We know that you are already aware of the C# programming language. So, here is a quick overview of the C# programming language before we move to the actual topic: C#, also known as C-Sharp, is an object-intended coding language that operates on the .NET Platform and is developed by Microsoft. ISO and ECMA h ...

I2C communication with STM32

STM32 I2c Communication, STM32 I2c, stm32 I2c master, stm32 i2c slave, I2c in stm32, i2c communication in stm32

Hello friends, I hope you all are doing great. In today's lecture, we will have a look at the I2C Communication with STM32 Microcontroller board. I am going to use the Nucleo board for today's lecture. In the previous lecture, we have discussed STM32 Serial communication both in Interrupt Mode and polling Mode. Today, we will study another way of communication(i.e. I2C) with STM32. So, let's first have a look at what is I2C Communication: What is I2C Communication? I²C (Inter-Integrated Circuit) is a two-wire serial communication system used between integrated circuits. Like any serial protocol, one of its advantages is that of using only two lines that transmit or receive a sequence of bits, the limit is the communication speed which has been improved over the years. The bus was conceived ...

STM32 Serial Communication in Polling Mode

UART Communication in stm32, usart communication in stm32, stm32 usart, stm32 serial communication, stm32 uart, stm32 usart, polling mode in stm32, polling mode serial stm32

USART is the acronym for U niversal S ynchronous- A synchronous R eceiver- T ransmitter, and is the advancement of the old UART that was unable to handle synchronous communications; in computers, it deals with the management of communication via the RS-232 interface. Generally, in the communication between devices, there is a transmitter and receiver that can exchange data bidirectionally, thus it happens for example in the communication between the microcontroller and third-party peripherals. What is Serial Communication? In serial communications, the transmitting device sends information (bitstream) through a single channel one bit at a time. Serial communications are distinguished from parallel communications where the bitstream is sent over several dedicated lines altogether. Over the ...

OOP Concepts in C#

C#, OOP in C#, C# oop, oop concepts in c#, why oop, Encapsulation, Polymorphism, Inheritance, Abstraction

Do you wish to learn object-oriented programming concepts in the C# programming language? If so, then you have come to the right place. Learning about the object-oriented programming concepts in the C# is extremely important. But, what points should you learn? This article contains a detailed context of OOP concepts in the C# programming language, with all the answers to your questions. So, keep reading to learn everything about the OOP concepts in the C#. Brief Introduction To C# Programming Language We know that you already have a great understanding of the C# programming language. But, we want to begin the article with a brief introduction to the C# so that you have no confusion regarding anything. C# is an exceptional, object-intended programming language that allows programmers to cre ...

Data Structures in C#

C# Programming Language, C#, Data Structures in C#, C# Data Structures, Abstract Data Type, types of structures in C#, Primitive Data Structure

Are you here to learn about the Data Structures in the C#? If so, then you will learn everything in no time with our article. C# programming language is undoubtedly the most used language in the entire world. It has exceptional features and applications that benefit us a lot. In fact, the program where I am typing the article (Microsoft Word) is also an application of the C# programming language. But, how is C# related to Data Structures? Do not worry. This article contains everything that you need to know about the Data Structures in the C#. So, keep reading to find out! C# Programming Language: An Overview C# is a Microsoft-developed, overall object-intended coding language that has been certified by the ECMA and the Global Standards Organization. C# is developed for the Standard Languag ...