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

Back to Subject List

Thread Closed: Another thread already exists on this topic

???
02/03/05 03:20
Read: times


 
Msg Score: -1
 -1 Didn't Search First
#86430 - Some problem running program on RAM
Currently my design is using external memory, 0000h to 7fffh for ROM and 8000h to FFFFh for Ram. I use below to boot:

'Steve's 8051 bootloader - 18 April 1995
Download Intel hex files to address 8000h'

But I met some problem. After loading Steve's Bootloader version 3, I connect my RS232 to PC and using software from Bray's Terminal. It works. I try to send intel Hex file to Ram at address of 8000h. It works too. How do I figure out? I replace the Ram using NV Sram. Then I check the content.
The problem I am having now is, whenever after the file is sent, it should execute that file. Since the file is sent at starting address of 8000h, and according to the bootloader I used, boot3, After the Ram receiving file, the file should run. But I didn't get the file run. It juz prompt back to
'Steve's 8051 bootloader - 18 April 1995
Download Intel hex files to address 8000h'

This is the Blink.asm file. After loading it into Ram which is at address if 8000h, The Port p3.5 cant blink. If I modify the program and load into Rom at address of 0000h, it Blinks! The Bootloader I am using is Steve's Bootloader3 1995.

Blink.asm :

LEDPIN BIT P3.5 ;your favorite port pin (LED preferred)

START CODE 8000H ;start address of user programs

TIME EQU 8 ;time constant in units of 250 ms (for 12 MHz)

ORG START ;program start address

BLINK: CPL LEDPIN ;toggle pin (Great, if connected to a LED!)
MOV R3,#TIME ;wait for TIME * 125 ms (12 MHz)
MOV R2,#0
MOV R1,#0
LOOP: DJNZ R1,LOOP
DJNZ R2,LOOP
DJNZ R3,LOOP
SJMP BLINK ;This is repeated forever,
;if you don't press reset ...
END

Blink.hex:
:10800000B2B57B087A007900D9FEDAFCDBFA80F0A1
:00000001FF



Thanks!

Any idea where the problem is?
In fact, I try to use blink.asm from asem51 assembler to verify my 8051 trainer board. The program works, when I program onto Rom at address of 0000h with slight modification. Originally the program is begin with 8000h for Ram purpose. But when I try that the rom is runnning boot3 and send blink.hex to Ram with starting address inside blink is 8000h, the LED won't blink.

List of 2 messages in thread
TopicAuthorDate
Some problem running program on RAM            01/01/70 00:00      
   why another therad            01/01/70 00:00      

Back to Subject List