Line 6... |
Line 6... |
6 |
|
6 |
|
7 |
#include "lcd.c" |
7 |
#include "lcd.c" |
8 |
|
8 |
|
9 |
void main() |
9 |
void main() |
10 |
{ |
10 |
{ |
- |
|
11 |
char odp[10]; |
11 |
|
12 |
|
12 |
setup_adc_ports(NO_ANALOGS); |
13 |
setup_adc_ports(NO_ANALOGS); |
13 |
setup_adc(ADC_OFF); |
14 |
setup_adc(ADC_OFF); |
14 |
setup_psp(PSP_DISABLED); |
15 |
setup_psp(PSP_DISABLED); |
15 |
setup_spi(FALSE); |
16 |
setup_spi(FALSE); |
16 |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
17 |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
17 |
setup_timer_1(T1_DISABLED); |
18 |
setup_timer_1(T1_DISABLED); |
18 |
setup_timer_2(T2_DISABLED,0,1); |
19 |
setup_timer_2(T2_DISABLED,0,1); |
19 |
|
20 |
|
20 |
char odp[255]; |
- |
|
21 |
lcd_init(); |
21 |
lcd_init(); |
22 |
|
22 |
|
23 |
|
23 |
|
24 |
while(true) |
24 |
while(true) |
25 |
{ |
25 |
{ |
26 |
output_low(PIN_A4); |
26 |
output_low(PIN_A4); |
27 |
delay_ms(1500); |
27 |
delay_ms(1500); |
28 |
output_high(PIN_A4); |
28 |
output_high(PIN_A4); |
29 |
|
29 |
|
30 |
printf("AT\r"); |
30 |
printf("AT\r"); |
- |
|
31 |
odp[0]=getc(); |
31 |
odp=getc(); |
32 |
odp[1]=getc(); |
- |
|
33 |
odp[2]=0; |
32 |
|
34 |
|
33 |
printf(lcd_putc,"\f%c",odp); |
35 |
printf(lcd_putc,"ble:%s\n\r",odp); |
34 |
|
36 |
|
35 |
} |
37 |
} |
36 |
} |
38 |
} |