使用RS232唤醒PIC16F1825从睡眠状态

时间:2012-07-21 18:39:06

标签: serial-port microcontroller pic wakeup

是否可以使用RS232将Microchip PIC16F1825从休眠状态唤醒而不查看字符?

由于其中一个允许的RX引脚支持更改中断,我认为这可能是可能的。

有没有人成功实现了这个?

1 个答案:

答案 0 :(得分:3)

当然!

来自数据表PIC16(L)F1825/1829

9.1从睡眠中醒来

The device can wake-up from Sleep through one of the following events:
1. External Reset input on MCLR pin, if enabled
2. BOR Reset, if enabled
3. POR Reset
4. Watchdog Timer, if enabled
5. Any external interrupt
6. Interrupts by peripherals capable of running 
   during Sleep (see individual peripheral for more information)

所以你可以使用:

1)外部中断INTERRUPT-ON-CHANGE,如果将RX引脚连接到其他一个配置为电平变化中断的引脚。

2)外设中断RCIF:USART接收中断标志位。当接收器缓冲区已满(接收到一个UART字)时,一个中断正在等待,你的CPU应该被唤醒。