|
|
Technical Support
Support Resources
Product Information
|
MON51: Configuring for Dallas DS5000
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.
-
The DS5000 has on-chip RAM that can be used as CODE and
XDATA.
-
A partition in the on-chip RAM divides the CODE (below the
partition) from the XDATA (above the partition).
- The partition is located using the MCON register.
-
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:
-
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
-
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
-
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.
Last Reviewed: Thursday, February 25, 2021
|
|
|