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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/25/03 12:04
Read: times


 
#46593 - RE: code into eXternal RAM
Responding to: ???'s previous message
Hello again (i hope last time),

"Why does my heart feel so bad..."
I'm not sure if it's language barrier's fault, or i'm not so clever as i thought before.

To be sure i understood right:

CX - Code to be put into Xram (abbreviation to move on easier)
-------
1 step. While debugging, i may leave this EQU as it is in BOOTSTRP (or change it, but then change my CX's vector addresses respectively):
-------
BOOTSTRP code's fragment:

ExInt0 EQU 8003h ; Remap address for ext interrupt 0.
T0Int EQU 800Bh ; Timer 0
...
etc.


ORG 0000h
LJMP Start ; Go to the downloader program.
ORG 0003h
; LJMP ExInt0 ; External interrupt 0.
RETI

ORG 000Bh
; LJMP T0Int ; Timer 0 interrupt.
RETI
...
etc.

and modify my CX vector addressed to fit/match BOOTSTRAP's redirection:

ORG 8003h ; External 0 IE0
LJMP but_ident
ORG 800Bh ; Timer 0 TF0
LJMP T0isr
...
etc.

------
2 step. After sucessfull debugging, i change my CX vector addresses to 00:
------

ORG 0003h ; External 0 IE0
LJMP but_ident
ORG 000Bh ; Timer 0 TF0
LJMP T0isr
...
etc.

ORG 0(1?)033h
XRAMprog: ...

; i'm not sure if i set 0033h, telling bootsptap to go "/0033h" will understand jumping to external ram. well, i assume it would.

----------
3 step. Change BOOTSTRAP's redirection addresses to match previously (in 2 step) defined(?)
----------
BOOTSTRP code's fragment:

ExInt0 EQU 0003h ; Remap address for ext interrupt 0.
T0Int EQU 000Bh ; Timer 0
...
etc.

-------
4 step. Put bootstrap in MCU flash.
-------
5 step. Turn the system ON - execute bootstrap.
-------

"The format for this is to send a slash ("/")
; followed by the address in ASCII hexadecimal, followed by a carriage
; return. Example: "/8A31<CR>" "

At the end i tell adress "/0(1?)033h".
The program is running.

The most bothering thing:
Let's say, i turn the system OFF (RAM is battery backed!). How do i now start the system to run from XRAM without need of PC (telling start address) or any external agent???

by putting the line in CX?:
ORG 0000h
LJMP XRAMprog

And thats it?!

Things to know:
a) BOOTSTRAP will be hold in AT89C51 flash.
b) XRAM is battery backed.
c) system is portable.

Rob

List of 24 messages in thread
TopicAuthorDate
code into eXternal RAM            01/01/70 00:00      
   RE: code into eXternal RAM            01/01/70 00:00      
      RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
            RE: code into eXternal RAM            01/01/70 00:00      
               RE: code into eXternal RAM            01/01/70 00:00      
                  RE: code into eXternal RAM            01/01/70 00:00      
                  RE: code into eXternal RAM            01/01/70 00:00      
   RE: code into eXternal RAM            01/01/70 00:00      
      RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
            RE: code into eXternal RAM            01/01/70 00:00      
               RE: code into eXternal RAM            01/01/70 00:00      
                  RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
      RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
   RE: code into eXternal RAM            01/01/70 00:00      
      RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
            RE: code into eXternal RAM            01/01/70 00:00      
         RE: code into eXternal RAM            01/01/70 00:00      
   RE: code into eXternal RAM            01/01/70 00:00      

Back to Subject List