Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/07/12 15:25
Read: times


 
#185372 - works OK here
Responding to: ???'s previous message
I tried the following snippet:
$Mod52

AUXR EQU 08Eh

;testing P0 state after MOVX
;if MOVX goes to internal ERAM then it should not modify P0


Main:
;"prologue" - one slow blink with the non-P0 LED only
    mov  P1, #0FFh
    call Delay
    call Delay
    call Delay
    call Delay
    call Delay
    mov  P1, #0
    call Delay
    call Delay
    call Delay
    call Delay
    call Delay


    mov  auxr, #0       ;use ERAM
    mov  dptr, #0022h   ;
    mov  r3, #5
LoopX1:
    mov  P0, #0FFh
    mov  P1, #0FFh
    movx @dptr, a
    call Delay
    mov  P1, #0
    mov  P0, #0
    movx @dptr, a
    call Delay
    djnz r3, LoopX1

    mov  auxr, #2       ;don't use ERAM
    mov  dptr, #0022h
    mov  r3, #5
LoopX2:
    mov  P0, #0FFh
    mov  P1, #0FFh
    movx @dptr, a
    call Delay
    mov  P1, #0
    mov  P0, #0
    movx @dptr, a
    call Delay
    djnz r3, LoopX2

    mov  auxr, #2       ;switch on ERAM but access high address (i.e. XRAM)
    mov  dptr, #2222h
    mov  r3, #5
LoopX3:
    mov  P0, #0FFh
    mov  P1, #0FFh
    movx @dptr, a
    call Delay
    mov  P1, #0
    mov  P0, #0
    movx @dptr, a
    call Delay
    djnz r3, LoopX3


    jmp  Main


;cca 300ms delay
Delay:
    mov r5, #3
DelayX1:
    djnz r7, DelayX1
    djnz r6, DelayX1
    djnz r5, delayx1
    ret



    end

 

in a P89V51RD2BN with a red LED on P0.0 and a yellow on P1.0 - and it works as expected: after a longer light-up of the yellow LED, 5x both LEDs blink, then 10x only the yellow blinks.

Can you please try the same snippet at your place, or post the code you were using for confirming the problem?

JW


List of 7 messages in thread
TopicAuthorDate
Strange Problem in P89v51rd2bn            01/01/70 00:00      
   what is in DPTR?            01/01/70 00:00      
      DPTR = 0x0022            01/01/70 00:00      
         works OK here            01/01/70 00:00      
            BUG in Proteus Simulator            01/01/70 00:00      
      what is OSPI ?            01/01/70 00:00      
         incompetent document conversion?            01/01/70 00:00      

Back to Subject List