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

How to use movc in keil?

Hi,
Using at89c51 i want some data to copy from program memory to external Data memory..
without using memcopy()...
any idea ?

Parents
  • can you elaborate on that

    INC P2 is a read/modify/write instruction. Just because you last wrote a 0x2F (for example) to P2, doesn't mean that's necessarily what its going to read on the next read cycle of the read/modify/write of "INC P2".

    NEVER assume Ports will return what you last wrote to them without know precisely how the attached hardware will affect the data read back. In the case of P2 being used as an external high address bus, unless you have some fairly strong pullups (which isn't always the case), you'll likely read some combination of the last P2 write value and the last addr-hi value place on the port...randomness depending on bus capacitance of the design.

Reply
  • can you elaborate on that

    INC P2 is a read/modify/write instruction. Just because you last wrote a 0x2F (for example) to P2, doesn't mean that's necessarily what its going to read on the next read cycle of the read/modify/write of "INC P2".

    NEVER assume Ports will return what you last wrote to them without know precisely how the attached hardware will affect the data read back. In the case of P2 being used as an external high address bus, unless you have some fairly strong pullups (which isn't always the case), you'll likely read some combination of the last P2 write value and the last addr-hi value place on the port...randomness depending on bus capacitance of the design.

Children