I/O Port Simulation mismatch?

I have two simple code examples:

; Example 1
ORG 0
MOV A,#0xff
MOV P0,A
TOP: MOV P1,P0
SJMP TOP
END

----------------------

; Example 2
ORG 0
TOP: MOV A,#0xff
MOV P0,A
MOV P1,P0
SJMP TOP
END

----------------------

Both examples attempt to do the same thing. When clicking on pins of P0 the value is sent to P1. When I single step (F11) through the programs the perform in an identical manner. When I run the programs (F5), example 2 ends up with a mismatch between P0 pins and P1 values.

What could cause such a mismatch?

Parents
  • When I run the programs (F5), example 2 ends up with a mismatch between P0 pins and P1 values.

    Hmmm. That's not what happens when I run it.

    Here's what I get.

    When I start...

    P0      = XXXX XXXX
    P0 Pins = XXXX XXXX
    P1      = XXXX XXXX
    P1 Pins = XXXX XXXX

    When I un-check Port 0 Pin 3 I get...

    P0      = XXXX XXXX
    P0 Pins = XXXX _XXX
    P1      = XXXX _XXX
    P1 Pins = XXXX _XXX

    When I check Port 0 Pin 3 I get...

    P0      = XXXX XXXX
    P0 Pins = XXXX XXXX
    P1      = XXXX XXXX
    P1 Pins = XXXX XXXX

    I'm simulating using the Philips 8xC52.

    Jon

Reply
  • When I run the programs (F5), example 2 ends up with a mismatch between P0 pins and P1 values.

    Hmmm. That's not what happens when I run it.

    Here's what I get.

    When I start...

    P0      = XXXX XXXX
    P0 Pins = XXXX XXXX
    P1      = XXXX XXXX
    P1 Pins = XXXX XXXX

    When I un-check Port 0 Pin 3 I get...

    P0      = XXXX XXXX
    P0 Pins = XXXX _XXX
    P1      = XXXX _XXX
    P1 Pins = XXXX _XXX

    When I check Port 0 Pin 3 I get...

    P0      = XXXX XXXX
    P0 Pins = XXXX XXXX
    P1      = XXXX XXXX
    P1 Pins = XXXX XXXX

    I'm simulating using the Philips 8xC52.

    Jon

Children
More questions in this forum