View previous topic :: View next topic |
Author |
Message |
zmtek
Joined: 19 Jan 2013 Posts: 5
|
PIC 16F1825 unable wake up from sleep via Int_RDA |
Posted: Sat Jan 19, 2013 1:38 pm |
|
|
Hi, i am unable to make PIC16F1825 to wake up from sleep using int_rda
after ported working code from PIC16F688.
Both chips have EUSART capable to wake up the device.
16f688 has following line in 16f688.h and everything works fine
#define UART_WAKEUP_ON_RDA 10
but 16f1825.h doesn't have it.
Can somebody help me with this?
Best regards |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sat Jan 19, 2013 3:45 pm |
|
|
You didn't post your compiler version, but the UART_WAKEUP_ON_RDA is not defined in the current v4.140 either. I checked the chip configuration in the CCS database (chipedit.exe) to be wrong and reported the error to CCS.
To bad, but for CCS these kind of errors are quiet common in the newer chips.
Same bug is present in the related PIC16F1829.
As a workaround you can set the WUE bit yourself: Code: | #include <16F1825.h>
#fuses HS, NOWDT
#device *=16
#use delay (clock=10MHz)
#use rs232(baud=9600, UART1, ERRORS)
#bit WUE_BIT=GETENV("BIT:WUE")
void main()
{
// Alternative for: setup_uart( UART_WAKEUP_ON_RDA );
// because of a bug in v4.140
WUE_BIT = 1;
while (1) ;
} |
|
|
|
zmtek
Joined: 19 Jan 2013 Posts: 5
|
|
Posted: Mon Feb 18, 2013 11:49 am |
|
|
Works perfect, thanks!!! |
|
|
|