??? 02/23/07 14:53 Read: times |
#133548 - ... Responding to: ???'s previous message |
Then an Intel-made 8051 microcontroller will have DPTR set to 0. so then I guess it is safe to assume that a datasheet is correct. 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. In my code, I only depend on DPTR being zero on every reset. Once my code runs, the contents of P1 will be stored at the memory location set by DPTR. Then DPTR increments, so that the next byte is stored. After all, if you do not want to depend on programmable devices, why depend on that fact? I'm trying to use the fewest number of chips for a guaranteed working system. If I added "mov DPTR,0", then I might need more chips to decode the logic coming out of the decoder 74HC138. For now, I am relying on DPTR to be 0. |