This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

header file?????????/

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

Parents
  • 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
    
    Then, just put:
        SLEEP;
    
    in your code whereever you want the processor to go to sleep.

Reply
  • 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
    
    Then, just put:
        SLEEP;
    
    in your code whereever you want the processor to go to sleep.

Children