Hi Mus.me,
I think you should turn on global interrupt enable (GIE) bit.
Isn't that the master switch for all interrupts?Code:INTCON.7 = 1
BR,
-Gusse-
Hi Mus.me,
I think you should turn on global interrupt enable (GIE) bit.
Isn't that the master switch for all interrupts?Code:INTCON.7 = 1
BR,
-Gusse-
Mus.me, HSERIN is an asynchronous serial function. You cannot awake from sleep the mcu with HSERIN you should search another way. If you have PortB.0 available then you could use the interrupt on portB.0, for instance you could connect RTS pin to portB.0 (via a level translator) and before TX you pull high RTS to wakeup the pic.
Al.
All progress began with an idea
Actually on a 16F628, the USART can wake the PIC from sleep... I'd handle it outside of HSERIN though (you wouldn't be able to put the PIC into SLEEP initially from inside HERSIN anyway).
Hi, Mus
I played a bit with the HSERIN Command ... but Wake up only works in Synchronous mode ( roughly consider USART is disabled when sleep mode ... as the system clock is ... down !)
sooo ...
last option is to use a comparator interrupt: tie the comparator input to RX Pin ( seems Porta is unused ...) and use the comparator interrupt for wake up ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks