Hi I want to use the command sleep while programming 8051............ Doesany body know that in which header file it is definrd and if so plz send me that header file Regards uzma
"I want to use the command sleep" What is this "sleep" command?
"sleep" is not mentioned in the C51 Manual
If you mean that you wish to put the processor into the idle state, you can use a macro such as:
/***************************************************************************** * Put the processor to Sleep * (set the Idle Mode bit, IDL, in the Power Control register, PCON). *****************************************************************************/ #define SLEEP PCON |= 0x01
SLEEP;
I think you should read the Getting Started User's Guide that comes with the tools. This manual contains in Chapter 9 detailed information about chip-specific hardware including Power Reduction Modes. Reading just this Getting Started User's Guide would avoid many questions.
an even better source would be 'the bible' which is mandatory reading and reference for anyone that attempt to do manything with a '51 Erik here are the links to "the bible" Chapter 1 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_ARCH_1.pdf chapter 2 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_PROG_GUIDE_1.pdf chapter 3 http://www.semiconductors.philips.com/acrobat/various/80C51_FAM_HARDWARE_1.pdf
Thank u all for ur replies....... Infact i want to put a delay like out=1 delay(200) out=0 so how can this "delay" b implemented in C51 Uzma
Aaargh - SMS speak again... Is it so difficult to type "be" instead of "b"?
"so how can this "delay" b (sic) implemented in C51" Think about it: how might you implement such a delay in any programming language...?
There are several good threads from the past that discuss various ways to implement delays of various lengths. A search for "delay" would get you started.