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

Change the PC

I have an Atmel t89c51cc01 microcontroller. Now i want to write something in the PC (program counter. How can i do this and what is the adress of the PC???

Parents
  • The PC is not an SFR so you can't change it that way.

    There is a really cool instruction that changes the PC. It's called JMP. When you use the JMP instruction, the number you specify after the JMP is loaded into the PC. For example, the following:

    JMP 1234h
    

    changes the PC to 1234h.

    Jon

Reply
  • The PC is not an SFR so you can't change it that way.

    There is a really cool instruction that changes the PC. It's called JMP. When you use the JMP instruction, the number you specify after the JMP is loaded into the PC. For example, the following:

    JMP 1234h
    

    changes the PC to 1234h.

    Jon

Children
No data