Data: Fixedly refers to the first 128 RAMs from 0x00 to 0x7f, which can be read and written directly using acc, with the fastest speed and the smallest generated code.
idata: Fixedly refers to the first 256 RAM from 0x00 to 0xff, of which the first 128 are exactly the same as the 128 of data, but the access method is different. idata is accessed in a pointer-like manner similar to C. The statement in the assembly is: mox ACC, @Rx. (Unimportant supplement: pointer-style access to idata in C works very well)
xdata: External extended RAM, generally refers to the external 0x0000-0xffff space, accessed using DPTR.
pdata: The lower 256 bytes of external expansion RAM, read and write when the address appears on A0-A7, use movx ACC,@Rx to read and write. This is quite special, and C51 seems to have a bug for this, so it is recommended to use it less. But it also has its advantages. The specific usage belongs to the intermediate problem, so it will not be mentioned here.
What is the function of unsigned char code table[] code in microcontroller C language?
How to use bdata?
char bdata MODE;
sbit MODE_7 = MODE^7;
sbit MODE_6 = MODE^6;
sbit MODE_5 = MODE^5;
sbit MODE_4 = MODE^4;
sbit MODE_3 = MODE^3;
sbit MODE_2 = MODE^2;
sbit MODE_1 = MODE^1;
sbit MODE_0 = MODE^0;
8 bit variables MODE_n are defined
This is a definition statement, a special data type of Keilc. Remember that it must be sbit
and not bit MODE_0 = MODE^0;
If the assignment statement is like this, C language will treat it as an XOR operation
//------------------------------------------------ -------------------------------------------------- ----------------
Space Name
|
Address range
|
illustrate
|
DATA
|
D:00H~7FH
|
On-chip RAM direct addressing area
|
BDATA
|
D:20H~2FH
|
On-chip RAM bit addressable area
|
IDATA
|
I:00H~FFH
|
On-chip RAM indirect addressing area
|
XDATA
|
X:0000H~FFFFH
|
64KB regular off-chip RAM data area
|
HDATA
|
X:0000H~FFFFFFH
|
16MB extended off-chip RAM data area
|
CODE
|
C:0000H~FFFFH
|
64K conventional on-chip and off-chip ROM code area
|
HCONST(ECODE)
|
C:0000H~FFFFFFH
|
16MB extended off-chip ROM constant area (can be used as code area for Dallas390)
|
BANK0~BANK31
|
B0:0000H~FFFFH
:
:
B31:0000H~FFFFH
|
Group code area, maximum expandable 32X64KB ROM
|
and .bin: executable files.map
and .lst: link files.o
: target files.crf
, .lnp, .d and .axf: debugging files.opt
: save project configuration information.bak
: project backup file
M51 file, startup file.
Previous article:MCU PID Program
Next article:Keil "RECURSIVE CALL TO SEGMENT" completely solves
- Popular Resources
- Popular amplifiers
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Practical sharing | Key technologies and solutions for 5G Internet of Vehicles
- Introduction and description of domestic mainstream PIC microcontrollers
- [GD32L233C-START Review] ML Component Control
- Is this a bug in the forum?
- [Perf-V Review] + Perf-V IDE driver and its problems
- Nios 2 software build tools for eclipse freezes when creating a project
- DC power supply design
- [Qinheng RISC-V core CH582] BUG serial port can only receive up to 8 bytes at a time
- Open Source & Group Purchase: RCSN's Wireless Multi-channel Serial Port Tool is here~
- How to Learn FPGA