Commonly used data types in microcontroller application design

Publisher:SparklingMoonLatest update time:2015-03-18 Source: diangonKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
       First, let's talk about variables. As the name implies, a variable is a variable that can be changed, similar to the unknown number (X, Y, Z) in a mathematical equation. From the perspective of computer hardware, a variable is actually a symbolic abstraction of a RAM unit. In C language, a variable must be defined with a data type before it can be used.
        As we all know, C language data types are divided into basic data types, bits, pointers, and constructed data types (arrays, structures, unions). MCU applications are composed of a collection of variables defined by these data types.
In a single-chip program system, we often use a file called typedef.h to display the required data types. In specific program design, we need to define various types of variables according to different functional needs. Commonly used ones include data temporary storage class, flag class, etc. For example, it is used to display cache, data collected after analog-to-digital conversion, etc. We will define different types of variables according to different uses, different value ranges, and different scopes.
        Basic data types are the types we often use. In a specific MCU program, we use basic data types to define some flags, temporary storage, and scattered quantities. For example, in an RTC system, we can define (typedef unsigned char u8), u8 hour, u8 minute, u8 second. Basic data types are the simplest, most basic, and most commonly used data types. They are also the most frequently used in operations.
Commonly used basic data types include char, int, float, double, etc. There are signed and unsigned types.
Keywords:MCU Reference address:Commonly used data types in microcontroller application design

Previous article:Methods for Finding Causes of MCU Program Crash
Next article:Understanding of MCU address space stack

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号