i'm trying to blink a led but i have no results on isis... i don't know if it's me or...
#include <12F675.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES NOCPD //No EE protection
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOMCLR //Master Clear pin used for I/O
#FUSES PUT //Power Up Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES BANDGAP_HIGH
#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_A3,rcv=PIN_A2,bits=8)
// les pins du 12f675 sont implementés de la même façon que porta ...
#define GP0 PIN_A0
#define GP1 PIN_A1
#define GP2 PIN_A2
#define GP3 PIN_A3
#define GP4 PIN_A4
#define GP5 PIN_A5
#INT_RA
#use fast_io(A)
#define INTS_PER_SECOND 32768 // 1 per sec.
int count=0;
byte x;
byte toggle=0;
byte seconds=0;
byte minutes=0;
byte int_count;
byte one_sec_fl;
#int_timer1 // This function is called every time
void timer1_isr()
{ // (timer1) overflows (255->0).
++count;
one_sec_fl = 1;
set_timer1(0x7fff);
}
void main()
{
int_count=INTS_PER_SECOND;
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_timer_1(T1_INTERNAL|T1_DIV_BY_8);
setup_comparator(NC_NC);
setup_vref(FALSE);
enable_interrupts(INT_TIMER1); //setup interupts
enable_interrupts(GLOBAL);
output_high (GP0);
while(true)
{
if (one_sec_fl)
{ x^=0x01;
if (!x)
output_low (GP0);
else
output_high (GP0);
seconds=0;
one_sec_fl = 0;
}
}
}