Implement interrupt and sleep mode