This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Question with bdata declaration

DATA 0020H 000BH BIT_ADDR ?BA?XXACT_H
BIT 002BH.0 0000H.1 UNIT _BIT_GROUP_ 002BH.1 0000H.7 *** GAP ***
IDATA 002CH 000FH UNIT ?ID?XXACT_H 003BH 002DH *** GAP ***

So from what i know Bdata start from 20H and have 16byte of space.
I only used 8 bytes in my program
however when I want to declare a new bdata

unsigned char bdata test;


the address space overflows.

Checkign the M51 file, it appears that the IDATA is taking up the bdata space??? Is it? Why? How to solve this problem?

Parents
  • Actually... i found out if i remove all this _at_
    then the program is fine...

    unsigned char idata Name[10] _at_ 0x68;
    unsigned int idata TestCH _at_ 0x73;
    unsigned char idata DACSH _at_ 0x75;
    unsigned char idata DACSL _at_ 0x76;
    unsigned char idata DACDH _at_ 0x77;
    unsigned char idata DACDL _at_ 0x78;
    unsigned char idata Glevel _at_ 0x79;
    unsigned char idata DACCH _at_ 0x7A;
    unsigned char idata DACCL _at_ 0x7B;
    unsigned int idata BTG _at_ 0x7C;       //Gate on counter
    unsigned char idata BTD _at_ 0x7E;      //Gate delay
    unsigned char idata BTV _at_ 0x7F;      //Total line-2
    

    but why? I didn't declare those idatas to be within the range from 20-2F...

Reply
  • Actually... i found out if i remove all this _at_
    then the program is fine...

    unsigned char idata Name[10] _at_ 0x68;
    unsigned int idata TestCH _at_ 0x73;
    unsigned char idata DACSH _at_ 0x75;
    unsigned char idata DACSL _at_ 0x76;
    unsigned char idata DACDH _at_ 0x77;
    unsigned char idata DACDL _at_ 0x78;
    unsigned char idata Glevel _at_ 0x79;
    unsigned char idata DACCH _at_ 0x7A;
    unsigned char idata DACCL _at_ 0x7B;
    unsigned int idata BTG _at_ 0x7C;       //Gate on counter
    unsigned char idata BTD _at_ 0x7E;      //Gate delay
    unsigned char idata BTV _at_ 0x7F;      //Total line-2
    

    but why? I didn't declare those idatas to be within the range from 20-2F...

Children