I have the trouble with "Keil uVision2 V2.37". Namely, the program which is working properly on the AT89C55WD bahaves very strange on the AT89C4051 platform. The program does not use any special features of AT89C55WD like T2, watchdog, etc. I'm using only peripherials accesible on both ones and header files in accordance with the type of uController. Code is less than 4kB and there is used less than 128 B of DATA memory. There is no never ending loops but AT89C4051 hungs up or works not correctly. I thought that after testing program using AT89C55WD I can load the same one into AT89C4051 code memory and it must work the same way. What can be wrong? Thank you in advance for the help /Robert Zdunski
have you checked reset polarity current drive capability of the port pins !EA tied correctly Erik
Yes, all is right as I think. I have checked it all. /Robert
as I think That very stetement has killed more designs than any other. Erik
There was a very similar question to this some time back - so try some searching. IIRC, it was something like the 2 variants shared some SFRs with the same names and functions but at different addresses in the different parts? Or someting like that. Are you sure that you have completely rebuilt all your code, and changed all your headers to match the correct variant? Do you need to adjust Project options (especially memory options), or startup.a51?
The problem has been solved. According to Mr Reinhard Keil advises I've removed "using" statement from interrupt service functions that are used in the program. Besides I moved some variables to other DATA memory area using _at_. Thanks to that I've got more space for the stack, which was working out of range as it turned out. Thank you for the help /Robert Zdunski