ARM Technical Support Knowledge Articles

CONFIGURING FOR DALLAS DS5000

Applies to: MON51 Target Monitor

Answer


Information in this article applies to:


QUESTION

Can I use MON51 with the Dallas DS5000 and the on-chip RAM?

ANSWER

Yes. There are a few configuration issues you must consider.

  1. The DS5000 has on-chip RAM that can be used as CODE and XDATA.
  2. A partition in the on-chip RAM divides the CODE (below the partition) from the XDATA (above the partition).
  3. The partition is located using the MCON register.
  4. For the monitor to download your target program and set breakpoints, it must relocate the partition, write the program into the XDATA memory space, and relocate the partition.

With these in mind, first, you should modify the INSTALL.A51 monitor configuration file as follows:

  1. Add/change the following to the beginning of the INSTALL.A51 file. Locate the existing INT_ADR_OFF equate and replace with the following:
    USER_PGM_START  EQU     2000H
    USER_PGM_MCON   EQU     030H        ; 1800h
    USER_XRAM_MCON  EQU     0E0H        ; 7000h
    
    sfr MCON = 0C6h;
    sfr TA   = 0C7h;
    
    ;------------------------------------------------------------------------
    ; !!! Don't change these. !!!
    ;------------------------------------------------------------------------
    INT_ADR_OFF     EQU USER_PGM_START      ; INTERRUPT VECTOR OFFSET IF MONITOR
                                            ; IS INSTALLED AT ADDRESS 0000H
    DEF_PC_VAL      EQU USER_PGM_START      ; DEFAULT PC VALUE AFTER START UP
    
  2. Modify the InitSerial routine to include the following code which sets the correct initial value for MCON.
            MOV     TA,#0AAH
            MOV     TA,#055H
            ORL     MCON,#02h       ; Set PAA
    
            MOV     MCON,#USER_XRAM_MCON
    
            MOV     TA,#0AAH
            MOV     TA,#055H
            ANL     MCON,#0FDh      ; Clear PAA
    
  3. Modify the WR_CODE routine as follows:
    WR_CODE:
            SETB    C
            JBC     EA, C_SET
            CLR     C
    C_SET:  PUSH    PSW             ; Save Interrupts
            CLR     EA              ; Disable Interupts
    
            MOV     TA,#0AAH
            MOV     TA,#055H
            ORL     MCON,#02h       ; Set PAA
    
            MOV     MCON,#USER_PGM_MCON
            MOVX    @DPTR,A
            MOV     MCON,#USER_XRAM_MCON
    
            MOV     TA,#0AAH
            MOV     TA,#055H
            ANL     MCON,#0FDh      ; Clear PAA
    
            POP     PSW             ; Restore Interrupts
            MOV     EA,C
    
            RET
    

You may also download a working MON51 HEX File preconfigured for the DS5000.

Article last edited on: 2005-09-22 12:29:41

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential