??? 02/23/07 14:44 Read: times |
#133547 - DPTR initialized Responding to: ???'s previous message |
Mike Stegmaier said:
My 8051 is the 80C51-BH made from intel. I downloaded the hardware manual from them for all their 8051 microcontrollers and it claims that DPTR is set to 0, and the only thing not modified is the IRAM.
Yes, I tested my program against a simulator and it works. Then an Intel-made 8051 microcontroller will have DPTR set to 0. It is likely that all others do the same, but you cannot assume this as being a fact. You will have to verify for each variant you want to use. Unless of course you initialise the DPTR yourself, then you do not depend on what a manufacturer does. If I was to hard-code a rom, I would not assume that any register was having a pre-determined value. It would be safer to initialize yourself all registers you need to have initialized. After all, if you do not want to depend on programmable devices, why depend on that fact? It seems contradictory to your design philosophy. Regards Patrick |