This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Are the .hex files generated by uvision compatible to Atmel 89C52 chip?

I have written my C code using uvision and tested it on the MCB517AC evaluation board. It works perfectly. But, when I use the .hex file( being created by uvision ) and program it into 89C52, through a Dataio Universal programmer, it works no more. Please help!
The hardware setup for my 89C52 is a crystal 12 MHz connected to pin 18, 19. Pin 18 and 19 are also connected to a 27pF capacitor each, before being grounded. A push-down button and a 10uF capacitor is installed between 5V and the reset pin.

Parents
  • The Intel hex file is created by a utility which takes the output of the linker and converts it to the right format. In the '167 environment you must specify a hex output in the Output tab of the project settings. What you need is to have two forms of the project, 'PROJ' and 'PROJ_UV' with different settings in the project setup.

    The 'PROJ_UV' is used for debugging in uVision and must have enough RAM to hold the program/constants. This RAM is usually external except for the smallest of programs. It must be specified as ROM in the External Memory portion of the project setup.

    After debugging you switch outputs to the 'PROJ' form which uses RAM for RAM and flash for code/constants. Then rebuild the entire project. Look at the linker map file to see if all code and constants are at flash addresses in your target and that all variables are at RAM addresses.

    As I said, this is from '167 experience, not '51 but the tools are roughly the same.
    Best luck
    Scott

Reply
  • The Intel hex file is created by a utility which takes the output of the linker and converts it to the right format. In the '167 environment you must specify a hex output in the Output tab of the project settings. What you need is to have two forms of the project, 'PROJ' and 'PROJ_UV' with different settings in the project setup.

    The 'PROJ_UV' is used for debugging in uVision and must have enough RAM to hold the program/constants. This RAM is usually external except for the smallest of programs. It must be specified as ROM in the External Memory portion of the project setup.

    After debugging you switch outputs to the 'PROJ' form which uses RAM for RAM and flash for code/constants. Then rebuild the entire project. Look at the linker map file to see if all code and constants are at flash addresses in your target and that all variables are at RAM addresses.

    As I said, this is from '167 experience, not '51 but the tools are roughly the same.
    Best luck
    Scott

Children