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

Keil uV3 support for p89C51RD2FN microcontroller.

Hello!
Does Keil uV3 support for p89C51RD2xx microcontrollers? I am unable to see the header file in include folder. Should the header file look like this?
#include<p89C51xD2.H>
Where can i download this header file from?

Parents Reply Children
  • Dear Sir Robert Rostohar!
    Your answer clarified my ambiguity. I have one more query.
    I compiled my code using "#include<REG51xD2.H> for AT89C51RD2. Then i loaded the hex file in Phillips p89C51RD2 controller instead of Atmel AT89C51RD2. The code runs well but sometimes the controller got hang up. Can this be due to the insertion of wrong header file?

  • Both devices have the majority of registers the same (name and address). Atmel has also a few more registers due to more peripherals.

    It could be that even using the Atmel header would generate the same code (if you have used only the registers which exist in both devices).

    Anyway you should use the right header and check if it still hangs (the reason is probably somewhere else).

  • It is significantly less likely a header file used by thousands is causing a hang up than it is what you are doing in your code. A common "hangup" bug is infinite loops (which are surprising easy to implement without thinking about what you are doing). Look at every piece of code that has a loop (for while do-while etc). This is especially important for any while(!<condition>); loops. Be sure to have a loop timeout on any such code (or you will have problems with hangups). LCD's or any device you have a busy flag you must wait for need a time out.

    Stephen