amcfall
Joined: 20 Oct 2005 Posts: 44
|
setup_wdt on 12F683 |
Posted: Thu Oct 27, 2005 10:12 am |
|
|
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! |
|