51 meanings of key words data, bdata, idata, pdata, xdata, and code in study notes

Source: Internet
Author: User
Tags array definition

I recently used 51 single-chip microcomputer as a small project. When programming, the following error occurs:

Main. C (284): Error c249: 'pdata': Segment too large
Main. C (284): Error c249: 'data': Segment too large

At that time, I still did not know what was going on. Later I found that the ram of 51 single-chip microcomputer was relatively small and only B, so I had to save the effort to use it.

Use uchar code XX [10] = when you do not need to change the array definition.

Based on your data usage, you can choose from the following options:

Data: the direct addressing in-chip RAM zone is B (H ~ 7fh)

Bdata: The bit addressing area (20 h ~ 2fh), allowing both byte and bit access

Idata: The on-chip RAM zone indirectly accessed by the microcontroller, allowing access to all on-chip RAM

Pdata: The off-board RAM that RI indirectly accesses is 256b (00h ~ FFH)

Xdata: External Ram indirectly accessed by dptr, allowing access to all 64 kB external RAM (Bytes H ~ Ffffh)

Code: 64 kB program storage area ROM of Single Chip Microcomputer

51 meanings of key words data, bdata, idata, pdata, xdata, and code in study notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.