hi everyone im new to keil............. ok i come across with this code on my research on keil coding and my c++ is very terrible so i want to understand the codding for better use some.... i hope u all can help me thank in advance.... the code are.........
1){ unsigned char l,m; l=val%10; m=(val/10)%10; sendChar(aray[m]); sendChar(aray[l]); sendChar(','); }
2){ if(RI==1) { sens_1=SBUF; switch(sens_1) { case('a'): relay1=1; break; case('b'): relay1=0;
} RI=0; }
3) this separate code
i)P1=(P1&0xf8)+sensor ii)EA=1; ES=1;
"im new to Keil"
Just new to Keil? Or also new to 'C' programming in general? And/or new to embedded microcontrollers in general? And/or new to the 8051 architecture in particular?
For a general introduction to 'C' programming, see: http://www.keil.com/books/genbooks.asp ">http://www.keil.com/events/ publications.gbdirect.co.uk/.../ www.eskimo.com/.../
For information on the 8051 architecture, see: http://www.keil.com/books/8051books.asp http://www.8052.com/tutorial www.8052.com/.../120112
For specific details of Keil's 8051 tools, see: http://www.keil.com/support/man_c51.htm
"my c++ is very terrible"
Keil's 8051 tools do not support C++ - only 'C' http://www.keil.com/product/isoansi.asp
If you are not already proficient with 'C', then it may be better to start by learning the language on a PC (or similar) before adding the complications of embedded microcontrollers in general and the 8051 architecture in particular!
Please read & follow the clearly-stated instructions on how to post source code - as highlighted in this picture: www.danlhenry.com/.../keil_code.png
Note that attention to detail, and careful study of documentation (datasheets, manuals, etc) are absolutely key to embedded development.
"i come across with this code"
Random source code lines out-of-context are meaningless - you need to at least give a link to that code!
thank for you information. i will read through the information first.