From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-25-2010 12:59 AM - edited 09-25-2010 01:02 AM
I am trying to write a code in C language for 8051 MCU.
But when I include the reg51.h file, I am getting error regarding the reg51.h file.
So what should I do?
I have attached a snap shot of this error.
09-26-2010 09:15 PM
put the return word void inside the parenthesis. Some compilers expect to see the value in the main loop construct, but assumed void for all remaining functions when not defined.
11-23-2011 01:59 PM
Assalamualaikum Peace be on you
Hi there guys i am stuck in a problem
My code is
#include <reg51.h>
sbit x = P0^1;
void main()
{
while(1){
x=1;
}
}
It generated an error output that can not find reg51.h. No such file or directory.
You can email me as well
12-19-2011 01:47 PM
Hi,
Multisim uses the Hi-Tech complier from Microchip, it doesn't use a reg51.h header, use <htc.h> instead. Reg51 is use is the Keil compiler.
02-16-2018 11:31 PM
Hi there
In my opinion this problem might have caused by using the macro programming language (MPL) in your assembly modules.
Try including a C header file in an assembly program, where you use the C style include statement. For example:
#include "reg52.h";
While using C-style include statement, the header file is located and included.
The Keil A51 Assembler automatically includes the header file reg51.h. To stop the assembler from automaticlly including this file, go to:
Project -> 'Options for Target' -> the 'A51' tab -> and uncheck 'Define 8051 SFR Names'.
Hope this helps.