CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

PIC 16F1825 unable wake up from sleep via Int_RDA

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
zmtek



Joined: 19 Jan 2013
Posts: 5

View user's profile Send private message

PIC 16F1825 unable wake up from sleep via Int_RDA
PostPosted: Sat Jan 19, 2013 1:38 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jan 19, 2013 3:45 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 18, 2013 11:49 am     Reply with quote

Works perfect, thanks!!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group