Line 1... |
Line 1... |
1 |
#include "C:\RS\Prog\abcda\abcda.h" |
1 |
#include "abcda.h" |
2 |
|
2 |
|
3 |
|
3 |
|
4 |
void main() |
4 |
void main() |
5 |
{ |
5 |
{ |
6 |
|
6 |
|
7 |
int cas; |
7 |
int cas; |
8 |
|
8 |
|
9 |
const int8 A[7]={0b00000001,0b11110110,0b11110110,0b11110110,0b00000001,0b11111111,0b11111111}; |
9 |
const int8 pis[26,7]={{0b00000001,0b11110110,0b11110110,0b11110110,0b00000001,0b11111111,0b11111111}, |
10 |
const int8 B[7]={0b00000000,0b01110110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111}; |
10 |
const int8 B[7]={0b00000000,0b01110110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111}; |
11 |
const int8 C[7]={0b10000001,0b01111110,0b01111110,0b01111110,0b10111101,0b11111111,0b11111111}; |
11 |
const int8 C[7]={0b10000001,0b01111110,0b01111110,0b01111110,0b10111101,0b11111111,0b11111111}; |
12 |
const int8 D[7]={0b00000000,0b01111110,0b01111110,0b01111110,0b10000001,0b11111111,0b11111111}; |
12 |
const int8 D[7]={0b00000000,0b01111110,0b01111110,0b01111110,0b10000001,0b11111111,0b11111111}; |
13 |
const int8 E[7]={0b00000000,0b01110110,0b01110110,0b01111110,0b01111110,0b11111111,0b11111111}; |
13 |
const int8 E[7]={0b00000000,0b01110110,0b01110110,0b01111110,0b01111110,0b11111111,0b11111111}; |
14 |
const int8 F[7]={0b00000000,0b11110110,0b11110110,0b11111110,0b11111110,0b11111111,0b11111111}; |
14 |
const int8 F[7]={0b00000000,0b11110110,0b11110110,0b11111110,0b11111110,0b11111111,0b11111111}; |
Line 41... |
Line 41... |
41 |
const int8 six [7]={0b10000001,0b01110110,0b01110110,0b01110110,0b10001101,0b11111111,0b11111111}; |
41 |
const int8 six [7]={0b10000001,0b01110110,0b01110110,0b01110110,0b10001101,0b11111111,0b11111111}; |
42 |
const int8 seven[7]={0b11111110,0b11111110,0b00001110,0b11110110,0b11111000,0b11111111,0b11111111}; |
42 |
const int8 seven[7]={0b11111110,0b11111110,0b00001110,0b11110110,0b11111000,0b11111111,0b11111111}; |
43 |
const int8 eight[7]={0b10001001,0b01110110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111}; |
43 |
const int8 eight[7]={0b10001001,0b01110110,0b01110110,0b01110110,0b10001001,0b11111111,0b11111111}; |
44 |
const int8 nine [7]={0b10111001,0b01110110,0b01110110,0b01110110,0b10000001,0b11111111,0b11111111}; |
44 |
const int8 nine [7]={0b10111001,0b01110110,0b01110110,0b01110110,0b10000001,0b11111111,0b11111111}; |
45 |
|
45 |
|
- |
|
46 |
const int8 napis[2,8]={{1,1,2,2,4,5,6,7},{1,1,2,2,4,5,6,7}}; |
- |
|
47 |
|
46 |
setup_adc_ports(NO_ANALOGS); |
48 |
setup_adc_ports(NO_ANALOGS); |
47 |
setup_adc(ADC_OFF); |
49 |
setup_adc(ADC_OFF); |
48 |
setup_psp(PSP_DISABLED); |
50 |
setup_psp(PSP_DISABLED); |
49 |
setup_spi(SPI_SS_DISABLED); |
51 |
setup_spi(SPI_SS_DISABLED); |
50 |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
52 |
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
Line 53... |
Line 55... |
53 |
setup_comparator(NC_NC_NC_NC); |
55 |
setup_comparator(NC_NC_NC_NC); |
54 |
setup_vref(FALSE); |
56 |
setup_vref(FALSE); |
55 |
|
57 |
|
56 |
while(TRUE) |
58 |
while(TRUE) |
57 |
{ |
59 |
{ |
58 |
for(cas=0;cas<7;cas++) |
60 |
for(i=0;i<=2;i++) |
- |
|
61 |
for(j=0;j<=100;j++) |
59 |
{ |
62 |
{ |
60 |
output_B(A[cas]); |
- |
|
61 |
delay_ms(1); |
- |
|
62 |
} |
- |
|
63 |
for(cas=0;cas<7;cas++) |
63 |
for(n=0;n<=8;n++) |
64 |
{ |
- |
|
65 |
output_B(B[cas]); |
- |
|
66 |
delay_ms(1); |
- |
|
67 |
} |
- |
|
68 |
for(cas=0;cas<7;cas++) |
- |
|
69 |
{ |
64 |
{ |
70 |
output_B(C[cas]); |
- |
|
71 |
delay_ms(1); |
- |
|
72 |
} |
- |
|
73 |
for(cas=0;cas<7;cas++) |
65 |
for(cas=0;cas<5;cas++) |
74 |
{ |
66 |
{ |
75 |
output_B(D[cas]); |
67 |
output_B(pis[napis[i,n],cas]); |
76 |
delay_ms(1); |
68 |
delay_ms(1); |
77 |
} |
69 |
} |
78 |
for(cas=0;cas<7;cas++) |
- |
|
79 |
{ |
- |
|
80 |
output_B(A[cas]); |
- |
|
81 |
delay_ms(1); |
70 |
delay_ms(2); |
82 |
} |
71 |
} |
83 |
delay_ms(142); |
72 |
delay_ms(142); |
84 |
} |
73 |
} |
- |
|
74 |
|
85 |
} |
75 |
} |