por luis.engcomp » 15 Mar 2011 10:56
consegui resolver aqui,
sem usar mclr como io
#FUSES NOWDT, INTRC_IO, PUT, MCLR, NOCPD, NOPROTECT
e configurando os timers nao utilizados como "off"..
void config_mcu()
{
#byte cmcon = 0x1f
cmcon=7;
setup_oscillator(OSC_4MHZ);
setup_timer_1(T1_DISABLED );
setup_timer_2(T2_DISABLED, 0xc0, 2);
setup_spi(SPI_SS_DISABLED);
setup_ccp1(CCP_OFF);
setup_timer_0 ( RTCC_INTERNAL | RTCC_DIV_256 );
set_timer0(100);
setup_adc_ports(AN0);
setup_adc(ADC_CLOCK_INTERNAL);
enable_interrupts ( GLOBAL );
enable_interrupts ( int_timer0 );
set_adc_channel( 0 );
set_tris_b (0);
set_tris_a (0xff);
// enable_interrupts ( INT_AD );
}