364 , , : , , , , , , . , , , .
:
364150
(304)
(123)
(23)
(113)
(4)
(4814)
(5227)
(2616)
(3423)
(4214)
(1518)
(68)
- (2836)
(8269)
(50)
(50)
(762)
(2)
(5275)
(30)
(1222)
(43)
(20403)
(465)
(19)
(108)
(173)
(96)
(899)
(54)
(34)
(476)
(106)
(62792)
(3562)
, (6444)
(2165)
(21320)
(766)
(64)
(3145)
(60)
(17)
(588)
(1000)
(106)
(48)
(3)
(1167)
(8485)
(537)
: (2044)
(11657)
(532)
(21)
(7985)
(3721)
, (10549)
(88)
(58)
(36)
(2257)
(12491)
(91)
(797)
(1338)
(24)
, (214)
(1141)
(3)
(8)
(21697)
(7850)
(3801)
(682)
, (2881)
(475)
(1)
, (7100)
(8694)
, (4121)
(443)
(952)
(2967)
(23)
(748)
(4876)
(95)
(107)
(7)
(2004)
(15)
(663)
(240)
(39)
(25)
(624)
(16)
(2652)
(136)
(90)
(406)
(95)
(24)
(3463)
(4482)
(7216)
(4592)
(5386)
(3)
(2244)
(23)
(29)
(35)
(4517)
(20645)
- (666)
(119)
(2573)
(889)
(288)
(148)
, (1140)

:

:
:
: 12:48:43 28 2009
: 2472 : 2 : 0 : 0 :    

59 , 8 , 7 , 6 .

, , , ,

: , . . .

: , , , , , , .


1.

2.

3. PIC16F628

3.1 RISC

3.2

3.3

3.4

3.5

3.6 PIC 1684

3.7

3.8 ()

4.

5.

6.

7.

8.

.


, . . . , , , , . . .

() , : , , .

. : , - ( , , ) , , , .

, .


1.

. , .

DS18B20, PIC16F628, GDM1602 "", "", "", " 1-2/" "".

:

, , 0,1 ;

;

, "" . " 1-2" , .

1.

a. DS18B20

b. 5

2.

a. GDM1602

3.

a. , , 0,1

b.

c. , "" .

d. " 1-2" ,


2.

. . 1.


SB1- SB5


. 1.


3. PIC16F628

PIC 1684 (16F84) , PIC 165 PIC 1671, , .

PIC16F628.

3.1 RISC

DC 20

8-

,

35

- ,

3.2

- 4,

+/- 1%

- 37

-

SLEEP

PORTB

WDT

(ICSP) ( )

BOR

POR

PWRT OST

2.0 5.5

FLASH/EEPROM

- 100 000 / FLASH

- 1 000 000 / EEPROM

- FLASH/EEPROM > 100

3.3

PIC 1684 SLEEP PIC 1671 . SLEEP - EEPROM, .

:

- 100 @ 2.0 (.)

:

- 12 @ 32, 2.0 (.)

- 120 @ 1, 2.0 (.)

TMR1:

- 1.2, 32, 2.0 (.)

:

- 1 @ 2.0 (.)

:

- 4 37

- SLEEP 3 @ 3.0 (.)

3.4

16 /

/,

:

-

-

-

-

TMR0: 8- /

TMR1: 16- /

TMR2: 8- /

CCP :

- 16

- 16

- 10-

USART

PICmicro

()

I/O

CCP

()

USART

.

8/16

()

EEPROM

()

PIC16F628A 2048 224 128 16 1 + 2 2/1

3.5

. 2. PIC16F628

3.6 PIC 1684

PIC 1671 - EEPROM . :

1. (EEPROM). , .

2. EEPROM - 648 .

3. . PIC 1671:

- RBO/INT,

- / TMRO(RTCC),

- RB<7:4>,

:

- EEPROM.

4. 0 .....10 ( 400 ).

5. .

6. INTCON .

/ - ADIE 6- INTCON / EEPROM (EEIE), :

EEIE=0 ( EEIF EECON1), EEIE = 1 .

INTCON PIC 1671

7. 15- ADCON, ADCON1, ADRES ADRES2 ( ) EEDATA, EECON1, EEADR EECON, EEPROM - (RAM) . .

. 3. PIC16F84 (16C84)

3.7

PIC 1684 PIC 1671 , RA0, RA1, RA2, RA3 / .

3.8 ()

1288, 2- (128 ) PIC 1671 , ADCON, ADCON1, ADRES ADRES2 EEPROM - EEDATA (08h), EECON1 (88h), EEADR (09h), EECON2 (89h).

PIC 16C84 (16F84), PIC, : ().

: . - (INDF), (), PCL PCLATH, (STATUS), - (FSR), (W), (INTCON), (OPTION). / (RA- RB- ), (EEDATA) (EEADR) -, - (TMPO) / (TRISA TRISB).

PIC 1671 , FSR (04h). , , EEPROM -.

- EEPROM

- EEPROM . ( ). EEPROM. .

EEPROM EEADR RD EECON1<0> . EEDATA . EEDATA . - EEPROM :

-

Bcf STATUS , RP0 ; 0.

Movlw CONFIG_ADDR ;

Movwf EEADR ; .

Bsf STATUS , RP0 ; 1.

Bsf EECON1 , RD ; EEPROM.

Bcf STATUS , RP0 ; 0.

Movf EEDATA , W ; W.

EEPROM, EEADR EEDATA . , :

Movlw 55h ;

Movwf EECON2 ; 55 h.

Movlw AAh ;

Movwf EECON2 ; AA h.

Bsf EECON1 , WR ; WR,

; .

, . - 10. , . WR , EEIF, , . - EEPROM :

; -.

Bsf Status , RP0 ; 1.

Bcf Intcon , GIE ; .

; .

Movlw 55h ;

Movwf EECON2 ; 55 h.

Movlw Aah ;

Movwf EECON2 ; AA h.

Bsf EECON1, WR ; WR,

; .

;Bsf Intcon , GIE ; .

WREN EECON1. WREN , , . , , WREN , , .


4.

. 4. . (-55,0), (+99,9). , , , , -55,0 +99,9 . , , . .

, +125, , -, , -, 96 . +99,9.

. .

. , - . , .

. 3.

, .. , 32 , . , , - , . () , .

0,1 DS18B20 0,75 , . , . .3 , . .

, . . , , . , . 1.

, , , , . , . , , , . .


1.

. + + - -
+ - + -
> =3 < =
. Min + + - -
+ - + -
< = > =3

, . ( ASCII 0x30). , , "-" 253, "+" 251. , . 1, .

, -00,0, , .

, , . () , , , EEPROM.

16 /, . / .

16 . 128x8 8 (128/16 = 8). .

1. .

2. .

3. .

4. .

5. .

6. .

7. .

8. .

. . .

, . "" ( ), 16 . , . , .

. / , , . . 112 (128 -16=112), . , , , . , ( , ).

. . , . , . , , .

, - . , , , , , .


5.

pp MPASM, p . MPASM Microchip MPLAB Microchip Technology.

p p p pp:

* HEX -

* LST -

* ERR - pp

* COD

16-p p p , p p. p pp p . pp pp, p p. p . p pp p "Assembly Successful", , p . .

.


6.

: , ; , (, , ); , ; , ; , . . 4.



. 4.


7.

. 5. R5 . AAA. 3 .

AccelEda (. 5).

.5. AccelEDA.

.

. , . DS1820 :

64- ;

+3 +5,5 ;

-55 +125;

-...+85 0,5;

2;

9- ;

;

750 ;

;

. DS18B20 DS1820 0,5; 0,25; 0,0625. 93,75; 187,5; 375; 750 . .

: -92 SOIC.

.6.


. . (, ) , . , . . - , HD44780 Hitachi. , , , .

- - LCD-. - , ( ), , .

, 7.

HD44780:

2,7...5,5 .

... .

5 8 5 10.

.

8- 4- . 2 . 80 8 (80 ). 9920 . 64 8. 1:8, 1:11, 1:16.

