,,,
̲Ͳ ²
ֲ Ͳ Ͳ
ʲ ˲Ͳ Ҕ
xxxx __
xxxx___________
________________._xxxxxxxx
( )
_________________________________
(, )
- __
: ³ ______ EV8031________________________________________
ϲ 21 2008 . xxxxx
2009
, ' |
- |
ʳ. . |
- | |||||||
|
||||||||||
4 | 2 | |||||||||
4 | 91 | |||||||||
|
||||||||||
4 | 8 | |||||||||
4 | 2 | |||||||||
4 | 48 | |||||||||
4 | 8 | |||||||||
4 | 7 | |||||||||
|
||||||||||
1 | 1 | |||||||||
, | 1 | 1 | ||||||||
1 | 1 | |||||||||
COM | 1 | 1 | ||||||||
1 | 1 | |||||||||
4 | 8 | |||||||||
XXXXX-23 03077.13 | ||||||||||
ϳ | ||||||||||
. | Xxxxx |
³ EV8031 ³ |
˳. | |||||||
. | Xxxxx | 1 | 1 | |||||||
ϲ
|
||||||||||
. . | Xxxxx | |||||||||
. | ||||||||||
ֲ Ͳ Ͳ ϲ
XX _____________
xxx_
_____________________________
(, )
- __
______________________________________________
1. ³ EV8031__________________
2. , . , , , , , , , .
3. EV8031 AVR ATMega8515, RS-232. , Electronic Workbench. Delphi.
4. (, )
( , , , )___
1 | . | 05.09.2008 | Xxxxx .. |
2 | . | 10.09.2008 | Xxxxx .. |
3 | . | 05.10.2008 | Xxxxx .. |
4 | 15.10.2008 | .. | |
5 | - | 11.11.2008 | .. |
6 | 07.01.2009 | Xxxxx .. | |
7 | 10.01.2009 | Xxxxx .. | |
8 | 01.02.2009 | Xxxxx .. | |
9 | ϳ | 07.02.2009 | Xxxxx .. |
Ϡ _______________________________.. Xxxxx___
( ) ( )
- _____________________________________
( ) ( )
² ̲ Dz EV8031
xxxxxxx03077-01
_2_
2009
Xxxxx.03077-13 12 01-1 | ||
Xxxxx.03077-13 12 01-1- | ||
Xxxxx.03077-13 34 01-1 | ||
Xxxxx.03077-13 34 01-1- | ||
Xxxxx.03077-13 13 01-1 | ||
Xxxxx.03077-13 13 01-1- |
̲
̲
1 ϲ
2
3
3.1
3.2
3.3
3.4
3.5
3.6
3.7
4 ί ֲ
5 Ͳ-̲Ͳ
6 IJ
7
, , , , .
, , , , , . , , , , , .
ϳ , xxxxxxxxxxxxxx 1xxx / 2/ 7.10.2008, xxxxxx 25.10.2008.
:³ EV8031.
, : . , .
, , Electronic Workbench.
:
:
- ;
- ( );
- ;
- ;
- ;
- ;
- ;
- ;
- ;
C:
- , ;
- ;
- : , , ;
- ;
- .
. .
³ :
- 5 35;
- , , .
.
Windows- .
IBM PC AT/ATX Pentium !!! , COM .
Windows. Windows2000/XP.
Delphi 7.
:
- : __________________.____.;
- : ______( )________;
-
- 젠 :
- : ³ EV8031;
- ꠠ : .. , ;
- ꠠ : .. , ʲ23;
- 蠠 : 2008.
() zip rar .
- : CD-R, CD-RW, Flash-RAM, HDD.
: , , .
³ :
1. ;
2. (, );
3. ;
4. .
.
. 60 ( , ).
- .
䳿 . :
- ;
- ;
- ;
- ;
- ;
- - ;
- ;
- ;
- ;
- ( );
- ;
- ;
- ;
- .
7:
1. , 4 .
2. ³ 3 .
: 93 ., 31 ., 12 ., 24
² : , , , - EV8031.
, :
- ;
- .
ᒺ .
. ׳ , , .
, - . .
: 93 ., 31 ., 12 ., 24
: , , , - EV8031.
, :
- ;
- .
- .
. , , .
, - . .
ABSTRACT
Report on DP: 93 page, 31 fig., 12 tables., 24 source
KEYWORDS: virtual devices, logic analyzers, generator of words, educational laboratory stand EV8031.
Creation of software of such virtual devices is examined in this work, as:
- Logic analyzer;
- Generator of words.
And associations them in a virtual measuring complex on the base of educational laboratory stand.
An algorithm and program of realization of task is developed. Basic problems, existing at development of such complexes, are expressly formulated, and the ways of their decision are indicated.
The questions of labour and environment protection are considered, the technical and economic estimation of work is conducted. On the basis of analysis of results conclusions and recommendations are done for further work in this direction.
̲
1 ߠ Ͳ в
1.1.
1.2.
1.2.1.
1.2.2. 蠠
1.2.3. 㳺 軠
1.2.3.1. ³
1.2.3.2. ³ Omega
1.2.3.3. ³ National Instruments
1.3
1.3.1 蠠 42
1.4. ' IBM PC
1.4.1 '
2 ί
2.1 EV8031
2.1.1 𠠠
2.1.2 Ϡ
2.1.3 /
2.1.4
2.1.5 ̳𠠠
2.2 ̳ ATMega8515
2.2.1 AVR
2.2.2
2.2.3
. 7 /
2.2.4
2.2.5
2.2.6 USART
3
3.1
3.1.1
3.1.2
3.1.3
3.1.4 蠠
3.2
3.2.1
. 18
3.2.2
. 19
3.2.3 /
3.2.3
4
5 -
5.1
5.2
5.2.1
5.2.2
5.3
5.3.1 ! .
5.4
5.5
5.6 㳿
5.6.1
5.6.2
5.6.3
5.7
5.8
6 ֲ
6.1
6.2 ,
6.3
6.4
6.4.1 ! .
6.4.2
6.4.3
6.4.4 i
6.5
6.6
6.7
6.8
- IBM- (), , . . , . ³ , , , , () .
, , .
: .
, , , , . , .
, , ' ( ..), , , ..
ii i i.
³ 䳿:
;
, 䳿;
, , , , , , .
.
, (): . , , ' ( ..), , , .. .
, , , , , , .
, , : , , , . ֳ .
ʠ :
- :
ʳ 8;
ʳ , 1024;
;
8- .
.
ATMega8515.
, RS232;
, : . , , .
, ' () . : , ( ).
䳿 : , , .
, , :
;
: ;
' ';
, . .
, , , - 䳿 . - .
() , , -, , .
: .
, , , , .
, , .
( ) ; 0- , 1- .
: .
, , ' . , , , .
³ - , .
, , , .
, , ' , , . . 蠠 , . :
1. ;
2. ;
3. , . ' ;
4. , .
, - 䳺 .
, 8 48 , 20 200 , 64 2048 .
:
;
( ) ;
.
: , .
, - , . , , N -N.
, :
;
;
㳺 " ";
:
, - ' ' , , ( ), '. ' . , , , , .
() . , ( ), . ' - , , . , , , .
-. , . , , . , . , , , "" ' - -. " ", . ', "" ', . ( ) . "", . : , , .
" ", , , , , , , " " . - :
- ', - Notebook;
- ;
- - , .
㳿 - - LabVIEW National Instruments, . ( ), 䳿 , - ' - , . , (', , -) - , , , . . , , ' , , - . , , , , Notebook . ' . , 1.5-2 , . , 㳺 " " ( ) , . " " , , , , , , : , , , . .
'. -3161, 16 200, LPT- . , . :
1,25 ...200 (17 )
16
131000
: ; ;
: 4 1
1,0...2,4
4,5 (800 )
0,01%
0...7 .
40
100 /8
1508626
. 1.1
1.1 ' -3161
. 1.2 .
1.2 ' -3161
-3162 16- ISA- -3101. 2 16 . , , .
-3162 :
16
̳ : 50
2,5
: - ,
䳿 7872
8000
1 /30
г :
. 1.3
1.3 ' -3162
. 1.4 .
1.4 ' -3162
-3166 , :
16
ij 2 200
2
ij 2,5 20
: , , - , / -
USB 1.1 LPT (EPP)
16 200 , . 2 . , . , , .
(). (), , . Windows .
. 1.5
1.5 ' -3166
. -3166 , . . 1.6 .
1.6 ' -3166
Omega Logic : , . Omega. ˲ . 4 . ᒺ . :
:
ʳ : 2, 4, 8
ᒺ : 128 ( 512K)
: , , , .
: 20 .
: +/-100ppm ( +/-25ppm)
: I2C, MicroWire, SPI, RS232, 1Wire, CAN ...
(, , , ).
.
.
: 8 , 128 , - 20 , .
- 16 .
( LA16):
- - 100
- - 100
- - 10 ( )
- - 1.4 (TTL)
㳿 , . , , LabVIEW, , , , PXI, .
, : USB 6008/6009, , Ѳ.
:
USB 6008/6009 . 1.7.
8 , 12 14 , 48 ;
;
plug-and-play ;
Windows, Mac OS X ࠠ Linux;
/ ;
USB;
.
1.7 ' USB 6008/6009
. 1.8.
32 , 4 48 ;
18 ;
;
2,8 (16 );
( 10 ) / ;
5 ;
LabVIEW NI-DAQmx.
1.8
LabVIEW , , . , LabVIEW .1.9.
1.9 ,
LabVIEW
LabVIEW 㳺 , , , , . , LabVIEW.
, :
( ). , , , .
. , , .
, , , . , , , , .
1.4. ' IBM PC
ϳ - . . 1.
1.
I
ISA |
|
|
|
( 5 / ) | 100 / | 115200 i/ | |
' ' | ( ' ) | 2 , | 15, |
³ | ³ | ³ | |
, |
, |
||
+ | + | - | |
ʳ , | 6 | 1 | 1 |
RS-232.
' COM ( RS-232). ' , . .
. 1 EV8031
EPM7128STC100. , , , , .
AD0..7 4- A12..15. / AD0..7( A0..7 ALE) A8..15 , 8 . ϳ ALE AD0..7 8 . 1, nRCS , 4 , , AD0..7 , . 2.1.
2.1.
|
|
B7 |
B6 |
B5 |
B4 |
B3 |
B2 |
B1 |
B0 |
|
|||||||||
|
|||||||||||||||||||
8xx0 |
|
[ A] |
PA_REG |
||||||||||||||||
8xx1 |
|
[ B] |
PB_REG |
||||||||||||||||
8xx2 |
|
[ C] |
PC_REG |
||||||||||||||||
8xx3 |
|
x |
x |
x |
x |
x |
TRISC |
x |
x |
TRIS |
|
||||||||
|
|||||||||||||||||||
8xx4 |
|
|
LCD_CMD |
||||||||||||||||
8xx5 |
|
|
LCD_DATA |
||||||||||||||||
|
|||||||||||||||||||
9xxx |
|
CTS |
DSR |
DCD |
RI |
KL3 |
KL2 |
KL1 |
KL0 |
US_REG |
|||||||||
Cxx0 |
|
x |
x |
X |
x |
DTR |
RTS |
CFG1 |
CFG0 |
UC_REG |
|||||||||
|
|||||||||||||||||||
Axx0 |
|
[ 0] |
DISPLAY[0] |
||||||||||||||||
Axx1 |
|
[ 1] |
DISPLAY[1] |
||||||||||||||||
Axx2 |
|
<> |
DISPLAY[2] |
||||||||||||||||
Axx3 |
|
<> |
DISPLAY[3] |
||||||||||||||||
Axx4 |
|
DP3 |
DP2 |
DP1 |
DP0 |
BL3 |
BL2 |
BL1 |
BL0 |
DC_REG |
|||||||||
Axx5 |
|
<> |
EDC_REG |
||||||||||||||||
Axx6 |
|
LED7 |
LED6 |
LED5 |
LED4 |
LED3 |
LED2 |
LED1 |
LED0 |
LED_REG |
|||||||||
|
|||||||||||||||||||
Axx7 |
|
x |
x |
X |
x |
x |
x |
x |
RUN |
SYS_CTL |
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|||||||||
|
|||||||||||||||||||
Bxx0 |
|
[ 1] |
DISPLAYB |
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|||||||||
15 0 nRCS , nRRD nRWR nRD nWR . ˳ RA14 A14 AVR. 80C51 16 , 16 .
8- / PORTA( PA0..7), PORTB( PB0..7), PORTC( PC0..7). PORTA PORTB , PORTC . 8xx0(x ), PACLK . AD0..7 PA0..7. PORTB PORTC 8xx1 82 . 83 , 2. 0 , 1 .
1489, 7404, ( ). CFG1,CFG0 9001h(. 1). CFG0 1, CFG1 0 , X12. RS-232C. / UART USART, RxD, TxD , 3 :COM1, COM2, RS485.
2 : AT89C51 8031, ATMega8515 AVR . , 9(0 AVR, 1 - i8031).
8515 AVR RISC ( ) 8- FVR. , 32- 8- . س 32 16- - . 4 . /. , .
̳ 32 , . ̳ 8 - , 512 , 512 ᒺ , 4 8- 1 3- , 1 8- 1 16 , , . , , WatchDog RC-, SPI .
1. ATMega8515
. 2.
0060h 025Fh. 0260h FFFFh . . 3 .
2. .
0060h 025Fh. 0260h FFFFh . . 3 .
. 3
1 ( 2 ). . 4
:
. 4 .
(SRAM) MCUCR 5.
. 5 MCUCR
SRAM SRE MCUCR. , . , LD, ST, LDS, STS, PUSH POP . SRAM, , , . , . . , , , .
1 SRE SRAM , , WR RD , . ϳ SRE 0 , .
1 SRW SRAM . 0 SRW SRAM 3 . . . 4 SRAM , . 6 .
.6 SRAM
/ . DDRx(x- A, B). PORTx , . / . PINx. , DDRx, PORTx PINx . . 7 - .
- . ³ AVR 4 . 4 (2 ) , 2. 3 . , , . ( ) 4 . 4 (2 ) 2. , , .
³, SREG AVR, , .
, SREG, . , ( 1 /1). 䳿. , , , .
̳ 8- 16- . , , . . 8 . 9. : CK/8, CK/64, CK/256, CK/1024, CK . , , 璺 . , , : , 䳿. / / TIMSK. / CPU. , CPU. CPU. . , , . .
- USART . 10. I/O USART(UDR). UDR :
- UDR , . .
. 8 8-
.9 - 16-
. 10 -
10 11- ( ), UDR . UDRE(USART Data Register Empty) USART(UCSRA). 1 UDRE USART . UDR UDRE. , UDR 10(11)- , 0 0( 0- ), 9 10 1( 1 ). 9 , -. - , , :
BAUD , Fosc CPU, UBRR UBRRH UBRRL. , / . , UCSRA RXC. USART . , http:\\www.atmel.com.
. , , , , , , . . 11 . 璺 , (X1) (X10). 2 , 1 璺 1 . , 璺 , . . 12.
. 12
, , , . ATMega8515 32 , 32 , (in R0, PINB) 1 , . 7 372 800 .
13.
512 . ³ . 7 372 800/3 = 2 457 600 . .
1024 , , ᒺ . 7 372 800/5 = 1 474 560 .
䳿 . ³ 4- . , . 1024/256 = 4 . 7 372 800/8 = 921 600 . ᒺ 2- , 7 372 800/9 = 819 200 .
. 1024 HEX 0400h. 0100h, , 1024 .
. , , . . 15.
, , :
1024 [ ] ()
. 14 ,
. 15
0700h, 0300h 1024. ϔ. . , , . , .. , , 1 䳿. 50 .
.
. , 8000h, 4 . , 3 , 4 . 2 , .
. 16
16. ( )
, .
: , ;
.
, .
,
( ). ,
, ,
. . 17.
/ RS-232. 5 , ( RS-232 +/-12 ). . 000h 1, (. . 1).
USART RXD TXD, . UBRR. , . , . EV8031 7,3728 , 0%- .
USART USART. , , , , / / , / . UBRR [1]. : UBRR, , USART. USART . / , 8, 1 1 . . UDRE UCSRA. UDR. ϳ USART .
.
USART . , , . ϳ , , , , ( ). USART RXC(Recieve complete). UDR , . , , ( / ) , . , . . , .
. . ϳ , , .
, , . , Delphi 7, SerialNG. , . Chart, , . [3].
. , ( ). , 8- , , . . 18.
: , . , . , . ³ , . . 19.
.
3.2.3 /
, COM . , . , . . Windows 2000 XP. 䳿, API. API . . , , . . Delphi . ֳ , , . . SerialNG. , , ( ). .
. . , WM_KEYPRESSED. , . , COM . , Windows 2000/XP , , COM , . , .
. wTerm.(. 20) ³ , , . . . wTerm , + 1024 . 璺 2 ( - ), wTerm COM2. wTerm , + 1024 . . , . . COM1 , , + 璺 . ϳ .
, . .
. 20 wTerm
5 -
- ³ . 1800 . , . 4 , 2 , : . . ³ , .
- 10%. , . :
) , , . . 볺 , , . , 3000 . . , . , , .
) , , , . , 㳿, 㳿 0.03$/* 3 , 150$/2. , 32400 , 15.9 . .
) , , . , 100 000 ( 500$). , , , . . ֳ 150-200$, 㳿 4 1$ . , 㳿. . 쳿 㳿 . , .
) . 볺 . , . , . 䳿 ,
ֳ , , 3540 . ﳿ 590 . , 112690 . ³ .
5.1
³ , . - .
5.2
5.2.1
³ . .
㳿 .
5.2.2
IBM PC/AT , CPU-Intel Pentium II, Pentium III AMD 6, AMD K7 ᒺ 32 , SVGA ᒺ 400 .
WIN32 Microsoft Windows 98 .
5.3
5.3.1
5.1 .
5.1 -
ʳ,. | , . | , . | ||
2 | 3,00 | 6,00 | ||
200 | 0,03 | 6,00 | ||
˳ | 5 | 0,00 | 0,00 | . |
2 | 8,00 | 16,00 | ||
, . | 28,00 |
|
5.2.
ʳ, . | ||
1 | ||
1 | ||
1 |
.
- :
= +++++, (5.1)
;
;
;
;
;
.
(Q) , :
, (5.2)
q ;
( 1,5);
( 0,4 0,8); n .
450. =1,5. , , 6 , 4 0,7 2 0,3. , :
Q = 450*1,5*(4*0,7+2*0,3) = 2295 .
:
, (5.3)
V (/);
6.3;
; v , (0,9-1,0), 1.
5.3 -
/ | |
, . | 80 |
20 | |
15 | |
20 | |
5 | |
20 |
:
2- 0.8;
2- 3- 1.0;
3- 5- 1.2;
5- 7- 1.4.
1,4.
:
, (5.4)
i ;
Vi ( 6.3).
, 5.4.
5.4 -
- | |
, |
=2,56 |
= 10,25 |
|
= 13,66 |
|
=10,25 |
|
= 40,98 |
|
=10,25 |
|
: |
=87,95 |
, . 22 :
= /22 =87,95/22 = 3,99 .
5.5.
20 % .
1 . ﳿ.
(.) , , , .
10 %
5.5 -
, . | ʳ-, . | -, . | , . | , . | |
300 | 1 | 4 | 300*0.2=60 | 1200*0.2=240 | |
200 | 1 | 4 | 200 | 800 | |
260 | 1040 |
1040*0,1=104 .
5.4
() :
, (5.5)
m (.).
m .
ϳ
=2295/84 27
:
= .., (5.6)
-, 1 1 .
= 27 .
:
() , ' , 2,5 % +. ³ (1040+104)*0,025=28,60 .
() ( ) 32 % +. ³ (1040+104)*0,32=366,08 .
2.5 % +. ³ (1040+104)*0,025=28,60 .
³ 0,85% .+. (1040+104)*0,0085=9,724 .
, 37,85% . +. ³ (1040+104)*0,3785=433 .
( ), , , .. 70 % . 1040*0,7=728 .
, 6.6. , 100 . 1 100.
5.6 -
, . | |
1. | 28,00 |
2. | 1040,00 |
3. | 104,00 |
4. ³ | 433,00 |
5. | 728,00 |
6. | 27,00 |
7. ( 1 6) | 2360,00 |
8. (25% 7) | 590,00 |
9. ֳ ( 7, 8) | 2950,00 |
10. (20% 9) | 590,00 |
11. ֳ ( 9, 10) | 3540,00 |
5.5
:
=.++, (5.7)
(1 0,034 );
(1 3,0 .);
(1 . 1 );
- (1 .).
ﳿ :
=1*0,034+3,0+1=4,034 .
5.6 㳿
- , . , . , .
; .
ϳ , , , . .
5.6.1
, , :
;
;
.
, , . , , . , (). :
;
' ;
.
ֳ , . , , , , , .
. , , . , , .
³ , .
5.6.2
, .
:
;
;
.
, .
.
() . , .
, , :
- ;
- .
5.6.3
䒺 . , , - .
. 㳿 , , , , ' , .
᳔.
60 .
5.7
.
1, 2 3- ³ . , , . , . . 1, 2 3- ³ , , 6.7, 6.8 6.9.
5.7 -
, | , . |
|
|||||||||||||||||||||||||||||||||||
̳ |
|
||||||||||||||||||||||||||||||||||||
0 | 0 | 0 | 5 | 9 | 10 | 12 | 15 | 25 | 31 | 38 | 46 | 191 |
|
||||||||||||||||||||||||
0 | 0 | 0 | 2950 | 5310 | 5900 | 7080 | 8850 | 14750 | 18290 | 22420 | 27140 | 112690 |
|
||||||||||||||||||||||||
/. ., .. | 260 | 260 | 260 | 260 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 1040 |
|
|||||||||||||||||||||||
. . |
182 | 182 | 182 | 182 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 728 |
|
|||||||||||||||||||||||
. | 108,25 | 108,25 | 108,25 | 108,25 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 433 | ||||||||||||||||||||||||
550,25 | 550,25 | 550,25 | 550,25 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 2201 |
|
||||||||||||||||||||||||
. | 0,0 | 0,0 | 0,0 | 20,17 | 36,306 | 40,34 | 48,408 | 60,51 | 100,85 | 125,054 | 153,292 | 185,564 | 770,494 |
|
|||||||||||||||||||||||
. . |
0,0 | 0,0 | 60 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 60 |
|
|||||||||||||||||||||||
27 | 27 | 27 | 27 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 0,0 | 108 | |||||||||||||||||||||||||
(10% ) | 0 | 0 | 0 | 295,0 | 531,0 | 590,0 | 708,0 | 885,0 | 1475,0 | 1829,0 | 2242,0 | 2714,0 | 11269,0 |
|
|||||||||||||||||||||||
27 | 27 | 87 | 342,17 | 567,306 | 530,34 | 756,408 | 945,51 | 1575,85 | 1954,054 | 2395,292 | 2899,564 | 12207,494 |
|
||||||||||||||||||||||||
5.8 -
|
, . | |||||||||||||||||||||||
|
I . | II . | III . | IV . |
|
|||||||||||||||||||
|
ᒺ | 50 | 55 | 60 | 65 | 220 | ||||||||||||||||||
|
29500 | 32450 | 35400 | 38350 | 129800 | |||||||||||||||||||
|
0 | 0 | 0 | 0 | 0 | |||||||||||||||||||
|
0 | 0 | 0 | 0 | 0 |
|
||||||||||||||||||
|
0 | 0 | 0 | 0 | 0 |
|
||||||||||||||||||
0 | 60 | 0 | 0 | 60 |
|
|||||||||||||||||||
|
201,7 | 221,87 | 242,04 | 262,21 | 887,48 | |||||||||||||||||||
|
0 | 60 | 0 | 0 | 60 |
|
||||||||||||||||||
|
2950 | 3245 | 3540 | 3835 | 12980 | |||||||||||||||||||
|
13927,48 |
|
||||||||||||||||||||||
5.9 -
, . | ||
ᒺ | 350 | |
206500 | ||
0 | ||
0 | ||
0 | ||
60 | ||
1411,9 | ||
60 | ||
20650 | ||
22121,9 |
(. 5.10).
5.10 -
, . | |||||
1 | 2 | 3 | |||
ʳ | 191 | 220 | 350 | 761 | |
112690 | 129800 | 206500 | 448990 | ||
. . | (+) | 1144 | 0 | 0 | 1144 |
³ : | 433 | 0 | 0 | 433 | |
28 | 0 | 0 | 28 | ||
728 | 0 | 0 | 728 | ||
. . |
60 | 60 | 60 | 180 | |
108 | 0 | 0 | 108 | ||
770,494 | 887,48 | 1411,9 | 3069,874 | ||
11269 | 12980 | 20650 | 44899 | ||
14432,494 | 13927,48 | 22121,9 | 50481,874 | ||
98257,506 | 115872,52 | 184378,1 | 398508,126 |
, .
:
=(+)/(-), (5.8)
(.);
(.);
(.);
.
(. 5.10). , . , , . , 28 . 2305 . 3357,874 . ֳ 3540,00 . :
=(2305+28)/(3540-3357,874)= 13
5.1.
|
|||
|
|
||||||
|
||||||
.5.1. .
5.8
³ .
3540 ., 590 . .
:
max=1.2(Ccc+1.3) = 1,2(3540+1,3*590)= 5168,4 .
̳ :
min=1.2(++1.3)=1,2(4,034+0+1,3590)= 925,2408 .
, . ֳ :
925,2408 . <= <= 5168,4 .
3540 .
191 , 220, 350. , , 13 . 㳿, , . ᳔ , .
6 ֲ
³ EV8031 , .
6.1
- , -, -, -㳺 - , , ' .
.
.
6.2 ,
.
: 6 2, ᒺ 20 3. 1 . ³ 1,2 . ³ 2,5 .
[6]. , ( ).
-I [6].
I II [6].
, 璺 , , . , [7].
, i . ϳ , , , i , i . i i ( i ..) i . i ..
, , : , 50 , 220 , , 300 .
6.3
12.0.00374 [9] , , , 7.1.
6.1
䳿 | - | |||
6.1 | ||||
1 | 2 | 3 | 4 | 5 |
1. ϳ | - | , - - |
ʳ 13 : =1500..3000, =3000..5000 |
[10] |
2. - | () | , - - | 5 - 100 / | [11] |
3. - | - | =0 | [12] | |
1 | 2 | 3 | 4 | 5 |
4. ϳ | ij- - -, | ≤20 / | [13] | |
5.ϳ - |
ϳ: - -, - -; : - |
- | t=22..24C | [14] |
6. ϳ | ,-, -- | - | L≤50 | [15] |
7. - - | - -, - | 1,5% | [12] | |
8.ϳ | - - |
=100 /2 |
[11] | |
9. |
= 0,9% 0 ᒺ, |
[11] | ||
10.ϳ | , | I=0,6 | [18] | |
11. ϳ - | - , |
=5% |
[11] | |
12. | , |
|
=4/3 |
[14] |
13. | - | ̒ - | - 40% | [11] |
14. | - | - -, - - | - - 40-50% | [11] |
15. - | - - | 40-50% | [11] |
6.4
, , , .
.
6.4.1
: (C), (/), (%) .
.
12.1.00588 [14] , .
㳿 ( , ) 1.
. , 6.2.
6.2
, | ³ ,% |
, / |
||
1 | 22-24 | 40-60 | 0,1 | |
23-25 |
( ), - 2.04.05-91 [17].
6.4.2
, ( ) , , , .
, , .
, . () 1,5% [12].
, IV :
(6.1)
III 1,5%,
m ( m=0,9%),
c (=1).
=1,5*0,9*1=1,35%
.
, , . .
6.3.
6.3
̳-- ᒺ- | ϳ-- - | - ᒺ- - | -- | ||||||
- | |||||||||
,% |
,% |
Lmin, |
|||||||
0,5..1 | IV | -- | - | 1,5 | 1,35 | 500 | ---- |
.
, ( ) . :
- - ;
- - ;
- - .
.
, ( ). "". .
, , . - 250 . .
50 90 200/2 , 40.
() 11-4-79 [12] 1.4.
5% . .
г 300-500 . , 300 .
40 .
, , (, ) , 200 /2.
. 40 /2, 200 /2.
, , 3:1, (, ) - 5:1.
, , .
2 , , .
, , , ( , ).
6.4.3
, 12.1.003-83 [15] . ", 3223-85 " ", ̳ ' . г , , ϲ 3.3.2-007-98[19]
, - .
, , 31.-8000 , , - . , .
6.4.4 i
, : , , , , , . г .
:
50 . :
5 - 2 25 /,
2 - 400 2,5 /,
:
5 - 2 250 ,
2 - 400 25 ,
500 .
, 10 100 / [19].
. 6.4 ().
г | ʳ 1 | |
n+ | n- | |
̳ | 400 | 600 |
1500-3000 | 3000-5000 | |
50000 | 50000 |
, ' , 20-22 , , .
6.5
, , , , 㳿 ( 220 50 ), . .
:
;
- ;
.
.
, , , , . , 14254-80 [20]. I44
( 4 1 ; 4 ) -87 [7].
³ 12.2.007.0-75* [21] I , ' .
- .
: , , .
1000 , 42 , 12.1.030-81* [22] , , .., 璺 , .
璺 , .
䳿 , . : , .
. 6.1.
1 - ;
2 - ();
Ro - ;
R - ;
I - ;
I - , ;
I - , .
I 12.2.007.0-75* [21].
:
;
( , ) ;
, .
, 䳿 , , .
: , , . () . .
( ) 12.1.030‑81* [22], 璺 .
, , 0,6 . .
:
;
;
, -87 [7].
6.6
' , .
,
, :
;
;
;
.
-24-86 [6], . II 2.01.02-85 [8], -II, -87 [7].
12.1.004-91 [16] , , - .
:
;
;
;
.
10 , . III .
II- I44 I2 .
:
;
, -5, , ;
, ;
, ;
;
, , .
: 1,5 ., 2,0 ., 1,8 .; ; 100 .
:
;
, .
.
6.7
䳿 . , , . .
. - , - . , , .
, 1991. (, ), , . .
6.8
6.1, 6.2, 6.3 , , .
1. Datasheet ATMega8515 www.atmel.com.
2. EV8031.
3. .. , (Delphi), , 2008, 349.
4. , , Borland Delphi 6. , , 2008, 1120.
5. .., Delphi. , , 2008, 208 .
6. -24-86, . " . . " - .: 1986.
7. -87 . . .: 1987.
8. 2.01.02-85. " . " -.:.,1986 .
9. 12.0.00374* . . . 1978 ( 01.01.76). ( 1999 .) 1, 1978 . ( 11-78).
10. 2152-80 "-㳺 "
11. 0.00 1.31 99. - .
12. 11-4-79 " . "-.:.,1980 .
13. 12.1.045 ". . "
14. 12.1.005-88 " - "-. 01.01.89.
15. 12.1.003-83 " . "-. 01.07.84.
16. 12.1.004-91." . . ". ‑. 01.07.92.
17. 2.04.05-91 " . , "-.:.,1987 .
18. 12.1.038-82 " . - ". -. 01.07.83.
19. ϳ ..2. 007 1998. - .
20. 14254-80. 1000 . . . ‑. 01.01.81.
21. 12.2.007.0-75*. . . . ‑. 01.01.78.
22. 12.1.030-81*. . . . . ‑. 01.07.82.
23. .. . , , 1993.
24. / . ... .: , 1991.
EV8031, .
ATMega8515 EV8031. , .
, . .
, , , .
Electronic Workbench, .
, . , 50.
̲Ͳ ²
ֲ Ͳ Ͳ
ʲ ˲Ͳ Ҕ
:
__________ /xxxx../
"___" __________ 2009.
² ̲ Dz EV8031
xxxx.03077-01 12 01-1-
_____________/xxx./ ______________2009. x /xxxxxx./ _________________2009. |
2009
xxx.03077-01 12 01-1-
² ̲ Dz EV8031
xxxxx.03077-01 12 01-1
_48_
2009
̲
1
1.1 , Unit1.pas
2 , Unit2.pas
3 , , Unit3.pas
2
2.1 , main.asm
: Unit1.pas
: ,
젠 : ;
: ³ ;
ꠠ : .. , ;
: .. , ʲ-23;
г 蠠 : 2009.
unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart, StdCtrls, ComCtrls, Buttons, ComDrv32, SerialNG, Mask, Math;
type TForm1 = class(TForm)
Chart1: TChart;
Series1: TLineSeries;
Series2: TLineSeries;
Series3: TLineSeries;
Series4: TLineSeries;
Series5: TLineSeries;
Series6: TLineSeries;
Series7: TLineSeries;
Series8: TLineSeries;
ColorBox1: TColorBox;
ColorBox2: TColorBox;
ColorBox3: TColorBox;
ColorBox4: TColorBox;
ColorBox5: TColorBox;
ColorBox6: TColorBox;
ColorBox7: TColorBox;
ColorBox8: TColorBox;
StaticText1: TStaticText;
StaticText2: TStaticText;
StaticText3: TStaticText;
StaticText4: TStaticText;
StaticText5: TStaticText;
StaticText6: TStaticText;
StaticText7: TStaticText;
StaticText8: TStaticText;
ScrollBar1: TScrollBar;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
StaticText9: TStaticText;
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
BitBtn1: TBitBtn;
SerialPortNG1: TSerialPortNG;
TrackBar1: TTrackBar;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
MaskEdit1: TMaskEdit;
Label3: TLabel;
Label4: TLabel;
MaskEdit2: TMaskEdit;
Label5: TLabel;
procedure FormCreate(Sender: TObject);
procedure ScrollChange(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure SpeedButton1Click(
Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
procedure SerialPortNG1RxClusterEvent(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure MaskEdit2Change(Sender: TObject);
private
{ Private declarations }
scale:word;
dwError:dword;
pName:PWideChar;
flag:byte;
function StrToIntM(str:string):dword;
public
{ Public declarations }
end;
TArrBuf512 = array[0..511] of byte;
Var Form1: TForm1;
implementation
uses SerialNGBasic;
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
i:word;
s:string;
begin
SerialPortNG1.Active := True;
scale := 500;
ScrollBar1.Visible := False;
Chart1.BottomAxis.Minimum := 0;
Chart1.BottomAxis.Maximum := scale;
Series1.Clear;
Series2.Clear;
Series3.Clear;
Series4.Clear;
Series5.Clear;
Series6.Clear;
Series7.Clear;
Series8.Clear;
for i := 0 to 500 do
begin
Series1.AddXY(i, ((i mod 1)*0.5)+0.25, '', ColorBox1.Selected);
Series2.AddXY(i, ((i mod 2)*0.5)+1.25, '', ColorBox2.Selected);
Series3.AddXY(i, ((i mod 2)*0.5)+2.25, '', ColorBox3.Selected);
Series4.AddXY(i, ((i mod 2)*0.5)+3.25, '', ColorBox4.Selected);
Series5.AddXY(i, ((i mod 2)*0.5)+4.25, '', ColorBox5.Selected);
Series6.AddXY(i, ((i mod 2)*0.5)+5.25, '', ColorBox6.Selected);
Series7.AddXY(i, ((i mod 2)*0.5)+6.25, '', ColorBox7.Selected);
Series8.AddXY(i, ((i mod 2)*0.5)+7.25, '', ColorBox8.Selected);
end;
end;
procedure TForm1.ScrollChange(Sender: TObject);
begin
Chart1.BottomAxis.Minimum := ScrollBar1.Position;
Chart1.BottomAxis.Maximum := ScrollBar1.Position + scale;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
if (scale < 500) then
scale := scale + 10;
if (scale = 500) then
ScrollBar1.Visible := False
else
ScrollBar1.Visible := True;
ScrollBar1.Max := 500 - scale;
if (ScrollBar1.Position > (500 - scale)) then
ScrollBar1.Position := (500 - scale);
Chart1.BottomAxis.Minimum := ScrollBar1.Position;
Chart1.BottomAxis.Maximum := ScrollBar1.Position + scale;
end;
procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
if (scale > 0) then
scale := scale - 10;
if (scale = 500) then
ScrollBar1.Visible := False
else
ScrollBar1.Visible := True;
ScrollBar1.Max := 500 - scale;
Chart1.BottomAxis.Minimum := ScrollBar1.Position;
Chart1.BottomAxis.Maximum := ScrollBar1.Position + scale;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
SerialPortNG1.Active := False;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
var
s:string;
begin
if (ComboBox2.ItemIndex <> -1) and (ComboBox1.ItemIndex <> -1) then
begin
s := ' ';
s[1] := char($FF);
s[2] := char($AA);
s[3] := char($3A);
s[4] := char((((ComboBox1.ItemIndex shl 1) or byte(RadioButton2.Checked))or (ComboBox2.ItemIndex shl 5)));
SerialPortNG1.SendString(s);
flag := 1;
end
else
MessageBox(0, ' !', '', MB_OK or MB_ICONINFORMATION);
end;
procedure TForm1.SerialPortNG1RxClusterEvent(
Sender: TObject);
var
i:integer;
n:integer;
p:^TArrBuf512;
size:integer;
error:DWord;
begin
n := SerialPortNG1.NextClusterSize;
if n >= 0 then
begin
p := SerialPortNG1.ReadNextCluster(size, error);
if (flag=1) then
begin
Series1.Clear;
Series2.Clear;
Series3.Clear;
Series4.Clear;
Series5.Clear;
Series6.Clear;
Series7.Clear;
Series8.Clear;
for i := 0 to n do
begin
Series8.AddXY(i, -(((p^[i] shr 7) and 1)*0.5)+7.75, '', ColorBox8.Selected);
Series7.AddXY(i, -(((p^[i] shr 6) and 1)*0.5)+6.75, '', ColorBox7.Selected);
Series6.AddXY(i, -(((p^[i] shr 5) and 1)*0.5)+5.75, '', ColorBox6.Selected);
Series5.AddXY(i, -(((p^[i] shr 4) and 1)*0.5)+4.75, '', ColorBox5.Selected);
Series4.AddXY(i, -(((p^[i] shr 3) and 1)*0.5)+3.75, '', ColorBox4.Selected);
Series3.AddXY(i, -(((p^[i] shr 2) and 1)*0.5)+2.75, '', ColorBox3.Selected);
Series2.AddXY(i, -(((p^[i] shr 1) and 1)*0.5)+1.75, '', ColorBox2.Selected);
Series1.AddXY(i, -(( p^[i] and 1)*0.5)+0.75, '', ColorBox1.Selected);
end;
flag := 0;
end;
end;
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
Edit1.Text := IntToStr(TrackBar1.Position);
end;
procedure TForm1.ComboBox2Change(Sender: TObject);
begin
if ComboBox2.ItemIndex = 7 then
begin
MaskEdit1.Visible := true;
Label3.Visible := true;
MaskEdit1.Text := '';
end
else
begin
MaskEdit1.Visible := False;
Label3.Visible := false;
end;
end;
procedure TForm1.MaskEdit2Change(Sender: TObject);
begin
if MaskEdit2.Text <> '' then
if StrToIntM(MaskEdit2.Text) > 65535 then
MaskEdit2.Text := '65535';
end;
function TForm1.StrToIntM(str:string):dword;
var
i,num:integer;
begin
num := 0;
if (length(str) > 0) and (length(str) < 6) then
for i := length(str) downto 1 do
if ((str[i] >= '0')and(str[i] <= '9')) then
begin
num := num +
(byte(str[i])-byte('0'))*
Round(Power(10,length(str)-i));
end;
StrToIntM := num;
end;
end.
: Unit2.pas
: ,
젠 : ;
: ³ ;
ꠠ : .. , ;
: .. , ʲ-23;
г 蠠 : 2009.
unit Unit2;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, Buttons, Mask;
type TForm2 = class(TForm)
ListBox1: TListBox;
RadioGroup1: TRadioGroup;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
CheckBox1: TCheckBox;
Label1: TLabel;
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
ComboBox1: TComboBox;
Label5: TLabel;
Label6: TLabel;
MaskEdit1: TMaskEdit;
Label2: TLabel;
MaskEdit2: TMaskEdit;
MaskEdit3: TMaskEdit;
Label3: TLabel;
Label4: TLabel;
MaskEdit4: TMaskEdit;
MaskEdit5: TMaskEdit;
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure ListBoxClick(Sender: TObject);
procedure Form2Create(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure MaskEdit1KeyPress(Sender: TObject; var Key: Char);
procedure MaskEdit1Change(Sender: TObject);
procedure MaskEdit2KeyPress(Sender: TObject; var Key: Char);
procedure MaskEdit2Change(Sender: TObject);
procedure MaskEdit3KeyPress(Sender: TObject; var Key: Char);
procedure MaskEdit4KeyPress(Sender: TObject; var Key: Char);
procedure MaskEdit4Change(Sender: TObject);
procedure MaskEdit3Change(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
index:integer;
count:integer;
buf:array[0..1023]of byte;
function StrToHex(str:string):integer;
public
{ Public declarations }
end;
var Form2: TForm2;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm2.RadioButton1Click(Sender: TObject);
begin
MaskEdit5.Enabled := false;
Label6.Enabled := false;
ComboBox1.Enabled := true;
Label5.Enabled := true;
end;
procedure TForm2.RadioButton2Click(Sender: TObject);
begin
ComboBox1.Enabled := false;
Label5.Enabled := false;
MaskEdit5.Enabled := true;
Label6.Enabled := true;
end;
procedure TForm2.ListBoxClick(Sender: TObject);
var
s:string;
begin
s:=
ListBox1.Items.ValueFromIndex[ListBox1.ItemIndex];
index := ListBox1.ItemIndex;
MaskEdit1.Text := s[4]+s[5];
end;
procedure TForm2.Form2Create(Sender: TObject);
var
i,j:integer;
s,s1:string;
begin
count := 1024;
index := 0;
ListBox1.Clear;
for i := 0 to count-1 do
begin
s := Format('%x',[i]);
for j := 1 to 3-length(s) do
s1 := s1 + '0';
for j := 1 to length(s) do
s1 := s1 + s[j];
ListBox1.Items.Add(s1+':00');
s1 := '';
buf[i] := 0;
end;
end;
procedure TForm2.CheckBox1Click(Sender: TObject);
begin
if (CheckBox1.Checked = True) then
Form1.Visible := true;
end;
procedure TForm2.MaskEdit1KeyPress(Sender: TObject; var Key: Char);
begin
if not(((Key >= '0') and (Key <= '9')) or
((Key >= 'A') and (Key <= 'F')) or
((Key >= 'a') and (Key <= 'f'))) then
Key := ' ';
if (Key >= 'a') and (Key <= 'f') then
Key := UpCase(Key)
end;
procedure TForm2.MaskEdit1Change(Sender: TObject);
var
s,s1,s2:string;
i:byte;
begin
s1 := '';
s := Format('%x',[index]);
for i := 1 to 3-length(s) do
s1 := s1 + '0';
for i := 1 to length(s) do
s1 := s1 + s[i];
s2 := s1 + ':';
s1 := '';
s := Format('%x',[StrToHex(MaskEdit1.Text)]);
for i := 1 to 2-length(s) do
s1 := s1 + '0';
for i := 1 to length(s) do
s1 := s1 + s[i];
buf[index] := StrToHex(MaskEdit1.Text);
s2 := s2 + s1;
ListBox1.Items.Strings[index] := s2;
end;
procedure TForm2.MaskEdit2KeyPress(Sender: TObject; var Key: Char);
var
i,j:integer;
s,s1:string;
begin
if not((Key >= '0') and (Key <= '9') or
(Key = #13)) then
Key := ' ';
if Key = #13 then
begin
ListBox1.Clear;
for i := 0 to count-1 do
begin
s := Format('%x',[i]);
for j := 1 to 3-length(s) do
s1 := s1 + '0';
for j := 1 to length(s) do
s1 := s1 + s[j];
ListBox1.Items.Add(s1+':00');
s1 := '';
end;
end;
end;
procedure TForm2.MaskEdit2Change(Sender: TObject);
var
i:integer;
s,s1:string;
begin
s1 := '';
s := MaskEdit2.Text;
if s <> '' then
for i := 1 to length(s) do
if s[i] <> ' ' then s1 := s1 + s[i];
if s1 <> '' then
begin
if (StrToInt(s1) > 1024) then
begin
MaskEdit2.Text := '1024';
count := 1024;
end;
count := StrToInt(s1);
end;
end;
function TForm2.StrToHex(str:string):integer;
var
i,num:integer;
begin
num := 0;
if (length(str) > 0) and (length(str) < 5) then
for i := length(str) downto 1 do
begin
if ((str[i] >= '0')and(str[i] <= '9')) then
num := num + (byte(str[i])-byte('0'))shl(4*(length(str)-i));
if ((str[i] >= 'A')and(str[i] <= 'F')) then
num := num + (byte(str[i])-byte('A')+10)shl(4*(length(str)-i));
if ((str[i] >= 'a')and(str[i] <= 'f')) then
num := num + (byte(str[i])-byte('a')+10)shl(4*(length(str)-i));
end;
StrToHex := num;
end;
procedure TForm2.MaskEdit3KeyPress(Sender: TObject; var Key: Char);
begin
if not(((Key >= '0') and (Key <= '9')) or
((Key >= 'A') and (Key <= 'F')) or
((Key >= 'a') and (Key <= 'f'))) then
Key := ' ';
if (Key >= 'a') and (Key <= 'f') then
Key := UpCase(Key);
end;
procedure TForm2.MaskEdit4KeyPress(Sender: TObject; var Key: Char);
begin
if not(((Key >= '0') and (Key <= '9')) or
((Key >= 'A') and (Key <= 'F')) or
((Key >= 'a') and (Key <= 'f'))) then
Key := ' ';
if (Key >= 'a') and (Key <= 'f') then
Key := UpCase(Key);
end;
procedure TForm2.MaskEdit4Change(Sender: TObject);
begin
if MaskEdit4.Text <> '' then
begin
if StrToHex(MaskEdit4.Text) > count-1 then
MaskEdit4.Text := Format('%3x', [count-1]);
if StrToHex(MaskEdit4.Text) < StrToHex(MaskEdit3.Text) then
MaskEdit4.Text := MaskEdit3.Text;
end;
end;
procedure TForm2.MaskEdit3Change(Sender: TObject);
begin
if MaskEdit3.Text <> '' then
begin
if StrToHex(MaskEdit3.Text) > count-1 then
MaskEdit3.Text := Format('%3x', [count-1]);
if StrToHex(MaskEdit4.Text) < StrToHex(MaskEdit3.Text) then
MaskEdit3.Text := MaskEdit4.Text;
end;
end;
procedure TForm2.BitBtn1Click(Sender: TObject);
var
i:integer;
//a:array[1..]
begin
BitBtn1.Enabled := False;
BitBtn2.Enabled := True;
//Form1.SerialPortNG1.SendData();
Form1.SerialPortNG1.SendData(@buf[StrToHex(MaskEdit3.Text)],StrToHex(MaskEdit4.Text)-StrToHex(MaskEdit3.Text));
end;
procedure TForm2.BitBtn2Click(Sender: TObject);
begin
BitBtn1.Enabled := True;
BitBtn2.Enabled := False;
end;
end.
: Unit3.pas
: ,
젠 : ;
: ³ ;
ꠠ : .. , ;
: .. , ʲ-23;
г 蠠 : 2009.
unit Unit3;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons;
type TForm3 = class(TForm)
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
Label1: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form3: TForm3;
implementation
uses Unit1, Unit2;
{$R *.dfm}
procedure TForm3.BitBtn1Click(Sender: TObject);
begin
Form1.Visible := True;
end;
procedure TForm3.BitBtn2Click(Sender: TObject);
begin
Form2.Visible := true;
end;
end.
: main.asm
: ,
젠 : ;
: ³ ;
ꠠ : .. , ;
: .. , ʲ-23;
г 蠠 : 2009.
#include <m8515def.inc>
.def tmp = r16
.def tmp1 = r17
.def RX_flag = r18
.def RX_Counter = r19
.def RX_Complete = r20
.def command = r21
.def tmp2 = r22
.def tmp3 = r23
.equ UC_REG = 0xC000
.equ RX_Buffer = 0x7C00
.macro USART_TRANSMITT_M
utm_l0:
wdr
sbis UCSRA, UDRE
rjmp utm_l0
out UDR, tmp
.endm
.macro WAIT_PUSK
mov tmp, command
andi tmp, 0b00010000
brne wp_l5
mov tmp, command
andi tmp, 0b00001110
lsr tmp
ldi tmp1, 1
wp_l0:
cpi tmp, 0
breq wp_l1
lsl tmp1
dec tmp
brne wp_l0
wp_l1:
mov tmp, command
andi tmp, 0b00000001
brne wp_l2
wp_l3:
wdr
in tmp2, PINB
and tmp2, tmp1
brne wp_l3
wp_l4:
wdr
in tmp2, PINB
and tmp2, tmp1
breq wp_l4
rjmp wp_l5
wp_l2:
wdr
in tmp2, PINB
and tmp2, tmp1
breq wp_l2
wp_l6:
wdr
in tmp2, PINB
and tmp2, tmp1
brne wp_l6
wp_l5:
.endm
.macro ANALYZE_CLK_6
ac6_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
dec tmp3 // 1 cycle
brne ac6_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac6_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
dec tmp3 // 1 cycle
brne ac6_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_8
ac8_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
nop // +2 cyle
nop
dec tmp3 // 1 cycle
brne ac8_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac8_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
nop // +2 cyle
nop
dec tmp3 // 1 cycle
brne ac8_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_16
ac16_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 3 // +10 cyle
ac16_l2:
dec tmp1
brne ac16_l2
nop
dec tmp3 // 1 cycle
brne ac16_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac16_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 3 // +10 cyle
ac16_l3:
dec tmp1
brne ac16_l3
nop
dec tmp3 // 1 cycle
brne ac16_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_32
ac32_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 8 // +26 cyle
ac32_l2:
dec tmp1
brne ac32_l2
nop
nop
dec tmp3 // 1 cycle
brne ac32_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac32_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 8 // +26 cyle
ac32_l3:
dec tmp1
brne ac32_l3
nop
nop
dec tmp3 // 1 cycle
brne ac32_l3 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_64
ac64_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 19 // +58 cyle
ac64_l2:
dec tmp1
brne ac64_l2
nop
dec tmp3 // 1 cycle
brne ac64_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac64_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 19 // +58 cyle
ac64_l3:
dec tmp1
brne ac64_l3
nop
dec tmp3 // 1 cycle
brne ac64_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_128
ac128_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 40 // +122 cyle
ac128_l2:
dec tmp1
brne ac128_l2
nop
nop
dec tmp3 // 1 cycle
brne ac128_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac128_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 40 // +122 cyle
ac128_l3:
dec tmp1
brne ac128_l3
nop
nop
dec tmp3 // 1 cycle
brne ac128_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_256
ac256_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 83 // +250 cyle
ac256_l2:
dec tmp1
brne ac256_l2
nop
dec tmp3 // 1 cycle
brne ac256_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
ac256_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
ldi tmp1, 83 // +250 cyle
ac256_l3:
dec tmp1
brne ac256_l3
nop
dec tmp3 // 1 cycle
brne ac256_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.macro ANALYZE_CLK_VN
acv_l0:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
dec tmp3 // 1 cycle
brne acv_l0 // 2 cycles or
// 1 cycle
dec tmp3 // 1 cycle
acv_l1:
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
dec tmp3 // 1 cycle
brne acv_l1 // 2 cycles
dec tmp3
in tmp, PINB // 1 cycle
st Y+, tmp // 2 cycle
.endm
.org 0
rjmp RESET
nop;rjmp INT0
nop;rjmp INT1
nop;rjmp TIMER1_CAPT
nop;rjmp TIMER1_COMPA
nop;rjmp TIMER1_COMPB
nop;rjmp TIMER1_OVF
rjmp TIMER0_OVF
nop;rjmp SPI_STC
rjmp USART_RXC
nop;rjmp USART_UDRE
nop;rjmp USART_TXC
nop;rjmp ANA_COMP
nop;rjmp INT2
nop;rjmp TIMER0_COMP
nop;rjmp EE_RDY
nop;rjmp SPM_RDY
RESET:
; set stack pointer to top of RAM
ldi tmp, high(RAMEND)
out SPH, tmp
ldi tmp, low(RAMEND)
out SPL, tmp
; enable WDT with 2,1s timeout
ldi tmp, (1<<WDE)|(7<<WDP0)
out WDTCR, tmp
; enable external SRAM
ldi tmp, (1<<SRE)|(1<<SRW10)
out MCUCR, tmp
; enable interrupts
sei
; USART init
rcall USART_Init
// Unmask timer 0 overflov interrupt
ldi tmp, (1<<TOIE0)
out TIMSK, tmp
// Stop timer0
ldi tmp, 0b00000000
out TCCR0, tmp
clr RX_Flag
clr RX_Complete
ldi tmp, 0
out DDRB, tmp
ldi tmp, 0b11111111
out PORTB, tmp
loop:
wdr
cpi RX_Complete, 1
breq c_l0
rjmp l0
c_l0:
// reset RX_Complete
clr RX_Complete
// mask RXCIE
ldi tmp, (1<<TXEN) | (1<<RXEN)
out UCSRB, tmp
// reset RX_Buffer
ldi YL, low(RX_Buffer)
ldi YH, high(RX_Buffer)
ldi tmp3, 0xFF
// do command
mov tmp, command
andi tmp, 0b11100000
lsr tmp
lsr tmp
lsr tmp
lsr tmp
lsr tmp
cpi tmp, 0
brne dc_l0
WAIT_PUSK
ANALYZE_CLK_6
Rjmp dc_end
dc_l0:
cpi tmp, 1
brne dc_l1
WAIT_PUSK
ANALYZE_CLK_8
Rjmp dc_end
dc_l1:
cpi tmp, 2
brne dc_l2
WAIT_PUSK
ANALYZE_CLK_16
Rjmp dc_end
dc_l2:
cpi tmp, 3
brne dc_l3
WAIT_PUSK
ANALYZE_CLK_32
Rjmp dc_end
dc_l3:
cpi tmp, 4
brne dc_l4
WAIT_PUSK
ANALYZE_CLK_64
Rjmp dc_end
dc_l4:
cpi tmp, 5
brne dc_l5
WAIT_PUSK
ANALYZE_CLK_128
Rjmp dc_end
dc_l5:
cpi tmp, 6
brne dc_l6
WAIT_PUSK
ANALYZE_CLK_256
Rjmp dc_end
dc_l6:
cpi tmp, 7
breq cdc_unk
rjmp dc_unk
cdc_unk:
WAIT_PUSK
ANALYZE_CLK_VN
dc_end:
/*
// wait if need befor pusk
WAIT_PUSK
// analyse and store (6 cycles)
// clock time (1/7372800Mhz)*6 = 813,8ns
ANALYZE_CLK_6
*/
// reset RX_Buffer
ldi YL, low(RX_Buffer)
ldi YH, high(RX_Buffer)
// transmitt data
l1:
ld tmp, Y+
USART_TRANSMITT_M
Dec tmp3
brne l1
dec tmp3
l2:
ld tmp, Y+
USART_TRANSMITT_M
Dec tmp3
brne l2
ld tmp, Y+
USART_TRANSMITT_M
dc_unk:
// unmask RXCIE
ldi tmp, (1<<TXEN)|(1<<RXEN)|(1<<RXCIE)
out UCSRB, tmp
l0:
rjmp loop
////////////////////////////////////////////////////
// USART receive complete ISR
USART_RXC:
Push tmp
in tmp, SREG
push tmp
// tmp <- RX
in tmp, UDR
// if (RX_Flag == 1) goto urxc_l0
cpi RX_Flag, 1
breq urxc_l0
// if (RX == AA)
cpi tmp, 0xAA
brne urxc_end
// init timeout
ldi tmp, 0b00000101
out TCCR0, tmp
clr tmp
out TCNT0, tmp
// set recive_flag
ldi RX_Flag, 1
// reset RX_Buffer
ldi YL, low(RX_Buffer)
ldi YH, high(RX_Buffer)
clr RX_Counter
ldi tmp, 0xAA
urxc_l0:
// push RX to buffer
st Y+, tmp
inc RX_Counter
urxc_end:
pop tmp
out SREG, tmp
pop tmp
reti
////////////////////////////////////////////////////
// Timer0 overflow ISR
TIMER0_OVF:
Push tmp
Push tmp1
In tmp, SREG
push tmp
// Stop timer0
ldi tmp, 0b00000000
out TCCR0, tmp
// reset RX_Buffer
ldi YL, low(RX_Buffer)
ldi YH, high(RX_Buffer)
cpi RX_Counter, 3
brne t0ovf_l0
ld tmp, Y+
cpi tmp, 0xAA
brne t0ovf_l0
ld tmp, Y+
cpi tmp, 0x3A
brne t0ovf_l0
ld tmp, Y+
mov command, tmp
ldi RX_Complete, 1
//clear buffer
ldi YL, low(RX_Buffer)
ldi YH, high(RX_Buffer)
clr tmp
st Y+, tmp
st Y+, tmp
st Y+, tmp
st Y+, tmp
st Y+, tmp
t0ovf_l0:
// clear recive_flag
clr RX_Flag
pop tmp
out SREG, tmp
pop tmp1
pop tmp
reti
////////////////////////////////////////////////////
// USART init routine
// uses: tmp, tmp1
USART_Init:
Ldi tmp, (1<<TXEN) | (1<<RXEN) | (1<<RXCIE)
Out UCSRB, tmp
Ldi tmp, (1<<UCSZ0) | 1<<UCSZ1)
Out UCSRC, tmp
Ldi tmp, 0
Ldi tmp1, 23
Out UBRRH, tmp
Out UBRRL, tmp1
Ldi tmp, 0b00000001
Sts UC_REG, tmp
ret
////////////////////////////////////////////////////
// USART transmit routine
// uses: tmp
USART_Transmit:
cli
ut_l0:
wdr
sbis UCSRA, UDRE
rjmp ut_l0
out UDR, tmp
sei
ret
̲Ͳ ²
ֲ Ͳ Ͳ
ʲ ˲Ͳ Ҕ
:
__________ /xxxx./
"___" __________ 2009.
² ̲ Dz EV8031
xxxxx.03077-01 13 01-1-
/xxxxxxxxx./ _________________2009. xxxxx /xxxx./ ____________________2009. |
2009
xxx.03077-01 13 01-1-
² ̲ Dz EV8031
xxxx.03077-01 13 01-1
_8_
2009
ֲ
, , , , . .
ABSTRACT
The given document contains the description of programs, methods and algorithms which were used. It describes the requirements and peculiarities of operation of the product developed within the framework of degree projection of a virtual analyze complex. The program implementation of the methods of analysis of self-descriptiveness and diagnostics.
̲
1. Ͳ ²Ҳ
1.1
1.2 ,
1.3
2. ֲ
2.1
2.2
3. òί
3.1
4. Ͳ ͲͲ
5.
5.1
5.2
5.3
6. ղͲ Ͳ
7. ղͲ Ͳ
³ . ³ BBK.exe( ), , . :
- , ;
- , ;
- .
:
- Windows2000/XP.
IBM- . Microsoft Windows NT/2000/XP. Microsoft Windows 2000/XP IBM- .
. , .
:
- ;
- , ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- .
, :
- Delphi 7;
- AVRStudio;
- AVReal32.
2. ֲ. ( ), ( ).
.
3. òί: c . . . . , . , , COM . ϳ . ϳ .
4. Ͳ ͲͲIBM PC/AT , Pentium II 433 128 , VGA SVGA, RS-232.
ᒺ 5 .
: Pentium Tualatin, 512 RIMM , 80 , GeForce2 MX 400 32.
, , .
AVReal32. , ( USB). *.bat . . *.hex.
- ., , 䳿.
5 .
6. ղͲ Ͳ, COM . COM .
7. ղͲ Ͳ, COM . COM .
̲Ͳ ²
ֲ Ͳ Ͳ
ʲ ˲Ͳ Ҕ
:
__________ /xxxxxxxx./
"___" __________ 2009.
² ̲ Dz EV8031
xxxxx.03077-01 34 01-1-
_ _________ /xxxxx./ ____________________2009. xx-23 /xxxxxxxx./ ____________________2009. |
2009
xxxxxxxxxxxxxxxxxxxx
² ̲ Dz EV8031
xxxxxxx.03077-01 34 01-1
2009
ֲ
, ³ . , , , , .
Document Guidance of operator contains information for verification, providing of functioning and tuning of the system Virtual measuring complex. In this document the noted information is about a software product, his setting and terms of application, description, setting, zverntannya to the program.
̲
1
2
3
4 ²
. ( ), ( ).
2IBM PC/AT( ) Pentium !!!, Microsoft Windows 2000/XP.
:
- SVGA 102476832;
- ;
- ( 128);
- ;
- ;
- COM .
3, BBK.exe. ϳ (. 3.1) . : . : (. 3.2) (. 3.3).
3.1
3.2 ³
3.3 ³
. . ³ .
(.3.2) :
- ;
- ;
- ;
- ;
- , ;
- ;
- ;
- ;
- , .
(. 3.3) :
- ;
- ;
- ;
- : , , .
- , ;
- ;
- ;
- .
, 0 9 a f , , . , , 䳿. , .
Copyright (c) 2024 Stud-Baza.ru , , , .