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.

code in c not working but in asm work properly...

Status
Not open for further replies.
Are you adding the Startup Code to the project when asked?

Try starting a new project, then copying the main.c into the new project, adding the file to the source code group.


BigDog
 

still it's not working on hardware. and Disassembly remain unchanged. (jump to same address 0x07FF)
 

different device means? i select at89c2051.
 

i use will-prog or G540 for burn the program.
flesh magic shows 34 byte, flash range from 0x000000 to 0x000003. flash used 4 byte.
 
Last edited:

I got the problem. I think it is in my compiler. Because in my Disassembly code it jump to 07FF address. which is the last location of 89c2051. That's why when i use 89s52 same code works properly. and when i write code in assembly then it not jump to out of range, That's why my ASM code also works properly. and when compiler and code remain same in "c" but use different system then it jump to 0003 address. so when i use another system then 89c2051 also works properly.
now, my question is that when I am using same coding, method and compiler then why it generate wrong hex in my system only?
 

how will it effect? I am using same software in two different system, it works in one, properly. although i do not purchase it.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top