Hi, My code doesn't work if I compile it with ROM(HUGE) mode, but works fine if compile it under ROM(LARGE) mode. Any comments would be appreciated. Thank you! Processor: p87c51MB2 CX51: V7.04d LX51: V3.54
What do you mean by "doesn't work"?? Does it do anything at all? Does it build successfully?
Hi, There are no problems to create project, but the code won't start on hardware. If the code is created by ROM(Large), it runs well. It looks like program counter is not right, because all my consts are stored on high code address space and I don't have any problem to access this data. Is there any way to inform compiler to use 3 bytes for program counter? Thank you!
Hi, I found the following information from this website: "The ECRM mode is only available is some devices. For example, the Philips P8xC51MA/MB/MC and the P89C669 do not offer this mode. Check the device datasheet before setting the ECRM mode. " I know ECRM should be set to "1" if we want CALL/RET save and restore the full 3-byte program counter. To my understanding base on the information shown above, if we use p8xc51MA/MB/MC, we can't have excutable code above 64k since these chip doesn't support ECRM mode, is that right? Thank you! Xiao
You are intermixing ECRM with EIFM. EIFM is used to store 3-bytes PC on interrupts. ECALL will always save 3-bytes PC when executing. ECRM is Extended CALL Return Mode. It is available on SmartMX (SmartCard device) only.
Hi, Thank you very much! It is great help! I changed bit ECRM from "1" to "0" in START_MX.A51 and created my project. It started running from my emulator(NOHAU. Code mapped in emulator and XDATA mapped on target). But it still doesn't run if I load code to target. If code is less than 64k, I can run code from target without any problems. I made EAM,ESMM and EIFM all "1". Is there anything I should do for code beyond 64k? Thank you!
P89c669 does not support ecrm,but how can I to use or not use ecrm in keil
Such problems often stem from some bit in some SFR not being (re)set in startup.a51. I have not looked at the 669 for a long time but somwhere in the old DNA computer is floating around something about a bit that need be set to switch to 24 bit mode. Erik
such as EAM1:0=00 After reset, bits EAM1:0=00 (default value) place MX2 part in fully pin-to-pin 80C51 binary compatible micro = 16 bit address Erik