Page 94 of 346 Start Back Next End ZBasic System Library 82 ZBasic Microcontrollers CPUSleep Type Subroutine Invocation CPUSleep() CPUSleep(mode) Parameter Method Type Description mode ByVal Byte The sleep mode to use. Discussion This routine puts the processor into a special sleep mode in which activity and power consumption are reduced. The characteristics of the sleep mode are controlled by certain bits in one or more CPU registers (see the tables below). For more information about the modes, consult the Atmel documentation for the ATtiny, ATmega or ATxmega processor being used. If the optional mode parameter (not supported for VM devices) is not given, the existing sleep mode bit values will be used. Registers Containing the Sleep Mode Bits for ZX Devices ZX Device Register ZX-24, ZX-40, ZX-44, ZX-24e, ZX-128e, ZX-128ne Register.MCUCR ZX-24a, ZX-24p, ZX-24n, ZX-24r, ZX-24s, ZX-24ae, ZX-24ne, ZX-24pe, ZX- 24ru, ZX-24su Register.SMCR ZX-40a, ZX-40p, ZX-40n, ZX-40r, ZX-40s, ZX-40t Register.SMCR ZX-44a, ZX-44p, ZX-44n, ZX-44r, ZX-44s, ZX-44t Register.SMCR ZX-328n, ZX-328l, ZX-32n, ZX-32l, ZX-328nu Register.SMCR ZX-1281, ZX-1281n, ZX-1280, ZX-1280n, ZX-1281e, ZX-1281ne Register.SMCR ZX-24x, ZX-32a4, ZX-128a1, ZX-24xu Register.SLEEP_CTRL Registers Containing the Sleep Mode Bits for Generic Target Devices Target Device Register tiny24, tiny24A, tiny44, tiny44A, tiny84, tiny2313, tiny2313A, tiny4313 Register.MCUCR tiny48, tiny88, tiny87, tiny167 Register.SMCR mega48, mega48A, mega48P, mega48PA, mega88, mega88A, mega88P, mega88PA, mega168, mega168A, mega168P, mega168PA, mega328, mega328P Register.SMCR mega8515, mega161, mega162 Register.MCUCR Register.MCUCSR Register.EMCUCR mega8, mega8A, mega16, mega16A, mega32, mega32A, mega64, mega64A, mega128, mega128A, mega163, mega323, mega8535 Register.MCUCR mega164A, mega164P, mega164PA, mega324P, mega324PA, mega644, mega644A, mega644P, mega644PA, mega1284P, mega1281, mega2561, mega640, mega1280, mega2560 Register.SMCR mega165, mega165A, mega165P, mega165PA, mega325, mega325P, mega645, mega645A, mega645P, mega169, mega169A, mega169P, mega169PA, mega329, mega329P, mega329PA, mega649, mega649A, mega649P, mega3250, mega3250P, mega6450, mega6450A, mega6450P, mega3290, mega3290P, mega6490, mega6490A, mega6490P, mega16U4, mega32U4, mega8U2, mega16U2, mega32U2, AT90USB82, AT90USB162, AT90CAN32, AT90CAN64, AT90CAN128, AT90USB646, AT90USB647, AT90USB1286, AT90USB1287 Register.SMCR all ATxmega Register.SLEEP_CTRL