3D 2013 ESKB.
2.10 .
. .
:
:
1. λ.
2. ,Τ.
3. 20000 , P(Τ).
:
:
, , ,.
:
.
:
Τ=20000 .
Τ 20000
:
.
- n | λ10*10-6 1/ | λ10*10-6 *N 1/ | ||||
DD1 | KP1816BE31 | 0,013 | 0,013 | |||
DD2 | KP55522 | 0,013 | 0,013 | |||
DD3 | 55616 | 0,013 | 0,013 | |||
DD4 | 53717 | 0,013 | 0,013 | |||
DD5 | 1555 | 0,013 | 0,013 |
- :
λi*10-6(-1) | KH | KT | Ni | λi*Ni*KH*KT*10-6 | |
DA1 | 0,013 | 0,013 | |||
: | 0,013*10-6(-1) |
:
P(5000)=0,013-1,619*10-6*5000=0,991=99,1[%]
PIC16F628A. , , , .
, -.
, , .
, , -.
|
|
, , , .
1. .. , .. , 2010. .
2. . . . . : : , 2007, 307 .
3. , . .. , , . .. ,2010;
4. 14. 301-83 ;
5. 3. 050. 014 ;
6. http://make-smart-room.com/common/2012/05/01/obschie-svedeniya-o-avtonomnoy-sisteme-upravleniya-osvescheniem-otdelnogo-pomescheniya.html ( )
-1
------------------------------------------------------------------------------------------------------------
list p = 16f628a
__config 03F30h; 11111100110001 - , , ,
; RA5/-MCLR -MCLR, - , - , -
;************************** *********************************
CBLOCK 0x20;
T_ext;
T_int;
Strok; , 5 - (1 - , 0 - )
Stolb; , 5 - (1 - , 0 - )
ENDC;
*************************** **********************************
Cr1 equ.200; 1- 200
Cr2 equ.150; 2- 150200
Status equ 03h;
TrisA equ 05h;
TrisB equ 06h;
PortA equ 05h;
PortB equ 06h;
Cmcon equ 1Fh; /
F equ 1; .
;********************************************************
; RA1, RA2, RA3, RA6, RA7 -
; RB3, RB4, RB5, RB6, RB7 -
;********************************************************
org 0
;******** A: RA7, RA6 - , RA5, RA4, RA3 - , RA2, RA1, RA0 -
;******** B: RB7, RB6, RB5, RB4, RB3, RB2 - , RB1, RB0 - ***
start movlw.7;
movwf Cmcon; /
clrf PortA;
movlw.248; 11111000
movwf PortB;
bsf Status,5; 1- ( 1 5- Status).
movlw.49; A (W)..49=00110001
movwf TrisA; W TrisA
movlw.7; (W)..3=00000111
movwf TrisB; B W TrisB.
bcf Status,5; 0- ( 0 5- Status) ***************************************************************
|
|
eff1 movlw b'00011111';
movwf Strok
movlw b'00000001';
movwf Stolb
;-------- -----------------
cikl_stolb1 call in_ports
call pause
rlf Stolb,1;
btfss Stolb,5; 5 stolb = 1,
goto cikl_stolb1
;----------------------------------------------
movlw b'00000001';
movwf Strok
movlw b'00011111';
movwf Stolb
;-------- -----------------
cikl_strok1 call in_ports
call pause
rlf Strok,1;
btfss Strok,5; 5 stolb = 1,
goto cikl_strok1
goto eff1
;********
in_ports btfsc Stolb,0; 0- stolb = 0,
bcf PortB,3; RB3=0 - .1
btfss Stolb,0; 0- stolb =1,
bsf PortB,3; RB3=1 - . 1
;--------------------------------------
btfsc Stolb,1; 1- stolb = 0,
bcf PortB,4; RB4=0 - . 2
btfss Stolb,1; 1- stolb =1,
bsf PortB,4; RB4=1 - . 2
;-------------------------------------
btfsc Stolb,2; 2- stolb = 0,
bcf PortB,5; RB5=0 - . 3
btfss Stolb,2; 2- stolb =1,
bsf PortB,5; RB5=1 - . 3
;--------------------------------------
btfsc Stolb,3; 3- stolb = 0,
bcf PortB,6; RB6=0 - . 4
btfss Stolb,3; 3- stolb =1,
bsf PortB,6; RB6=1 - . 4
;--------------------------------------
btfsc Stolb,4; 4- stolb = 0,
bcf PortB,7; RB7=0 - . 5
btfss Stolb,4; 4- stolb =1,
bsf PortB,7; RB7=1 - . 5
;-------- -----------------------------------------------------------
btfsc Strok,0; 0- strok = 0,
bsf PortA,2; RA2=1 - .1
btfss Strok,0; 0- strok =1,
bcf PortA,2; RA2=0 - .1
;--------------------------------------
btfsc Strok,1; 1- strok = 0,
bsf PortA,3; RA3=1 - .2
btfss Strok,1; 1- strok =1,
bcf PortA,3; RA3=0 - .2
;--------------------------------------
btfsc Strok,2; 2- strok = 0,
bsf PortA,1; RA1=1 - .3
btfss Strok,2; 2- strok =1,
bcf PortA,1; RA1=0 - .3
;--------------------------------------
btfsc Strok,3; 3- strok = 0,
bsf PortA,7; RA7=1 - .4
btfss Strok,3; 3- strok =1,
bcf PortA,7; RA7=0 - .4
;--------------------------------------
btfsc Strok,4; 4- strok = 0,
bsf PortA,6; RA6=1 - .5
btfss Strok,4; 4- strok =1,
bcf PortA,6; RA6=0 - .5
return
;********
pause movlw Cr2
movwf T_ext;
cikl2 movlw Cr1
movwf T_int;
cikl3 decfsz T_int,1; T_int = 0,
goto cikl3;
decfsz T_ext,1; T_ext = 0,
goto cikl2;
return
end
|
|
;-----------------------------------------------------------------------------------------------------------
list p = 16f628a
__config 03F30h; 11111100110001 - , ,
; , RA5/-MCLR -MCLR, - ,
; - , -
;********* ************************************
CBLOCK 0x20;
Temp; , 20h
Adr; EEPROM , 21h
T_int; , 22h
Strok; , 23h
Stolb; , 24h
Fr_sch; , 25h
Fr_cikl; , 26h
Fr_kol; , 27h
Fr_cikl_kol; , 28h
;----- 29h 7Fh -------------------------------
;----- 86 - 30 -------------
ENDC;
;**************************** *********************************
Status equ 03h;
TrisA equ 05h;
TrisB equ 06h;
PortA equ 05h;
PortB equ 06h;
Cmcon equ 1Fh; /
F equ 1; .
FSR equ 04h;
INDF equ 0h;
Cr equ.50;
EEADR equ 1Bh; EEPROM
EECON1 equ 1Ch; c EEPROM
EEDATA equ 1Ah; / EEPROM
;********************************************************
; RA1, RA2, RA3, RA6, RA7 -
; RB3, RB4, RB5, RB6, RB7 -
;********************************************************
org 0
;******** - A: RA7, RA6 - , RA5, RA4, RA3 - , RA2, RA1, RA0 -
;******** - B: RB7, RB6, RB5, RB4, RB3, RB2 - , RB1, RB0 - *********
start movlw.7;
movwf Cmcon; /
clrf PortA;
movlw.248; 11111000
movwf PortB;
bsf Status,5; 1- ( 1 5- Status).
movlw.49; A (W)..49=00110001
movwf TrisA; W TrisA
movlw.7; (W)..3=00000111
movwf TrisB; B W TrisB.
bcf Status,0; () ( )
;******** EEPROM *******************************************************
;--------- - , ------------------
movlw.0; ,
movwf EEADR; EEPROM
bsf EECON1,0;
movf EEDATA,0;
bcf Status,5; 0- ( 0 5- Status)
movwf Fr_kol; Fr_kol
;-------- Fr_kol*5+1 - --------------------------
rlf Fr_kol,0; 2
movwf Temp
rlf Temp,0; 2 ( Fr_kol*4)
addwf Fr_kol,0; Fr_kol*5
|
|
movwf Temp; Temp
incf Temp,1; Temp=Fr_kol*5+
;---------- Fr_kol*5+1 ----------------------------------------------
movlw 28h; ( Fr_cikl_kol ...)
movwf FSR;
movlw.1; EEPR
movwf Adr; 1
zagruzka bsf Status,5;
movwf EEADR; EEPROM
bsf EECON1,0;
movf EEDATA,0;
bcf Status,5; 0- ( 0 5- Status)
movwf INDF; , FSR
incf FSR,1;
incf Adr,1; EEPROM
movf Adr,0; EEPROM
decfsz Temp,1; -
goto zagruzka
;***********************************************************************
effect movlw 29h; (2h) Adr
movwf Adr;
movf Fr_kol,0; -
movwf Fr_sch;
show movf Fr_cikl_kol,0; -
movwf Fr_cikl;
povtor call show_frame; Fr_cikl -
decfsz Fr_cikl,1
goto povtor
movlw.5; ( Adr 5)
addwf Adr,1
decfsz Fr_sch,1;
goto show; ,
goto effect; ,
*************************************************************************** *********************************************************************
show_frame movf Adr,0; FSR
movwf FSR
movlw b'00000001';
movwf Strok
show_next movf INDF,0;
movwf Stolb; stolb
call in_ports
call pause
call erase
incf FSR,1;
rlf Strok,1;
btfss Strok,5; 5- strok = 1,
goto show_next
return
;******** Strok Stolb ************
in_ports btfsc Stolb,0; 0- stolb = 0,
bcf PortB,3; RB3=0 - .1
btfss Stolb,0; 0- stolb =1,
bsf PortB,3; RB3=1 - . 1
;--------------------------------------
btfsc Stolb,1; 1- stolb = 0,
bcf PortB,4; RB4=0 - . 2
btfss Stolb,1; 1- stolb =1,
bsf PortB,4; RB4=1 - . 2
;--------------------------------------
btfsc Stolb,2; 2- stolb = 0,
bcf PortB,5; RB5=0 - . 3
btfss Stolb,2; 2- stolb =1,
bsf PortB,5; RB5=1 - . 3
;--------------------------------------
btfsc Stolb,3; 3- stolb = 0,
bcf PortB,6; RB6=0 - . 4
btfss Stolb,3; 3- stolb =1,
bsf PortB,6; RB6=1 - . 4
;--------------------------------------
btfsc Stolb,4; 4- stolb = 0,
bcf PortB,7; RB7=0 - . 5
btfss Stolb,4; 4- stolb =1,
bsf PortB,7; RB7=1 - . 5
;-------- -----------------------------------------------------------
btfsc Strok,0; 0- strok = 0,
bsf PortA,2; RA2=1 - .1
btfss Strok,0; 0- strok =1,
bcf PortA,2; RA2=0 - .1
;--------------------------------------
btfsc Strok,1; 1- strok = 0,
bsf PortA,3; RA3=1 - .2
btfss Strok,1; 1- strok =1,
bcf PortA,3; RA3=0 - .2
;--------------------------------------
btfsc Strok,2; 2- strok = 0,
bsf PortA,1; RA1=1 - .3
btfss Strok,2; 2- strok =1,
bcf PortA,1; RA1=0 - .3
;--------------------------------------
btfsc Strok,3; 3- strok = 0,
bsf PortA,7; RA7=1 - .4
|
|
btfss Strok,3; 3- strok =1,
bcf PortA,7; RA7=0 - .4
;--------------------------------------
btfsc Strok,4; 4- strok = 0,
bsf PortA,6; RA6=1 - .5
btfss Strok,4; 4- strok =1,
bcf PortA,6; RA6=0 - .5
return
;**************************** *************************************
pause movlw Cr
movwf T_int; -
cikl3 decfsz T_int,1; T_int = 0,
goto cikl3;
return
;*********************** ***********************
erase movf Strok,0
movwf Temp
movlw.0
movwf Stolb
movwf Strok
call in_ports
movf Temp,0
movwf Strok
return
;***********************************************************************
org 2100h; EEPROM
de.6,.40; - - ()
de b'00000100', b'00000100', b'00011111', b'00000100', b'00000100';
de b'00001000', b'00000101', b'00001110', b'00010100', b'00000010';
de b'00001000', b'00001011', b'00000100', b'00011010', b'00000010';
de b'00010001', b'00001010', b'00000100', b'00001010', b'00010001';
de b'00000010', b'00011010', b'00000100', b'00001011', b'00001000';
de b'00000010', b'00010100', b'00001110', b'00000101', b'00001000';