- (14) (8, 10, 16, 20, 24, 30, 32, 40) . 5x8 (40) , , (. 58). . . 58 , . , 3 - 4Ah. . -, R (), . - .


8.

, . 6, , 01 . , . , .

.6.

, . .

"" .7.

. 7.

. "" . "" . : "-". "" "" .

"" , . .

"" (. 8).

. 8.

. . , . , . " 1-2" . " 1-2" , .

"" , , EEPROM.

"" . "" . .

, , .


- . . . , .

1. .. VR -, , 2007 352.

2. / .. [ .]. .: , 1990. 224 .

3. .. Microchip: /... .: , 2002. 296 .

4. .. 10 AVR-. 1 ., 1, -, 2008 224.

5. . , VR-: . ., -, 2006 208.

6. . VR. /. . ., 1, 2006 272.


;

; 2 .

; - 0,1 .

; - DS18B20,

; 8 .

; - 162 .

;

;

; .

; = MAMIN.ASM

; : 24-01-06.

; : MPLAB IDE, : 5.70.40.

;

LIST P=16F628

#INCLUDE P16F628.INC

__CONFIG 3F01H

;======================================================

; 4,096 M.

; 16,

; TMR0 (256) , 4 , 125, 2

; 1 (416256x250=4096000).

;======================================================

; RB4-RB7 - LCD,

; RB2 - RS, RB3 - E,

; RB1 - "".

; RB0 - "".

; RA0 - / DS18B20 - 2.

; RA4 - / DS18B20 - 1.

; RA5 - 1-2. RB5 - -1. RB6 - +.

;==============================================

; .

;==============================================

CBLOCK H'20'

CEK; .

MIN; .

HOU; .

MINL; .

MINH; .

HOUL; .

HOUH; .

TEMP;.

COUN; , .

LSB; DS.

LSBH; .

MCK;.

WTEMP;.

STEMP;.

FTEMP;.

REID; .

KYPC;.

SOT2; 2.

SOT2X; 2 MAX.

SOT2N; 2 MIN.

EDI2; 2.

DES2; 2.

DST2; 2.

SOT1; 1.

SOT1X; 1 MAX.

SOT1N; 1 MIN.

EDI1; 1.

DES1; 1.

DST1; 1.

DHU; .

DHUE; .

DHUD; .

MEC; .

MECE; .

MECD; .

FLAG;

FLAG1;

FLAG2;

MECDI; .

MECEI; .

DHUDI; .

DHUEI; .

DHUZ; /.

MECZ; /.

MIN1X; 1.

MIN1N; 1.

HOU1X; 1.

HOU1N; 1.

MIN2X; 2.

MIN2N; 2.

HOU2X; 2.

HOU2N; 2.

COUZ; .

COUE; .

COYC; .

LSB1X; 1 .

LSB1N; 1 .

LSB2X; 2 .

LSB2N; 2 .

DST1X; 1 .

DST1N; 1 .

DST2X; 2 .

DST2N; 2 .

ENDC

R1EQU60H; .

R2EQU61H;

R3EQU62H;

R4EQU63H;

R5EQU64H;

R6EQU65H;

R7EQU66H;

R8EQU67H;

R9EQU68H;

R10EQU69H;

R11EQU6AH;

R12EQU6BH;

R13EQU6CH;

R14EQU6DH;

R15EQU6EH;

R16EQU6FH;

HOUZ1XEQU70H;/, 1 MAX.

MINZ1XEQU71H; 1 MAX.

LSBZ1XEQU72H; 1 .

DSTZ1XEQU73H; 1 .

HOUZ1NEQU74H; 1 MIN.

MINZ1NEQU75H; 1 MIN.

LSBZ1NEQU76H; 1 .

DSTZ1NEQU77H; 1 .

HOUZ2XEQU78H; /, 2 MAX.

MINZ2XEQU79H; 2 MAX.

LSBZ2XEQU7AH; 2 .

DSTZ2XEQU7BH; 2 .

HOUZ2NEQU7CH; 2 MIN.

MINZ2NEQU7DH; 2 MIN.

LSBZ2NEQU7EH; 2 .

DSTZ2NEQU7FH; 2 .

;==============================================

; .

;==============================================

;FLAG

;0-> 1 .

;1-> 1 .

;2-> " -".

;3-> " +".

;4-> "".

;5-> "".

;6-> .

;7-> 2 (1 CEK).

;FLAG1

;0-> .

;1-> : 1>2, 0>1.

;2-> .

;3-> . 1-.

;4-> 1.

;5-> , " 1-2".

;6-> 2.

;FLAG2; .

;0-> , , .

;1-> , .

;2-> .

;3-> 2 .

;4-> 2 .

;5-> .

;6-> .

;=======================================

DS2EQU0; DS2.

DS1EQU4; DS1.

RSEQU2;/.

EEQU3;.

YCPLEQU6; .

YCMIEQU5; .

PAZEQU1;.

PEJEQU0;.

HOLEQU5;.

;=======================================

; 1. .

;======================

ORG 0

GOTOINIT

ORG 4

GOTOPRER

;=========================================

; 2. .

;=========================================

DESATI

ADDWFPCL,1;

RETLW.0;0

RETLW.1;1

RETLW.1;2

RETLW.2;3

RETLW.3;4

RETLW.3;5

RETLW.4;6

RETLW.4;7

RETLW.5;8

RETLW.6;9

RETLW.6;10

RETLW.7;11

RETLW.7;12

RETLW.8;13

RETLW.9;14

RETLW.9;15

;============================

; 3. .

;============================

DAYMON

ADDWF PCL,F ;

NOP ;0

RETLW .32 ;1-

RETLW .29 ;2-

RETLW .32 ;3-

RETLW .31 ;4-

RETLW .32 ;5-

RETLW .31 ;6-

RETLW .32 ;7-

RETLW .32 ;8-

RETLW .31 ;9-

RETLW .32 ;10-

RETLW .31 ;11-

RETLW .32 ;12-

;=======================================

; 4. .

;=======================================

VUBOR

BTFSSPORTB,PEJ; ,

RETURN; .

BCFFLAG,4; .

MOVFWREID;

ADDWFPCL,1; .

GOTOINDT;.

GOTOINDYC; , .

GOTOINPRO;.

INDT

CALLREGIN; .

BTFSCFLAG2,0; ,

RETURN; .

BCFFLAG2,1;: ,

BCFFLAG2,2;,

BCFFLAG1,0; ,

BCFFLAG2,6; ,

BCFFLAG2,5; .

CALLZHAKCOX; .

BSFFLAG2,0; .

RETURN

INDYC

CALLREGIN; .

BTFSCFLAG2,1; ,

RETURN; .

BSFFLAG1,0;.

BCFFLAG2,0;: ,

BCFFLAG2,2;.

CLRFKYPC; .

BSFFLAG2,1; , .

RETURN

INPRO

BTFSCFLAG2,2; ,

GOTO$+6; .

MOVLW.8; .

MOVWFKYPC;

BCFFLAG2,0;: ,

BCFFLAG2,1; , .

BSFFLAG2,2; .

BTFSCFLAG1,5; 1-2 ,

GOTO$+5; .

BTFSSPORTA,HOL; ,

BSFFLAG1,5; .

BTFSSPORTA,HOL; ,

RETURN; .

BTFSSFLAG1,5; 1-2 ,

RETURN;

BCFFLAG1,5; .

BTFSCFLAG1,1;

GOTO$+3;

BSFFLAG1,1;

RETURN

BCFFLAG1,1; .

RETURN

;=======================================

; 5. .

;=======================================

YCTAL

BTFSSPORTB,YCPL; ,

RETURN; .

BCFFLAG,3; .

BTFSCFLAG2,2;

RETURN; .

BCFFLAG,2; .

BCFFLAG1,2; .

MOVFWKYPC;

ADDWFPCL,1; .

GOTOYC0; .

GOTOYC1; .

GOTOYC2; .

GOTOYC3; .

GOTOYC4; .

GOTOYC5; .

GOTOYC6; .

GOTOYC7; .

YCTAM

BTFSCFLAG2,1; , ,

RETURN; .

BTFSSPORTB,YCMI; ,

RETURN; .

BCFFLAG,2;

BCFFLAG1,2; .

GOTOYC8M; .

;=========================================

; 6. .

;=========================================

JEKYC

MOVLW.14; .

CALL JEKOM; .

CALLJEKYK; .

CALL JEKOM; .

BSFFLAG,6; .

RETURN

JEKYK

MOVFWKYPC; - .

ADDWFPCL,1;

RETLW0x85; .

RETLW0x86; .

RETLW0x88; .

RETLW0x89; .

RETLW0xC5; .

RETLW0xC6; .

RETLW0xC8; .

RETLW0xC9; .

RETLW0x81; .

;======================================================

; 7. .

;======================================================

DEBIN

ADDWFPCL,1;

RETLW.0

RETLW.10

RETLW.20

RETLW.30

RETLW.40

RETLW.50

;===============================================

; 8. .

;===============================================

ZHAKCOX

MOVLW.251; .

MOVWFSOT1X;

BTFSSFLAG,0; ,

GOTO$+3;

MOVLW.253;.

MOVWFSOT1X;

MOVLW.251; .

MOVWFSOT1N;

BTFSSFLAG,1; ,

GOTO$+3;

MOVLW.253;.

MOVWFSOT1N;

MOVLW.251; .

MOVWFSOT2X;

BTFSSFLAG2,3; ,

GOTO$+3;

MOVLW.253;.

MOVWFSOT2X;

MOVLW.251; .

MOVWFSOT2N;

BTFSSFLAG2,4; ,

GOTO$+3;

MOVLW.253;.

MOVWFSOT2N;

RETURN

;=================================================

; 9. ( ).

;=================================================

KYPCY

BTFSCFLAG2,2; ,

RETURN; .

BTFSSFLAG2,1; ,

RETURN; .

BTFSSPORTB,PAZ;

RETURN; .

BCFFLAG,5; .

INCFKYPC,1; .

MOVLW.8; 7.

SUBWFKYPC,0;

SKPNC;

CLRFKYPC; .

RETURN;

;=========================================

; 10. DS2.

;=========================================

INIDS2

CALLHYL2; .

MOVLW0xCC; .

CALLPOSIL2;.

MOVLW0x4E; 0,1 .

CALLPOSIL2;.

MOVLW0x7D; +125. .

CALLPOSIL2;.

MOVLW0x77; -55. .

CALLPOSIL2;.

MOVLW0x7F; 11 = 0,1 .

CALLPOSIL2;.

CALLHYL2; .

MOVLW0xCC; DS.

CALLPOSIL2;.

MOVLW0x44; .

CALLPOSIL2;.

MOVLW.3; 0,75 .

MOVWFCOUN; 750 .

SPLU

MOVLW.255

MOVWF TEMP

PLUS

MOVLW .255

ADDLW -1

BTFSS STATUS,2

GOTO $-2

DECFSZ TEMP,1

GOTO PLUS

DECFSZCOUN,1

GOTOSPLU

GOTOPRIEM2;.

HYL2

CALLWUX2;.

MOVLW.125;

ADDLW-1;= 500 .

BTFSSSTATUS,2;

GOTO$-2;

CALLWXO2;.

MOVLW.125; =

ADDLW-1;500 .

BTFSSSTATUS,2;

GOTO$-2;

RETURN

;=======================================

; 11. /.

;=======================================

WUX2

BCFPORTA,DS2;

BSFSTATUS,5; 1.

BCFTRISA^80H,DS2; .

BCFSTATUS,5; 0.

RETURN

WXO2

BSFSTATUS,5; 1.

BSFTRISA^80H,DS2; .

BCFSTATUS,5; 0.

RETURN

;====================================

; 12. 16 DS2.

;====================================

PRIEM2

CALLHYL2; .

MOVLW0xCC; .

CALLPOSIL2;.

MOVLW0xBE; .

CALLPOSIL2;.

BCFINTCON,7; .

CALL PRIE2; .

MOVFWLSBH;

MOVWFLSB; .

BCFINTCON,7; .

CALLPRIE2; .

GOTOCXET2; .

PRIE2

MOVLW.8

MOVWFCOUN; .

CLRFLSBH; .

PRI2

CALLWUX2; .

CALLWXO2; .

MOVLW.2;

CALLX4;8 .

MOVFWPORTA;

MOVWFTEMP; .

BTFSSTEMP,DS2;

BCFSTATUS,0; .

BTFSCTEMP,DS2;

BSFSTATUS,0; .

RRFLSBH,1; .

MOVLW.12; 60 .

CALLX4;

DECFSZCOUN,1; .

GOTOPRI2; .

BSFINTCON,7; .

RETURN;.

;==========================================

; 13. DS2.

;==========================================

POSIL2

BCFINTCON,7; .

MOVWFTEMP; .

MOVLW.8; .

MOVWFCOUN;

POSI2

RRFTEMP,1; .

BTFSSSTATUS,0; ,

GOTOW0_2; .

GOTOW1_2; .

POS2

DECFSZCOUN,1; .

GOTOPOSI2; .

BSFINTCON,7; .

RETURN;.

W0_2

CALLWUX2; .

MOVLW.15; 60 .

CALL X4;

CALLWXO2; = 1 .

GOTOPOS2;.

W1_2

CALLWUX2; .

CALLWXO2; = 1 .

MOVLW.15; 60 .

CALLX4;

GOTOPOS2;.

;==================================

; 14. 2.

;==================================

CXET2

BTFSCFLAG1,6; .

GOTO$+3;

BSFFLAG1,6; .

RETURN;

BCFFLAG1,3; .

BTFSCLSBH,3; ,

BSFFLAG1,3; .

BTFSSFLAG1,3; ,

GOTO$+7; .

COMFLSB,1;

COMFLSBH,1; .

BCFSTATUS,0;

INCFLSB,1; .

BTFSCSTATUS,0; ,

INCFLSBH,1; .

MOVFWLSB; .

ANDLWB'00001111';.

CALLDESATI; .

MOVWFDST2; .

MOVLW.4; 4

MOVWFCOUN;

BCFSTATUS,0; .

RRFLSBH,1;

RRFLSB,1;

DECFSZCOUN,1;

GOTO$-4;

MOVLW.251; .

MOVWFSOT2;

BTFSSFLAG1,3; ,

GOTO$+3;

MOVLW.253;.

MOVWFSOT2;

;======================================================

; 15. 2.

;======================================================

MAXZ2

MOVFWSOT2;

SUBWFSOT2X,0; ,

SKPZ; .

GOTO$+5;

BTFSSFLAG1,3; ,

GOTOCOPL2X; .

BTFSCFLAG1,3; ,

GOTOCOMI2X; .

SKPNC; (+) ,

GOTOCOXP2X; .

MINZ2

MOVFWSOT2;

SUBWFSOT2N,0; ,

SKPZ; .

GOTO$+5;

BTFSCFLAG1,3; ,

GOTOCOPL2N; .

BTFSSFLAG1,3; ,

GOTOCOMI2N; .

SKPC; (-) ,

GOTOCOXP2N; .

GOTOBDIN2; .

;===================================

; 16. MAX 2.

;===================================

COPL2X

MOVFWLSB2X;

SUBWFLSB,0; ,

BTFSSSTATUS,0; .

GOTOMINZ2; .

BTFSSSTATUS,2; ,

GOTO$+5;

MOVFWDST2X; .

SUBWFDST2,0;

BTFSSSTATUS,0; , .

GOTOMINZ2; , .

COXP2X

BTFSSFLAG1,3;-0 .

GOTO$+4;

TSTFLSB;

BZMINZ2;

MOVFWSOT2;.

MOVWFSOT2X;

MOVFWLSB;

MOVWFLSB2X;

MOVFWDST2; .

MOVWFDST2X;

MOVFWMIN;

MOVWFMIN2X;

MOVFWHOU;

MOVWFHOU2X; .

BTFSCFLAG1,3;

BSFFLAG2,3; .

BTFSSFLAG1,3;

BCFFLAG2,3;

GOTOMINZ2; .

COMI2X

MOVFWLSB2X;

SUBWFLSB,0; ,

BTFSCSTATUS,2;

GOTO$+3; .

BTFSSSTATUS,0; ,

GOTOCOXP2X; .

MOVFWDST2X; .

SUBWFDST2,0;

BTFSCSTATUS,0; ,

GOTOMINZ2; .

GOTOCOXP2X; .

;===================================

; 17. MIN 2.

;===================================

COPL2N

MOVFWLSB2N;

SUBWFLSB,0; ,

BTFSSSTATUS,0; .

GOTOBDIN2;.

BTFSSSTATUS,2; ,

GOTO$+5;

MOVFWDST2N; .

SUBWFDST2,0;

BTFSSSTATUS,0; , .

GOTOBDIN2;.

COXP2N

BTFSSFLAG1,3;-0 .

GOTO$+4;

TSTFLSB;

BZBDIN2;

MOVFWSOT2; .

MOVWFSOT2N;

MOVFWLSB;

MOVWFLSB2N;

MOVFWDST2; .

MOVWFDST2N;

MOVFWMIN;

MOVWFMIN2N;

MOVFWHOU;

MOVWFHOU2N; .

BTFSCFLAG1,3;

BSFFLAG2,4; .

BTFSSFLAG1,3;

BCFFLAG2,4;

GOTOBDIN2;.

COMI2N

MOVFWLSB2N;

SUBWFLSB,0; ,

BTFSCSTATUS,2;

GOTO$+3;

BTFSSSTATUS,0; .

GOTOCOXP2N; .

MOVFWDST2N; .

SUBWFDST2,0;

BTFSCSTATUS,0; ,

GOTOBDIN2;

GOTOCOXP2N; .

;==================================

; 18. , 4.

;==================================

X4

ADDLW-1;

BTFSSSTATUS,2;

GOTO$-2;

RETURN;

;=========================================

; 19. DS1.

;=========================================

INIDS1

CALLHYL1;.

MOVLW0xCC;.

CALLPOSIL1;.

MOVLW0x4E; 0,1 .

CALLPOSIL1;.

MOVLW0x7D; +125. .

CALLPOSIL1;.

MOVLW0x77; -55. .

CALLPOSIL1;.

MOVLW0x7F; 11 = 0,1 .

CALLPOSIL1;.

CALLHYL1; .

MOVLW0xCC; DS.

CALLPOSIL1;.

MOVLW0x44; .

CALLPOSIL1;.

MOVLW.3; 0,75 .

MOVWFCOUN; 750 .

SPLU1

MOVLW.255

MOVWF TEMP

PLUS1

MOVLW .255

ADDLW -1

BTFSS STATUS,2

GOTO $-2

DECFSZ TEMP,1

GOTO PLUS1

DECFSZCOUN,1

GOTOSPLU1

GOTOPRIEM1;.

HYL1

CALLWUX1;.

MOVLW.125;

ADDLW-1;= 500 .

BTFSSSTATUS,2;

GOTO$-2;

CALLWXO1;.

MOVLW.125; =

ADDLW-1;500 .

BTFSSSTATUS,2;

GOTO$-2;

RETURN

;=======================================

; 20. /.

;=======================================

WUX1

BCFPORTA,DS1;

BSFSTATUS,5; 1.

BCFTRISA^80H,DS1; .

BCFSTATUS,5; 0.

RETURN

WXO1

BSFSTATUS,5; 1.

BSFTRISA^80H,DS1; .

BCFSTATUS,5; 0.

RETURN

;====================================

; 21. 16 DS1.

;====================================

PRIEM1

CALLHYL1; .

MOVLW0xCC; .

CALLPOSIL1;.

MOVLW0xBE; .

CALLPOSIL1;.

BCFINTCON,7; .

CALL PRIE1; .

MOVFWLSBH;

MOVWFLSB; .

BCFINTCON,7; .

CALLPRIE1; .

GOTOCXET1; .

PRIE1

MOVLW.8

MOVWFCOUN; .

CLRFLSBH; .

PRI1

CALLWUX1; .

CALLWXO1; .

MOVLW.2;

CALLX4;8 .

MOVFWPORTA;

MOVWFTEMP; .

BTFSSTEMP,DS1;

BCFSTATUS,0; .

BTFSCTEMP,DS1;

BSFSTATUS,0; .

RRFLSBH,1; .

MOVLW.12; 60 .

CALLX4;

DECFSZCOUN,1; .

GOTOPRI1; .

BSFINTCON,7; .

RETURN;.

;==========================================

; 22. DS1.

;==========================================

POSIL1

BCFINTCON,7; .

MOVWFTEMP; .

MOVLW.8; .

MOVWFCOUN;

POSI1

RRFTEMP,1; .

BTFSSSTATUS,0; ,

GOTOW0_1; .

GOTOW1_1; .

POS1

DECFSZCOUN,1; .

GOTOPOSI1; .

BSFINTCON,7; .

RETURN;.

W0_1

CALLWUX1; .

MOVLW.15; 60 .

CALL X4;

CALLWXO1; = 1 .

GOTOPOS1;.

W1_1

CALLWUX1; .

CALLWXO1; = 1 .

MOVLW.15; 60 .

CALLX4;

GOTOPOS1;.

;==================================

; 23. 1.

;==================================

CXET1

BTFSCFLAG1,4; .

GOTO$+3;

BSFFLAG1,4;

RETURN;

BCFFLAG1,3; .

BTFSCLSBH,3; ,

BSFFLAG1,3; .

BTFSSFLAG1,3; ,

GOTO$+7; .

COMFLSB,1;

COMFLSBH,1; .

BCFSTATUS,0;

INCFLSB,1; .

BTFSCSTATUS,0; ,

INCFLSBH,1; .

MOVFWLSB; .

ANDLWB'00001111';.

CALLDESATI; .

MOVWFDST1; .

MOVLW.4; 4

MOVWFCOUN;

BCFSTATUS,0; .

RRFLSBH,1;

RRFLSB,1;

DECFSZCOUN,1;

GOTO$-4;

MOVLW.251; .

MOVWFSOT1;

BTFSSFLAG1,3; ,

GOTO$+3;

MOVLW.253;.

MOVWFSOT1;

;======================================================

; 24. 1.

;======================================================

MAXZ

MOVFWSOT1; ,

SUBWFSOT1X,0;

SKPZ; .

GOTO$+5;

BTFSSFLAG1,3; ,

GOTOCOPL1X; .

BTFSCFLAG1,3; ,

GOTOCOMI1X; .

SKPNC; (+) ,

GOTOCOXPX; .

MINZ

MOVFWSOT1; ,

SUBWFSOT1N,0;

SKPZ; .

GOTO$+5;

BTFSCFLAG1,3; ,

GOTOCOPL1N; .

BTFSSFLAG1,3; ,

GOTOCOMI1N; .

SKPC; (-) ,

GOTOCOXPN; .

GOTOBDIN1; .

;===================================

; 25. MAX 1.

;===================================

COPL1X

MOVFWLSB1X;

SUBWFLSB,0; ,

BTFSSSTATUS,0; .

GOTOMINZ;.

BTFSSSTATUS,2; ,

GOTO$+5;

MOVFWDST1X; .

SUBWFDST1,0;

BTFSSSTATUS,0; , .

GOTOMINZ; .

COXPX

BTFSSFLAG1,3;-0 .

GOTO$+4;

TSTFLSB;

BZMINZ;

MOVFWSOT1; .

MOVWFSOT1X;.

MOVFWLSB;

MOVWFLSB1X;

MOVFWDST1; .

MOVWFDST1X;

MOVFWMIN;

MOVWFMIN1X;.

MOVFWHOU;

MOVWFHOU1X;.

BTFSCFLAG1,3;

BSFFLAG,0; .

BTFSSFLAG1,3;

BCFFLAG,0;

GOTOMINZ; .

COMI1X

MOVFWLSB1X;

SUBWFLSB,0; ,

BTFSCSTATUS,2; .

GOTO$+3;

BTFSSSTATUS,0; ,

GOTOCOXPX;

MOVFWDST1X; .

SUBWFDST1,0;

BTFSCSTATUS,0; ,

GOTOMINZ; .

GOTOCOXPX; .

;===================================

; 26. MIN 1.

;===================================

COPL1N

MOVFWLSB1N;

SUBWFLSB,0; ,

BTFSSSTATUS,0; .

GOTOBDIN1;.

BTFSSSTATUS,2; ,

GOTO$+5;

MOVFWDST1N; .

SUBWFDST1,0;

BTFSSSTATUS,0; , .

GOTOBDIN1; .

COXPN

BTFSSFLAG1,3;-0 .

GOTO$+4;

TSTFLSB;

BZBDIN1;

MOVFWSOT1; .

MOVWFSOT1N;.

MOVFWLSB;

MOVWFLSB1N;

MOVFWDST1; .

MOVWFDST1N;

MOVFWMIN;

MOVWFMIN1N;.

MOVFWHOU;

MOVWFHOU1N;.

BTFSCFLAG1,3;

BSFFLAG,1; .

BTFSSFLAG1,3;

BCFFLAG,1;

GOTOBDIN1; .

COMI1N

MOVFWLSB1N;

SUBWFLSB,0; ,

BTFSCSTATUS,2;

GOTO$+3; .

BTFSSSTATUS,0; ,

GOTOCOXPN;

MOVFWDST1N; .

SUBWFDST1,0;

BTFSCSTATUS,0; ,

GOTOBDIN1;

GOTOCOXPN; .

;=======================================

; 27. 1 2- 2_10.

;=======================================

BDIN1

CALLPERZAP; .

MOVFWLSB;

GOTOBZT1;

BDIN2

CALLPERZAP; .

MOVFWLSB;

GOTOBZT2;

PERZAP

MOVFWHOU1X;

MOVWFHOUZ1X; .

MOVFWMIN1X

MOVWFMINZ1X

MOVFWHOU1N

MOVWFHOUZ1N

MOVFWMIN1N

MOVWFMINZ1N

MOVFWHOU2X

MOVWFHOUZ2X

MOVFWMIN2X

MOVWFMINZ2X

MOVFWHOU2N

MOVWFHOUZ2N

MOVFWMIN2N

MOVWFMINZ2N

MOVFWLSB1X

MOVWFLSBZ1X

MOVFWDST1X

MOVWFDSTZ1X

MOVFWLSB1N

MOVWFLSBZ1N

MOVFWDST1N

MOVWFDSTZ1N

MOVFWLSB2X

MOVWFLSBZ2X

MOVFWDST2X

MOVWFDSTZ2X

MOVFWLSB2N

MOVWFLSBZ2N

MOVFWDST2N

MOVWFDSTZ2N

RETURN

BDINZ1

BTFSCFLAG1,1; 2 ,

GOTOBDINZ2; 2 .

MOVFWLSBZ1X; - 1 1 .

CALLBZT1;

MOVFWDSTZ1X;

MOVWFDST1;

MOVFWLSBZ1N; - 2 1 .

CALLBZT2;

MOVFWDSTZ1N;

MOVWFDST2;

MOVFWHOUZ1X; 1.

CALLHZ67;

MOVFWMINZ1X; 1.

CALLMZ910;

MOVFWSOT1X;.

MOVWFR12;

RETURN;

BDIN12

BTFSCFLAG1,1; 2 ,

GOTOBDIN22; 2 .

MOVFWHOUZ1N; 1 2 .

CALLHZ67; 1.

MOVFWMINZ1N; 1.

CALLMZ910;

MOVFWSOT1N;.

MOVWFR12;

RETURN;

BDIN22

MOVFWHOUZ2N; 2 2 .

CALLHZ67; 2.

MOVFWMINZ2N; 2.

CALLMZ910;

MOVFWSOT2N;.

MOVWFR12;

RETURN;

BDINZ2

MOVFWLSBZ2X; 2 .

CALLBZT1; - 1 .

MOVFWDSTZ2X;

MOVWFDST1;

MOVFWLSBZ2N;

CALLBZT2; - 2

MOVFWDSTZ2N;

MOVWFDST2;

MOVFWHOUZ2X; 2.

CALLHZ67;

MOVFWMINZ2X; 2.

CALLMZ910;

MOVFWSOT2X;.

MOVWFR12;

RETURN; .

BZT1

MOVWFTEMP; 2- 2_10-.

CALLBIDE; 99!

MOVWFDES1; .

MOVFWTEMP;

MOVWFEDI1;

RETURN;

BZT2

MOVWFTEMP; 2- 2_10-.

CALLBIDE; 99!

MOVWFDES2; .

MOVFWTEMP;

MOVWFEDI2;

RETURN;

HZ67

MOVWFTEMP; 2- 2_10-.

CALLBIDE; 99!

MOVWFR6;6 7 .

MOVFWTEMP;.

MOVWFR7;

RETURN;

MZ910

MOVWFTEMP; 2- 2_10-.

CALLBIDE; 99!

MOVWFR9;9 10 .

MOVFWTEMP;.

MOVWFR10;

RETURN;

;======================

; 28. .

;======================

INIT

BCFSTATUS,6;

BSFSTATUS,5; 1.

MOVLWB'00000011'; , =16 ...11,

MOVWFOPTION_REG^80H; .

MOVLWB'10100000'; .

MOVWFINTCON;

MOVLWB'00100000';RA5 - .

MOVWFTRISA^80H

MOVLWB'00000011';RB0, RB1 - .

MOVWFTRISB^80H

CLRFVRCON^80H; .

CLRFPIE1^80H;

BCFSTATUS,5; 0.

CLRFPORTA;

CLRFPORTB

CLRFT1CON;

CLRFT2CON;

MOVLW7

MOVWFCMCON; .

CLRFTMR0

CLRFFLAG

CLRFFLAG1

CLRFFLAG2

BSFFLAG2,0; ,

CLRFCEK

CLRFMIN

CLRFHOU

CLRFHOUL

CLRFHOUH

CLRFMINL

CLRFMINH

CLRFREID

CLRFKYPC

CLRFCOUN

CLRFCOUZ

CLRFCOUE

CLRFCOYC

CLRFMCK;.

CLRFEDI2; 2.

CLRFDES2; 2.

CLRFDST2; 2.

CLRFEDI1; 1.

CLRFDES1; 1.

CLRFDST1; 1.

CLRFMECDI; .

CLRFDHUDI; .

CLRFMECD; .

CLRFDHUD; .

MOVLW.253;-

MOVWFSOT1; 1.

MOVWFSOT2; 2.

MOVWFSOT2X; 2 MAX.

MOVWFSOT1X; 1 MAX.

MOVLW.251;+

MOVWFSOT1N; 1 MIN.

MOVWFSOT2N; 2 MIN.

MOVLW.1

MOVWFDHU; .

MOVWFDHUE; .

MOVWFMEC; .

MOVWFMECE; .

MOVWFMECEI; .

MOVWFMECZ; /.

MOVWFDHUEI; .

MOVWFDHUZ; /.

CALLPOLNO; .

GOTOJEKINI; .

;=======================================

; 29. , .

;=======================================

YC0

INCFHOUH,1; .

MOVLW.3; 2.

SUBWFHOUH,0;

SKPNC;

CLRFHOUH; , .

MOVFWHOUH;

CALLDEBIN; .

ADDWFHOUL,0;

MOVWFHOU; .

RETURN;.

YC1

INCFHOUL,1; .

MOVLW.10; 9.

SUBWFHOUL,0;

SKPNC;

CLRFHOUL; , .

MOVFWHOUH;

CALLDEBIN; .

ADDWFHOUL,0;

MOVWFHOU;

ADDLW-18H; - 24.

SKPC; 24,

RETURN

CLRFHOU;

CLRFHOUL;

CLRFHOUH; .

RETURN

YC2

INCFMINH,1; .

MOVLW.6; 5.

SUBWFMINH,0;

SKPNC; 6,

CLRFMINH; .

MOVFWMINH;

CALLDEBIN; .

ADDWFMINL,0;

MOVWFMIN; .

RETURN

YC3

INCFMINL,1; .

