What is the maximum number of source files(*.c, *.h) that can be used to compile C51 software.
I have 27 source files (*.c, *.h) all together. But when I download the firmware to the uC it won't work. But when I remove one set (Remove one c and h file) the uC works.
I get this problem with the Keil IDE and another 3rd party IDE.
I am within the uC memory limits.
Or could this problem relate to something else?
"What is the maximum number of source files(*.c, *.h) that can be used to compile C51 software."
The compiler only ever sees a single source file at a time - so the question doesn't arise just for compiling
Other compiler limits (including include file nesting) are listed here: http://www.keil.com/support/man/docs/c51/c51_xd.htm
If there were a limit, it would be due to the Linker.
"I have 27 source files (*.c, *.h) all together."
That really isn't a large number - so highly unlikely to be the problem.
"But when I download the firmware to the uC it won't work."
That'll be a bug (or bugs) in your code - not a limitation of the tools.
"But when I remove one set (Remove one c and h file) the uC works."
The uC always works - it's your code that is not operating as you wanted.
You need to examine those files carefully, and find the error(s) in them. Have you tried running this in the simulator?
"I get this problem with the Keil IDE and another 3rd party IDE."
Which tends to confirm that the problem is in the code rather than the tools, doesn't it?
"I am within the uC memory limits."
How have you confirmed this - both CODE and all the data spaces?
... could this problem relate to something else?
Yes, almost certainly.