Discussion Forum

why the VTREG(Px) doesn't change responding to the relative register?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Liu Hui
Posted
10-Mar-2003 07:21 GMT
Toolset
C51
New! why the VTREG(Px) doesn't change responding to the relative register?
hello
with the Keil uVISION2 51 simulation,sometimes,the register has been set,but the relative VTREG doesn't get to change .for example,in my programme,some positions of register P1 has been set 1,but PORT1 has nothing changed.In some particular programs,it gets to be worse.
I wonder if it's a bug of the Keil simulative programme,and how can I make it work?
Thanks and regards
Huihl@netease.com
Read-Only
Author
Keil Support Intl.
Posted
10-Mar-2003 12:51 GMT
Toolset
C51
New! RE: why the VTREG(Px) doesn't change responding to the relative register?
The simulator behaves exactly like an 8051 device. The PORTx VTREG represents the I/O pins whereas the symbol 'Px' (i.e. P1) is the SFR register itself. When you pull the PORTx value low (for example by modifing it in the peripheral dialogs), you cannot get it high by setting the SFR register. This is the same as with the chip (when you force a pin to low, you cannot get it high via the SFR register since it is then used as input).

For more information refer to pages like:
http://www.keil.com/dd/vtr/2976/1511.htm.
Read-Only
Author
Liu Hui
Posted
11-Mar-2003 00:37 GMT
Toolset
C51
New! RE: why the VTREG(Px) doesn't change responding to the relative register?
lots of thanks.I have gotten it with your help.

Next Thread | Thread List | Previous Thread Start a Thread | Settings