??? 11/21/09 15:56 Read: times |
#171018 - Not necessary... Responding to: ???'s previous message |
Richard said:
I agree that the measure you recommend will mitigate the risk of the code wandering off into the weeds if there's uninitialized code space, but ... after all, it doesn't cost any extra to fill unused code space with NOP's. With the AT89S52 and ISP programming it is like the following: Before you can program the flash code memory you must fully erase it, which leaves "FF" everywhere in the code memory. Programming means substituting these "FF" by the code bytes and leaving the unprogrammed bytes to "FF". So, a micro eroneously jumping out of the code range will execute "MOV R7,A" instructions while incrementing the program counter over and over again, until it skips to "00", which is the same as if the micro would undergo a hardware reset. So, the micro wouldn't endlessly run ill, and it's not needed to fill the unused code space with NOPs either. Kai Klaas |