|
|||||||||||
|
Technical Support Support Resources
Product Information |
A51: Error A17 (Invalid Byte Base in Bit Address Expression)Information in this article applies to:
QUESTIONI've written a simple assembly program as follows:
However, this program assembles with the following error message:
How to I address bits with the assembler? ANSWERThe 8051 supports 256 addressable bits. The first 128 bits (bit addresses 0x00-0x7F) are located in the data memory from byte address 0x20 to 0x2F. You may use the bit address or the dotted byte address. For example, the following two instructions:
set the same bit. The last 128 bits (bit addresses 0x80-0xFF) are located in the SFR memory at SFR addresses 0x80, 0x88, 0x90, 0x98, 0xA0, 0xA8, 0xB0, 0xB8, 0xC0, 0xC8, 0xD0, 0xD8, 0xE0, 0xE8, 0xF0, and 0xF8. For example, the following two instructions:
set bit 2 on Port 3. The error you receive indicates that the byte address you have provided is not valid for bit operations. In you example, 1Fh.7 is not a valid bit address. The bit addressable bits must be within the range of 0x20 to 0x2F for the data memory. If you specify a byte address between these values, your instruction will work. MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.