Rev Author Line No. Line
229 toman 1 #include "C:\RS\Prog\off\off.h"
2  
3 #int_EXT
4 void EXT_isr(void)
5 {
6 printf("A");
7 }
8  
9 void main()
10 {
11  
12 port_b_pullups(TRUE);
13 setup_adc_ports(NO_ANALOGS);
14 setup_adc(ADC_OFF);
15 setup_spi(SPI_SS_DISABLED);
16 setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
17 setup_timer_1(T1_DISABLED);
18 setup_timer_2(T2_DISABLED,0,1);
19 setup_comparator(NC_NC_NC_NC);
20 setup_vref(FALSE);
21  
22 enable_interrupts(INT_EXT);
23 enable_interrupts(GLOBAL);
24  
25 while(!input(PIN_B0))
26 {
27 output_high(PIN_A0);
28 delay_ms(500);
29 output_low(PIN_A0);
30 delay_ms(500);
31 }
32  
33 }