Keil™, An ARM® Company

Technical Support

DSCOPE: READING THE LOCATION OF AN SBIT


Information in this article applies to:

  • C51 Version 5.50

SYMPTOMS

My program has an sbit defined for bit 0 of Port 1 called db0. When I enter &db0 into the command window in dScope, the address returned is 0x480. Shouldn't it be 0x90.0?

CAUSE

The address dScope gives is correct, however, it is the bit address rather than the byte address. Divide the bit address by 8 to obtain the byte address:

0x480 / 8 = 0x90

which is the address of Port 1, bit 0.

Last Reviewed: Wednesday, August 03, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure