STM8 data @near @tiny defines
stm8 stvd under
which near equals xdata 51 and
tiny equals idata 51
Waveshare Electronics
http://www.waveshare.net/article/STM8-3-1-10.htm
How to assign a variable to a specific address
For example:
unsigned char temp_A@0x00; //define unsigned variable temp_A, and force its address to be 0x00
unsigned char temp_B@0x100; //define unsigned variable temp_B, and force its address to be 0x100
@tiny unsigned char temp_C; //define unsigned variable temp_C, and the compiler will automatically assign it an address in RAM with an address less than 0x100
@near unsigned char temp_D; //define unsigned variable temp_D, and the compiler will automatically assign it an address in RAM with an address greater than 0xFF You
can also use the pseudo-instruction "pragma" to define functions or variables in a specified section, for example:
#pragma section [name] //Define the uninitialized variables defined below into the .name section
Unsigned char data1;
Unsigned int data2;
…(any variables that need to be defined in the .name section)
…
#pragma section [] //Return to a normal section.
Note: The pragma pseudo-instruction can be used to locate functions, initialize variables, or uninitialize variables. These three are distinguished by different brackets.
(name): code
[name]: uninitialized variable
{name}: initialized variable
Previous article:STM8L RTC summary initialization and configuration
Next article:STM8L controls the temperature sensor DS18B20
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- [Evaluation of domestic FPGA Gaoyun GW1N-4 series development board]——12. Two tips (multi-function pins and board silk screen)
- Analysis of Current Amplitude Chopping in Switched Reluctance Motor
- What are the units of divergence and curl used in electromagnetic fields?
- [Classic C language knowledge] Summary of C/C++ programming difficulties
- Is this a series voltage regulator circuit?
- Design of application model using Bluetooth technology in fieldbus
- Shenzhen Yezhan Electronics is looking for talents||Looking forward to your joining
- 【Atria AT32WB415 Series Bluetooth BLE 5.0 MCU】Serial port test
- Timer/Counter Experiment 2
- "Sky Road" Experiences Orange Automation -- B&R DCS System Applied to Qinghai-Tibet Railway