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

Peripheral simulation

I have read this article http://www.keil.com/support/docs/2443.htm

It says: If you set the PORT1 VTREG to a value of 0xAA (by typing PORT1=0xAA in the Command Window), your target program will read 0xAA from the P1 SFR.

I am simulating a peripheral for the uvision. Therefore, I need to define the VTR and SFR for the simulated peripheral.

In my peripheral I have defined a VTR to be the value on the PORTx. As far as I understand, this means that whenever I write a value to the VTR, my Px SFR can read that value as an input. But how to relate my PORTx VTR to its SFR? How should I for example trigger an interrup whenever the value on the VTR changes?