1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| #include "C:\Documents and Settings\ph\Bureau\test int1.h"
void main()
{
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_OFF);
setup_spi(FALSE);
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);// This device COMP currently not supported by the PICWizard
setup_oscillator(False);
enable_interrupts(INT_RB);
enable_interrupts(GLOBAL);
while(1){
output_bit(pin_c2,1);
delay_ms(1000);
output_bit(pin_c2,0);
delay_ms(1000);
}
}
#int_rb
RB_isr()
{
output_bit(pin_c3,1);
delay_ms(1000);
output_bit(pin_c3,0);
delay_ms(1000);
} |