MOVLW.10; 9.

SUBWFMINL,0;

SKPNC; 10,

CLRFMINL; .

MOVFWMINH;

CALLDEBIN; .

ADDWFMINL,0;

MOVWFMIN; .

RETURN

YC4

INCFDHUD,1; .

MOVLW.4; 3.

SUBWFDHUD,0;

SKPNC;

CLRFDHUD; , .

MOVFWDHUD;

CALLDEBIN; .

ADDWFDHUE,0;

MOVWFDHU; .

MOVFWMEC;

CALLDAYMON; ,

SUBWFDHU,0;

SKPC;

GOTO$+4;

MOVLW.1;

MOVWFDHUE;

GOTO$-0x0B; .

TSTFDHU; ,

BZ$-5; .

MOVFWDHUD;

MOVWFDHUDI;.

MOVFWDHUE;

MOVWFDHUEI;

RETURN;.

YC5

INCFDHUE,1; .

MOVLW.10; 9.

SUBWFDHUE,0;

SKPNC;

CLRFDHUE; , .

MOVFWDHUD;

CALLDEBIN; .

ADDWFDHUE,0;

MOVWFDHU; .

MOVFWMEC;

CALLDAYMON; ,

SUBWFDHU,0;

SKPC;

GOTO$+5;

CLRFDHUD; ,

MOVLW.1;

MOVWFDHUE;

GOTO$-0x0C; .

TSTFDHU; ,

BZ$-5; , .

MOVFWDHUD;

MOVWFDHUDI;.

MOVFWDHUE;

MOVWFDHUEI;

RETURN;.

YC6

INCFMECD,1; .

MOVLW.2; 1.

SUBWFMECD,0;

SKPNC;

CLRFMECD; , .

MOVFWMECD;

CALLDEBIN; .

ADDWFMECE,0;

MOVWFMEC; .

MOVLW.13; 12.

SUBWFMEC,0;

SKPC;

GOTO$+5;

CLRFMECD; , .

MOVLW.1; .

MOVWFMECE;

GOTO$-0x0C;

TSTFMEC; ,

BZ$-5; .

MOVFWMECD;

MOVWFMECDI;.

MOVFWMECE;

MOVWFMECEI;

RETURN;.

YC7

INCFMECE,1; .

MOVLW.10; 9.

SUBWFMECE,0;

SKPNC;

CLRFMECE; , .

MOVFWMECD;

CALLDEBIN; .

ADDWFMECE,0;

MOVWFMEC; .

MOVLW.13; 12.

SUBWFMEC,0;

SKPC;

GOTO$+5;

CLRFMECD; , .

MOVLW.1; .

MOVWFMECE;

GOTO$-0x0C;

TSTFMEC; ,

BZ$-5; .

MOVFWMECD;

MOVWFMECDI;.

MOVFWMECE;

MOVWFMECEI;

RETURN;.

YC8M

DECFDHUEI,1; .

MOVLW.255; 0,

SUBWFDHUEI,0;

BNC$+8;

MOVLW.9; 9.

MOVWFDHUEI;

DECFDHUDI,1;

MOVLW.255; 0,

SUBWFDHUDI,0;

SKPC;

GOTOYC8COY; .

MOVFWDHUEI;

ADDWFDHUDI,0; ,

SKPZ

GOTOYC8COY; .

DECFMECZ,1; .

SKPZ; ,

GOTO$+3;

MOVLW.12; .

MOVWFMECZ;

MOVFWMECZ; .

CALLDAYMON;

MOVWFDHUDI; .

MOVWFTEMP; 2- 2_10-.

CALLBIDE; 99!

MOVWFDHUDI;

MOVFWTEMP;

MOVWFDHUEI;

MOVFWMECZ; .

MOVWFTEMP; 2- 2_10-.

CALLBIDE; 99!

MOVWFMECDI;

MOVFWTEMP;

MOVWFMECEI; 1 ,

GOTOYC8M; .

YC8COY

INCFCOYC,1; .

MOVLW.8; 7.

SUBWFCOYC,0;

SKPC;

GOTOYC8COU; .

CLRFCOYC; .

CALLREGIN; .

BCFFLAG2,6; .

GOTOYC8M; .

YC8COU

BSFFLAG2,5; .

BTFSCFLAG2,6; ,

GOTO$+0x09;

CLRFCOYC;

MOVLW.16; .

SUBWFCOUZ,0;

MOVWFCOUE; 16.

BNC$+7; 0, .112.

BSFFLAG2,6; .

RETURN;.

MOVLW.16;

SUBWFCOUE,1; 16.

SKPNC; 0,

RETURN

MOVLW.112; .112.

MOVWFCOUE;

BSFFLAG2,6; .

RETURN

YC00

CLRFMIN;

CLRFMINL;

CLRFMINH;

CLRFCEK; .

RETURN

;======================================================

; 30. .

;======================================================

REGIN

MOVFWMECD;

MOVWFMECDI;

MOVFWMECE;

MOVWFMECEI;

MOVFWDHUD;

MOVWFDHUDI;

MOVFWDHUE;

MOVWFDHUEI;

MOVFWMEC;

MOVWFMECZ;

RETURN

;=============================================

; 31. MAX, MIN .

;=============================================

POLNO

MOVLW.253;-

MOVWFSOT1X; 1 MAX.

MOVWFSOT2X; 2 MAX.

MOVLW.55;-55.

MOVWFLSB1X; 1 .

MOVWFLSB2X;-"- 2 .

CLRFDST1X; 1 .

CLRFDST2X;-"- 2 .

MOVLW.251;+

MOVWFSOT1N; 1 MIN.

MOVWFSOT2N; 2 MIN.

MOVLW.99;+99.

MOVWFLSB1N; 1 .40

MOVWFLSB2N;-"- 2 .

MOVLW.9;0,9

MOVWFDST1N; 1 .

MOVWFDST2N;-"- 2 .

RETURN

;=========================================

; 32. .

;=========================================

JEKINI

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW10;.

CALLJEKOM;

CALLSTROB;

MOVLW06;.

CALLJEKOM;

CALLSTROB;

MOVLW01;.

CALLJEKOM;

CALLSTROB;

MOVLW28;: 4 ., 57, 2 .

CALLJEKOM;

CALLSTROB;

MOVLW0C;, .

CALLJEKOM;

CALLSTROB;

GOTOMYLTIK;.

;=========================================

; 33. .

;=========================================

STROB

BSF PORTB,E ; -.

NOP

BCF PORTB,E ; .

RETURN ;.

;===============================================

; 34. .

;===============================================

JEKOM

MOVWF TEMP ; .

ANDLW B'11110000'; .

MOVWF PORTB ; "".

CALL STROB ;.

CALL PAUSA ;.

MOVFW TEMP

SWAPF TEMP,W ; .

ANDLW B'11110000'; .

MOVWF PORTB ; "".

CALL STROB ;.

PAUSA

MOVLW .255;1 . .

ADDLW -1

BTFSS STATUS,2

GOTO $-2

RETURN

;=====================================

; 35. .

;=====================================

JEDAT

MOVWF TEMP; .

ANDLW B'11110000'; .

ADDLW 30; ASCII, !

MOVWF PORTB; "".

BSF PORTB,RS; R/S .

CALL STROB;.

CALL PAUS; .

MOVFW TEMP;

SWAPF TEMP,0; .

ANDLW B'11110000'; .

MOVWF PORTB; "".

BSF PORTB,RS; R/S .

CALL STROB;.

PAUS

MOVLW .10;40 . .

ADDLW -1

BTFSS STATUS,2

GOTO $-2

RETURN

;========================================

; 36. .

;========================================

CTP1

BTFSCFLAG2,0;

GOTOTEK1; .

BTFSCFLAG2,1;

GOTOINDYC1; .

GOTOCMOTP1;.

CTP2

BTFSCFLAG2,0;

GOTOTEK2; .

BTFSCFLAG2,1;

GOTOINDYC2; .

GOTOCMOTP2;.

TEK1

MOVFWDHUDI; 1 , .

MOVWFR1;

MOVFWDHUEI; .

