sleep mode question

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


how do i put the 16f84 into sleep mode and can I wake it up with either an
interupt on the RB0 Pin and/or an input on the RA0 pin?


thanks in advance for any advice



Re: sleep mode question


Quoted text here. Click to load it

SLEEP


Yes on the RB0 INT, but not on RA0.

Quoted text here. Click to load it

Carefully read the datasheet on this stuff, it really matters.  You have to
have INTE set to have it wake from SLEEP on the RB0 interrupt.  GIE will
determine what happens after wakeup (next instruction or branch to ISR).
The instruction following sleep gets executed before anything else.  READ
THE DATASHEET.  :-)

BTW, you should be using something like a 16F88.  It's basically pin
compatible, much cheaper and has way more features.



Re: sleep mode question


Thanks for the help


Quoted text here. Click to load it



Re: sleep mode question


Quoted text here. Click to load it

You can also use the other pins on PORTB to wake up from SLEEP by using the
"interrupt on change" feature.  In fact, that's the only time you can rely
on the IOC functionality to not miss any input pin state changes.



Re: sleep mode question



"Hayley"  wrote
Quoted text here. Click to load it

Microchip has several application notes with code examples to help you
get started.

AN528 Implementing Wake-Up on Keystroke
http://ww1.microchip.com/downloads/en/AppNotes/00528d.pdf

AN879 Using the Microchip Ultra Low-power Wake-up Module
http://ww1.microchip.com/downloads/en/AppNotes/00879C.pdf

This is for the PIC16F684, but you can use a similar approach with any PIC
supporting wake-up on pin change.


Regards,

-Bruce
http://www.rentron.com




Site Timeline