We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
include<reg51.h>
include<stdio.h>
void main(void)
{
unsigned innt x;
p1=0x00;
for(x=0;x<5000;x++);
p1=0xff;
for(x=0;x<5000;x++)
compiler shows error that p1 is undefined identifier
how to fix this
Westonsupermare Pier said:The compiler is case sensitive for defines, functions and variables
also for language keywords.
This is basic 'C' language stuff - nothing specific to Keil or ARM or 8051
Here are some 'C' learning & reference materials - including a free online textbook:
http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
If you're new to the 'C' language (which certainly seems to be the case), it is probably better to learn the language on a PC or similar, away from the added complications & restrictions of embedded microcontrollers - especially the 8051.
Once you have a good grip of the language, then move on to applying it to microcontrollers.
Broeker said:Learn the use of your keyboard
That seems to be a bit of a challenge: https://community.arm.com/developer/tools-software/tools/f/keil-forum/46120/how-to-insetr-put-curly-bracket-in-c-while-writing-a-program-i-m-new-cant-find-curly-brackets-to-insert/164173#164173
The compiler is case sensitive for defines, functions and variables.
Use find-in-files to search the project files for symbols, can also search in case insensitive mode.
Learn the use of your keyboard. Particularly the shift key.