MOVWFR2;

MOVLW.240;.

MOVWFR3;

MOVWFR9;

MOVFWHOUH; .

MOVWFR4;

MOVFWHOUL; .

MOVWFR5;

MOVLW.240;.

BTFSCCEK,0; 1 .

MOVLW.10;.

MOVWFR6;

MOVFWMINH; .

MOVWFR7;

MOVFWMINL; .

MOVWFR8;

MOVFWSOT1;.

MOVWFR10;

MOVFWDES1; 1.

MOVWFR11;

MOVFWEDI1; 1.

MOVWFR12;

MOVLW.252; 1.

MOVWFR13;

MOVFWDST1; 1.

MOVWFR14;

MOVLW.14;>.

MOVWFR15;

MOVLW.1;1.

MOVWFR16;

RETURN

TEK2

MOVFWMECDI; 2 , .

MOVWFR1;

MOVFWMECEI; .

MOVWFR2;

MOVLW.240;.

MOVWFR3;

MOVWFR4;

MOVWFR5;

MOVWFR6;

MOVWFR7;

MOVWFR8;

MOVWFR9;

MOVFWSOT2; 2.

MOVWFR10;

MOVFWDES2; 2.

MOVWFR11;

MOVFWEDI2; 2.

MOVWFR12;

MOVLW.252; 2.

MOVWFR13;

MOVFWDST2; 2.

MOVWFR14;

MOVLW.14;>.

MOVWFR15;

MOVLW.2;2.

MOVWFR16;

RETURN

INDYC1

BTFSSPORTA,HOL; "",

CALLYC00; .

MOVLW.123; 1 .

MOVWFR1;.

MOVLW.17;.

MOVWFR2;

MOVLW.19;.

MOVWFR3;

MOVLW.126;.

MOVWFR4;

MOVLW.240;.

MOVWFR5;

MOVWFR11;

MOVWFR12;

MOVWFR13;

MOVWFR14;

MOVWFR15;

MOVWFR16;

MOVFWHOUH; : ,

MOVWFR6;

MOVFWHOUL; .

MOVWFR7;

MOVLW.10;.

MOVWFR8;

MOVFWMINH; .

MOVWFR9;

MOVFWMINL; .

MOVWFR10;

RETURN

INDYC2

MOVLW.176;.

MOVWFR1;

MOVLW.17;.

MOVWFR2;

MOVLW.36;.

MOVWFR3;

MOVLW.17;.

MOVWFR4;

MOVLW.240;.

MOVWFR5;

MOVWFR11;

MOVWFR12;

MOVWFR13;

MOVWFR14;

MOVWFR15;

MOVWFR16;

MOVFWDHUDI;.

MOVWFR6;

MOVFWDHUEI;.

MOVWFR7;

MOVLW.253;.

MOVWFR8;

MOVFWMECDI; .

MOVWFR9;

MOVFWMECEI; .

MOVWFR10;

RETURN

CMOTP1

MOVFWDHUDI;

ADDWFDHUEI,0; ,

SUBWFDHU,0; .

SKPC;

GOTO$+5;

MOVFWMECDI;

ADDWFMECEI,0;

SUBWFMEC,0;

SKPNC;

CALLBDINZ1; 1 .

MOVFWDHUDI; .

MOVWFR1;

MOVFWDHUEI; .

MOVWFR2;

MOVLW.14;>.

MOVWFR3;

MOVLW.1;1.

BTFSCFLAG1,1; ,

MOVLW.2; - 2.

MOVWFR4;

MOVLW.240;.

MOVWFR5;

MOVWFR11;

MOVLW.253;.

MOVWFR8;

MOVFWDES1; .

MOVWFR13;

MOVFWEDI1; .

MOVWFR14;

MOVLW.252; 1.

MOVWFR15;

MOVFWDST1; .

MOVWFR16;

RETURN

CMOTP2

MOVFWDHUDI;

ADDWFDHUEI,0; ,

SUBWFDHU,0; .

SKPC;

GOTO$+5;

MOVFWMECDI;

ADDWFMECEI,0;

SUBWFMEC,0;

SKPNC;

CALLBDIN12; 2 .

MOVFWMECDI; .

MOVWFR1;

MOVFWMECEI; .

MOVWFR2;

MOVLW.240;.

MOVWFR3;

MOVWFR4;

MOVWFR5;

MOVWFR11;

MOVLW.253;.

MOVWFR8;

MOVFWDES2; 2.

MOVWFR13;

MOVFWEDI2; 2.

MOVWFR14;

MOVLW.252; 2.

MOVWFR15;

MOVFWDST2; 2.

MOVWFR16;

RETURN

;======================================================

; 37. .

;======================================================

JEKIND

BSFSTATUS,5; 1.

BCFTRISB^80H,YCMI; .

BCFTRISB^80H,YCPL; .

BCFSTATUS,5; 0.

BTFSSFLAG1,0; ,

GOTO$+3; .

BTFSSFLAG,6; , .

GOTO JEKYC; .

MOVLW 02; .

CALL JEKOM; .

MOVLW B'10000000'; 0 .

CALL JEKOM; .

CALLCTP1; 1 .

CALLJEKCTP; 1 .

MOVLW B'11000000'; . 0x0C0

CALL JEKOM; .

CALLCTP2; 2 .

CALLJEKCTP; 2 .

BCFFLAG,6;

RETURN

JEKCTP

MOVLW.16;

MOVWFCOUN; .

MOVLW R1; .

MOVWFFSR;

MOVFWINDF; .

CALL JEDAT; .

DECFCOUN,1; .

BTFSCSTATUS,2; ,

RETURN;

INCFFSR,1; .

GOTO$-6; .

;=======================================

; 38. .

;=======================================

KHOP

BSFSTATUS,5; 1.

BSFTRISB^80H,YCMI; .

BSFTRISB^80H,YCPL; .

BCFSTATUS,5; 0.

BTFSSFLAG1,0; ,

GOTOKHOP1; .

BTFSCFLAG2,2;

GOTO$+0x0D; .

BTFSCFLAG,3; ,

CALLYCTAL; .

BTFSSPORTB,YCPL; ,

BSFFLAG,3; .

BTFSSPORTB,YCPL; ,

BSFFLAG1,2; .

BTFSCFLAG,5; "",

CALLKYPCY; .

BTFSSPORTB,PAZ; "" ,

BSFFLAG,5; .

BTFSCFLAG2,1;

GOTOKHOP1; .

BTFSCFLAG,2; ,

CALLYCTAM; .

BTFSSPORTB,YCMI; ,

BSFFLAG,2; .

BTFSSPORTB,YCMI; ,

BSFFLAG1,2; .

KHOP1

BTFSSPORTB,PEJ; "" ,

BSFFLAG,4; .

BTFSSFLAG,4; "" ,

GOTOVUBOR; .

BTFSSPORTB,PEJ; "" ,

GOTOVUBOR; .

BCFFLAG,4; .

INCFREID,1; .

MOVLW.3;3 .

SUBWFREID,0; ,

BTFSSSTATUS,2; .

GOTOVUBOR; .

CLRFREID; .

GOTOVUBOR; .

;======================================================

; 39. .

;======================================================

PRER

MOVWFWTEMP; W

MOVFWSTATUS;STATUS,

MOVWFSTEMP;

MOVFWFSR;FSR.

MOVWFFTEMP;

CALLS1;

REPER ; .

MOVFWSTEMP; :

MOVWFSTATUS;STATUS,

MOVFWFTEMP;

MOVWFFSR;FSR,

MOVFWWTEMP;W.

BCFINTCON,2; TMR0.

RETFIE ; .

;=============================================

; 40. --.

;=============================================

S1

INCFMCK,1; 1 .

MOVFWMCK;

ADDLW-0x7D; 125.

BTFSSSTATUS,2;

RETURN;

CLRFMCK;.

BTFSCFLAG,7; 2.

GOTO$+3;

BSFFLAG,7;

RETURN;

BCFFLAG,7; .

MOVFWCEK; . .

ADDLW-3BH; 59.236:4=59-0x0EC;

BZM1; 0, , M1,

