Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

mon51-store code at whr ?

Status
Not open for further replies.

kyle86

Newbie level 4
Joined
Dec 16, 2008
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,329
mon51

i wan ask that, how the mon51 work?
i save the mon51 program(mon51.hex) in microcontroller flash memory rom
than the user program code, should save at whr?

external ram? how to save the other .hex file to ram ?
 

what does 37 whr mean

Do you use Keil's compiler?
If yes, MON51 is programmed within flash. You should use SRAM as program
memory and user's program is downloaded into by the IDE (uV3).
 

mon51 wrong pc

''user's program is downloaded into by the IDE (uV3)'' ??
u mean download to external ram ??...
can u teach me the step? i read so long... still dunno how to download the user program code...
 

keil mon51 commands

u mean download to external ram ??... ==> Yes, uV3 will do this.

To used MON51 for debugging, you should change the MCU architecture
from Havard to von Neumann. An external SRAM is used to store user's
program. I used it for debugging several years. It could get rid of using
the ICE to debug if you can afford the cost for the ICE.

For operation theory
See https://www.keil.com/support/man/docs/mon51/mon51_theory.htm

For download precedure
See "http://www.keil.com/support/man/docs/mon51/mon51_debug.htm"

MON51 is burned into on-chip flash or EEPROM and
is located from program address 0x0000.
So after power-on, MON51 will take control and try to
communicate with uV3 via RS-232.
(The UART on your 51 MCU is used by MON51.)
MON51 is also responsible for downloading your program to SRAM.
Your program for debugging is actually different from
the final code to release, since it can not be mapped into program
address 0x0000.
Do worry about this.
After all bugs killed, a few simple steps and just re-compile the program
will correct this.
 

movc command

thx a lot....for teaching me...
and 1 more thing, when press debuging at keil uversion, there say lost connection, cant connect to my board, i build the board my self,

i wan ask that, wat will cause my connection fail?
first is boundrate, and? ...

the rs232 hav 9 pin, we just need 3 pin enough right? TXD, RXD Gnd to connect to max232, other pin can ignore it ?
 

what does 35 whr mean

Yes, only TXD/RXD and GND needed for connection.
And the baud rate on both side (MCU and PC) should be the same.
For this reason, the clock source of MCU should be accurate enough.
Moreover, an RS-232 driver (like Maxim MAX232) is needed
The connection should be like this

MCU <---[RS-232 driver ]---> PC
RXD <---[.....................]---> TXD
TXD <---[.....................]---> RXD

Good Luck!
 

what is mean by whr

can ask u 1 more question?
u hav any idea, how to test the external ram?
i wan to test, to see whether my wire connection correct or wrong.
keil uversion can test?
after connect all, when me press debug, the mon51 keep say cant find memory at address 5056h
 

store code #16:

MOVC command will try to access the program ROM space.

In this case (MON51), the results of MOVC and MOVX should be the same
for the external RAM space, which is used for CODE and XDATA
simutaneoulsy now.

I suggest that you check /EA, /PSEN, ALE first.
(I made some mistakes in connecting these 3 signals
when I used the MON51 for the first time)
And then address/data bus if necessary.
 

Dear waterman,

Please allow me to join this topic.

I also have interested to learn how to use MON51. Currently i have wire up 2 32k SRAM on my board. I have abit confuse about the memory mapping.

I have create the MON51.hex using this command install 8 7F 0
If we define the xdatastart is 7F which mean MON51 will download our 'user' xdata start at 0x8000 until 0xFFFF, am i rite?
If define xcodestart is 0 mean the 'user' code will start at 0x0000 address SRAM, rite?

I have using keil sample Hello to do testing. If using install 8 FF 0 command MON51 work for MAP1, MAP2, and MAP3. What does it mean?

How to do practical so that can more understand how to use MON51.

Thank you.
 

hi, HELp
ur mon51 can work?
can download user code to board and run ?

can i ask, the requirement say that the mon51.hex need 4k-5k space
but after me generate the hex file in window, and press properties, that file is 11k, any1 know why? i only hav 8k flash memory for store mon51.hex
 

Hi kyle86,

I'm not sure can work not. Me also first time using MON51.

As mr.Waterman told the keil will download the user code to SRAM. So, you need not worry about that.

I have generated MON51.hex you can try and use it. Hope it work for you too.

Me also confuse how to do the memory mapping, hope someone can help us.

Rgds,
Help
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top