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 CCS Technical Support

setup_wdt on 12F683

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



Joined: 20 Oct 2005
Posts: 44

View user's profile Send private message

setup_wdt on 12F683
PostPosted: Thu Oct 27, 2005 10:12 am     Reply with quote

Probably another dumb question.... I am trying to setup the WDT to wake from sleep. I was going to use the WDT_2304MS, but get this error:

*** Error 12 "D:\Documents and Settings\amcfall\Desktop\ADR PIC\sleep.c" Line 14(11,21): Undefined identifier WDT_2304MS

Code:
Code:


#include <12F683.h>
#use delay(clock=2000000, restart_wdt)
#FUSES WDT, INTRC_IO, NOCPD, NOPROTECT, MCLR, NOPUT, BROWNOUT, IESO, FCMEN
#define downbutton PIN_A4
#define upbutton PIN_A5
#ZERO_RAM
#USE FAST_IO(A)


int main(){

    setup_adc_ports(0);
    setup_adc(ADC_OFF);
   setup_WDT(WDT_2304MS);
    setup_timer_1(T1_DISABLED);
    setup_comparator(NC_NC_NC_NC);
    setup_vref(FALSE);
    set_tris_a(0b110000); //all outputs except A4 and A5
    port_a_pullups(0b110000); //pullups on A4 and A5
    setup_timer_2(T2_DIV_BY_16,155,1);//200.32Hz
    // minimun duty is 44 (7%), max is 624 (100%)
    setup_ccp1(CCP_PWM);
    set_pwm1_duty(100);


while(1)
   {}


}




Compiler is v3.236. Thanks!
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Thu Oct 27, 2005 10:27 am     Reply with quote

"WDT_2304MS" isn't a valid argument for setup_WDT().

Look in 12F683.h for the valid args.
amcfall



Joined: 20 Oct 2005
Posts: 44

View user's profile Send private message

PostPosted: Thu Oct 27, 2005 10:28 am     Reply with quote

Thanks. Embarassed
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