INCFCEK,1; 1 .

RETURN;

M1

CLRFCEK; .

MOVFWMIN; . .

ADDLW-3BH;-59.

BZH1; 0, , H1.

INCFMIN,1; 1 .

MOVFWMIN;MIN >W.

MOVWFTEMP;.

CALLBIDE;.

MOVWFMINH;W > .

MOVFWTEMP;

MOVWFMINL; .

RETURN;

H1

CLRFMIN; .

CLRFMINL; .

CLRFMINH; .

MOVFWHOU; . .

ADDLW-17H;- 23.

BZD1; 0, , H10.

INCFHOU,1; 1 .

MOVFWHOU;HOU >W.

MOVWFTEMP;

CALLBIDE;.

MOVWFHOUH;W > .

MOVFWTEMP;

MOVWFHOUL; .

RETURN;

D1

CLRFHOU; .

CLRFHOUL; .

CLRFHOUH; .

CALLSAPIS; .

CALLPOLNO; .

INCFDHU,1; 1 .

MOVFWMEC;

CALLDAYMON; .

SUBWFDHU,0;

SKPNC;

GOTOME1; .

MOVFWDHU;

MOVWFTEMP;

CALLBIDE;.

MOVWFDHUD;W > .

MOVFWTEMP;

MOVWFDHUE; .

RETURN;

ME1

MOVLW.1; .

MOVWFDHU;

MOVWFDHUE;

CLRFDHUD;

INCFMEC,1; .

MOVLW.13; 12.

SUBWFMEC,0;

SKPNC;

GOTOME1ME; , 1 .

MOVFWMEC;

MOVWFTEMP;

CALLBIDE;.

MOVWFMECD;W > .

MOVFWTEMP;

MOVWFMECE; .

RETURN;

ME1ME

MOVLW.1;1 .

MOVWFMEC;01-01.

MOVWFMECE;

CLRFMECD;

RETURN;

;=======================================

; 41. 2- 2_10.

;=======================================

BIDE;

CLRFCOUN; .

ADDLW-.10; 10.

BTFSSSTATUS,0; ,

GOTO$+4; .

MOVWFTEMP; .

INCFCOUN,1; .

GOTO$-5; .

MOVFWCOUN; ( ) .

RETURN;.

;================================

; 42. .

;================================

SAPIS

CALLPERZAP; .

BTFSCFLAG,0; .

BSFLSBZ1X,7;-

BTFSCFLAG,1;

BSFLSBZ1N,7;-

BTFSCFLAG2,3;

BSFLSBZ2X,7;-

BTFSCFLAG2,4;

BSFLSBZ2N,7;-

MOVLWHOUZ1X;

MOVWFFSR; .

MOVFWCOUZ; .

BSFSTATUS,5; 1.

MOVWFEEADR; .

BCFINTCON,7; .

CALLZAPIS; .

INCFEEADR,1; .

INCFFSR,1; .

BTFSSFSR,7; ,

GOTO$-4; .

BCFSTATUS,5; 0.

BSFINTCON,7; .

MOVLW.16;

ADDWFCOUZ,1; .

MOVLW.128; ,

SUBWFCOUZ,0;

SKPNC;

CLRFCOUZ; .

RETURN;.

ZAPIS

MOVFWINDF;

MOVWFEEDATA; .

BSF EECON1,WREN; .

MOVLW 55H;

MOVWF EECON2;/

MOVLW 0AAH;/

MOVWF EECON2;/

BSF EECON1,WR; .

BTFSC EECON1,WR;

GOTO $-1; .

BCF EECON1,WREN; .

RETURN;.

;=========================

; 43. .

;=========================

CXUTKA

MOVLWHOUZ1X;

MOVWFFSR; .

MOVFWCOUE; .

BSFSTATUS,5; 1.

MOVWFEEADR; .

BCFINTCON,7; .

CALLAKT; .

MOVWFINDF; .

INCFEEADR,1; .

INCFFSR,1; .

BTFSSFSR,7; ,

GOTO$-5; .

BCFSTATUS,5; 0.

BSFINTCON,7; .

MOVLW.251; .

MOVWFSOT1X;

BTFSSLSBZ1X,7; 7 .

GOTO$+4;

MOVLW.253;.

MOVWFSOT1X;

BCFLSBZ1X,7; .

MOVLW.251; .

MOVWFSOT1N;

BTFSSLSBZ1N,7;

GOTO$+4;

MOVLW.253;.

MOVWFSOT1N;

BCFLSBZ1N,7;

MOVLW.251; .

MOVWFSOT2X;

BTFSSLSBZ2X,7;

GOTO$+4;

MOVLW.253;.

MOVWFSOT2X;

BCFLSBZ2X,7;

MOVLW.251; .

MOVWFSOT2N;

BTFSSLSBZ2N,7;

GOTO$+4;

MOVLW.253;.

MOVWFSOT2N;

BCFLSBZ2N,7;

BCFFLAG2,5; .

RETURN

AKT

BSFEECON1,RD;.

BTFSCEECON1,RD;

GOTO$-1;

MOVLW.255; ,

SUBWFEEDATA,0; -0.

BTFSCSTATUS,Z;

CLRFEEDATA;, .. 255 .

MOVFWEEDATA; .

RETURN;.

;========================================

; 44. .

;========================================

MYLTIK

CALLKHOP; .

BTFSSFLAG2,0; ,

GOTOCMOTP; .

CALLJEKIND;.

BTFSSCEK,0; .

GOTO$-1;

CALLINIDS1; .

CALLKHOP; .

BTFSSFLAG2,0; ,

GOTOCMOTP; .

CALLJEKIND;.

BTFSCCEK,0; .

GOTO$-1;

CALLINIDS2; .

GOTOMYLTIK; .

CMOTP

BTFSCFLAG2,0; ,

GOTOMYLTIK; .

BTFSCFLAG2,5; .

CALLCXUTKA; .

BTFSCFLAG1,2; , .

GOTO$+4;

BTFSSFLAG,7; 0,5 .

GOTO$-1

CALLJEKIND; .

BTFSCFLAG,7; 0,5 .

GOTO$-1

CALLKHOP; .

GOTOCMOTP;

;========================================

END

;========================================

/
:
? : letsdoit777.blogspot.com
08:22:10 19 2016
9000 " "? : business1777.blogspot.com ! C !
22:41:45 28 2015

, :
Visual Basic
VISUAL BASIC 6 1. VISUAL BASIC 4 WINDOWS 1. 1. Visual Basic ...
(Object Browser) , Visual Basic
:
: : 3785 : 2
: 1 : 4 :    
( )
1. 2. Windows ...
, , , .
, .
:
: : 11676 : 2
: 2 : 2.5 :    
.. ...
... ( ) ( ), - ...
, , , .
: ,
: : 8271 : 3
: 1 : 5 :    
...
_ " ...
/ IN, OUT (. 1). /, ...
EEPROM / EEAR ( ), EEDR ( ) EECR ( ).
: ,
: : 4518 : 2
: 5 : 3.8 :    
...
, , , ...
, , , .
: ,
: : 2879 : 2
: 0 : 0 :    
18.10.2010 . , , : - ...
, .
- , , , , .
: ,
: : 3793 : 6
: 11 : 4.5 : 5    
- ...
16 , (4 , 2 - , 2 - , 2 - , 2 - , 2 - , 2 - ...
/ return ; - " "
: ,
: : 979 : 2
: 1 : 5 :    
,
№ 1 . - ...
8- ( ) .
" " , .
: ,
: : 23285 : 3
: 1 : 4 :    
EXE ( ...
: EXE- . ...
cs, eip/ip;
D DS:00 DSEG D SS:00 .
: ,
: : 913 : 2
: 2 : 5 :    
.. . , , 2006, .75, .6. - 8 . 3 ...
(), ( , ...
; movlw 0 ; W 0 ( ).
: ,
: : 1171 : 2
: 0 : 0 :    

, : (1179)



, ?

, .
, .
, .
, .
, .



(151301)
(1844)
Copyright 2005-2016 BestReferat.ru bestreferat@mail.ru

@Mail.ru