Keil Logo Arm Logo

Which bytes of XDATA will be used when switching the code bank?

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

Details Message
Read-Only
Author
liao qinglong
Posted
20-Feb-2005 03:22 GMT
Toolset
C51
New! Which bytes of XDATA will be used when switching the code bank?
I used the file: L51_BANK.A51,
and configurated it as following:
;************************ Configuration Section *******************************
?B_NBANKS       EQU  8    ; Define maximum Number of Banks                    *
;                         ; following values are allowed: 2, 4, 8, 16, 32, 64 *
;                         ; for BL51 the maximum value for ?B_BANKS is 32     *
;                         ; for LX51 the maximum value for ?B_BANKS is 64     *
;                                                                             *
?B_MODE         EQU  1    ; 0 for Bank-Switching via 8051 Port                *
;                         ; 1 for Bank-Switching via XDATA Port               *
;                         ; 4 for user-provided bank switch code              *
;                                                                             *
?B_RTX          EQU  0    ; 0 for applications without real-time OS           *
;                         ; 1 for applications using the RTX-51 real-time OS  *
;                                                                             *
?B_VAR_BANKING  EQU  1    ; Variable Banking via L51_BANK (far memory support)*
;                         ; 0 Variable Banking does not use L51_BANK.A51      *
;                         ; 1 Variable Banking uses this L51_BANK.A51 module  *
Read-Only
Author
Keil Reinhard
Posted
21-Feb-2005 09:57 GMT
Toolset
C51
New! RE: Which bytes of XDATA will be used when switching the code bank?
Refer to the example in the folder:

Keil\c51\Examples\FarMemory\4MB Variables on Classic 8051.

It has almost the same configuration and shows the relevant settings for the LX51 Linker/Locater CLASSES directive.
Read-Only
Author
Drew Davis
Posted
22-Feb-2005 17:11 GMT
Toolset
C51
New! RE: Which bytes of XDATA will be used when switching the code bank?
Read a bit further in L51_BANK.A51, and you will see the place where you need to define the xdata address containing the bank switch hardware.

IF  ?B_MODE = 1;                                                              *
;-----------------------------------------------------------------------------*
; if ?BANK?MODE is 1 define the following values                              *
; For Bank-Switching via XDATA Port define XDATA Port Address / Bits          *
?B_XDATAPORT    EQU     0FFFFH   ; default is XDATA Port Address 0FFFFH       *
?B_FIRSTBIT     EQU     0        ; default is Bit 0                           *
;-----------------------------------------------------------------------------*
ENDIF;

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

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.