> Hi Jim > thanks replying to my querie > >> In the GIMSK data page it says "activity on the pin will cause >> interupt even if INT0 is configured as output". > > I am obviously struggling with semantics. > I rearanged the code and realized that if GIMSK set to INTO, the result is > equal to > GIMSK set to PCIE with PCMSK set to PB2 (all ports output). > In both instances we have internal interupts reacting on PB2. > If all set as output and you say switch to output port is a no no, would > my external interupt to wake from sleep have to go to the reset pin. > Mmmhh. > If all in sleep mode, then a pin change should wake from sleep. so GIMSK > set as INTO all PORTS as outputs, switch on PB2 seems to work fine to wake > from sleep. > is this the correct way? > Thanks again > guido > Guido - I am really puzzled why you would bother with sleep if there are LEDs on. Normally, sleep is used only for power saving. With several LEDs on, the amount you save is very small. If it is just a matter of waiting for something to happen, then just let the main loop "spin", until that thing happens. Jim
Message
Re: [AVR-Chat] Interupt Ttiny
2009-04-20 by wagnerj@proaxis.com
Attachments
- No local attachments were found for this message.