Una vez que grabo el micro, cuando lo pongo en la placa, funciona el programa pero muuuuuuy lento...
Por ejemplo prendo un led con B5 en 1, pongo delay_ms(100) y lugo apago el led... pero en lugar de 100 ms, demora una eternidad, lo hace LEEEEEEEENTO... COMO CADA 10 SEGUNDOS hace el cambio...
aqui el codigo
#include <16F628A.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES BROWNOUT //Reset when brownout detected
#FUSES MCLR //Master Clear pin enabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD //No EE protection
#use delay(clock=4000000)
#use rs232(baud=300,parity=N,xmit=PIN_B2,rcv=PIN_B1,bits=8)
void main()
{
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
setup_oscillator(False);
set_tris_a (00000000);
set_tris_B (00000000);
// TODO: USER CODE!!
while (1){
delay_ms(100);
output_high(pin_B5);
delay_ms(100);
output_low(pin_B5);
}
}