Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MPLAB IDE v 7.20 Problem

Status
Not open for further replies.

nck

Newbie level 6
Joined
May 5, 2007
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,646
Hello,
I have found some problem in MPLAB IDE v 7.20 .In my assembly program ,I found message reported that as follow:
Message[306] E:\MY BACKUP\EG.ASM 2959 : Crossing page boundary -- ensure page bits are set.
And the program doesn't operate ,So how to solve this problem. Can anyone help me!
Thanks
 

blueroomelectronics

Advanced Member level 5
Joined
Sep 17, 2006
Messages
1,686
Helped
179
Reputation
356
Reaction score
77
Trophy points
1,328
Location
Toronto, Canada
Activity points
8,700
Why would you blame an error in your code on MPLAB? MPLAB is pointing out an error (actually it's a warning) that you may be crossing a 2K page boundary.
Your program wont run if its got bugs, and we can't fix the bugs in your program if we cant see the program, schematic etc...
 

nck

Newbie level 6
Joined
May 5, 2007
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,646
Hello ;
I have tried to solve my program error for one week.But I didn't find any answer and I can't solve this error.My program is very simple LED display patterns.I construct simple program and use PIC 16F648A .But I found my main loop didn't work well and so I divide my main loop to two loop(LOOPA & LOOPB) but it doesn't work well.
I attch my prgram.Please how to solve this error.

Added after 55 minutes:

Hi;
Sorry I try to attach my program but it doesn't . So i describe as follow: Thank a lot.

:cry:

LIST P=16F648A,R=DEC
INCLUDE <P16F648A.INC>
__CONFIG H'3F12'

ERRORLEVEL-302
#DEFINE BANK0 BCF STATUS,5
#DEFINE BANK1 BSF STATUS,5


CBLOCK H'20'
COUNT
WAIT1
WAIT2
STORE1
STORE2
STORE3
STORE4
STORE5
WAIT
WAIT3
WAIT4
ENDC


ORG 0
GOTO 5
ORG 4
GOTO 5


MOVLW 7
MOVWF CMCON


SETUP BANK1
CLRF TRISA
CLRF TRISB
CLRF WAIT1

BANK0
CLRF PORTB
CLRF COUNT


LOOPA
CLRF PORTA
CLRF PORTB

MOVLW 8 ;<1>
MOVWF WAIT1

LOOP001
BSF PORTB,0
CALL DELAY41
BSF PORTB,2
CALL DELAY41
BSF PORTB,4
CALL DELAY41
BSF PORTB,6
CALL DELAY41

BCF PORTB,1
CALL DELAY41
BCF PORTB,3
CALL DELAY41
BCF PORTB,5
CALL DELAY41
BCF PORTB,7
CALL DELAY41

BSF PORTB,1
CALL DELAY41
BSF PORTB,3
CALL DELAY41
BSF PORTB,5
CALL DELAY41
BSF PORTB,7
CALL DELAY41

BCF PORTB,0
CALL DELAY41
BCF PORTB,2
CALL DELAY41
BCF PORTB,4
CALL DELAY41
BCF PORTB,6
CALL DELAY41
CALL DELAY101

DECFSZ WAIT1,F
GOTO LOOP001

;*********
MOVLW 20
MOVWF WAIT3

LOOP002
MOVLW 1
MOVWF WAIT1
CLRF PORTB
LOOPDL1
MOVLW B'01010101'
MOVWF PORTB

MOVLW B'11111110'
MOVWF PORTA
CALL DELAY101

MOVLW B'11111100'
MOVWF PORTA
CALL DELAY101

MOVLW B'11111000'
MOVWF PORTA
CALL DELAY101

MOVLW B'11110000'
MOVWF PORTA
CALL DELAY101

CLRF PORTB
CALL DELAY101

DECFSZ WAIT1,F
GOTO LOOPDL1

CALL DELAY101
MOVLW 1
MOVWF WAIT1
CLRF PORTB

LOOPDL2
MOVLW B'10101010'
MOVWF PORTB

MOVLW B'11110111'
MOVWF PORTA
CALL DELAY101

MOVLW B'11110011'
MOVWF PORTA
CALL DELAY101

MOVLW B'11110001'
MOVWF PORTA
CALL DELAY101

MOVLW B'11110000'
MOVWF PORTA
CALL DELAY101

CLRF PORTB
CALL DELAY101

DECFSZ WAIT1,F
GOTO LOOPDL2

DECFSZ WAIT3,F
GOTO LOOP002

;*********
MOVLW 20
MOVWF WAIT3
LOOP003 ; <3>
MOVLW 40
MOVWF WAIT1

LOOPSS1
MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH1

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00000001'
CALL ATTACH1

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH1

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00000001'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPSS1
MOVLW 40
MOVWF WAIT1

LOOPSS2

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000100'
CALL ATTACH1

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00001000'
CALL ATTACH1

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00000100'
CALL ATTACH1

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00001000'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPSS2

MOVLW 40
MOVWF WAIT1

LOOPSS3
MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00100000'
CALL ATTACH1

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00010000'
CALL ATTACH1

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00100000'
CALL ATTACH1

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00010000'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPSS3

MOVLW 40
MOVWF WAIT1

LOOPSS4
MOVLW B'11110111'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH1

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'10000000'
CALL ATTACH1

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH1

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'10000000'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPSS4

DECFSZ WAIT3,F
GOTO LOOP003

;**********

CLRF PORTA
MOVLW 4 ;[4]
MOVWF WAIT1
LOOP004
MOVLW B'00000001'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'00000100'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'01000000'
CALL ON1

MOVLW B'10000001'
CALL ON1

MOVLW B'10000010'
CALL ON1

MOVLW B'10000100'
CALL ON1

MOVLW B'10001000'
CALL ON1

MOVLW B'10010000'
CALL ON1

MOVLW B'10100000'
CALL ON1

MOVLW B'11000000'
CALL ON1

MOVLW B'11000001'
CALL ON1

MOVLW B'11000010'
CALL ON1

MOVLW B'11000100'
CALL ON1

MOVLW B'11001000'
CALL ON1

MOVLW B'11010000'
CALL ON1

MOVLW B'11100000'
CALL ON1

MOVLW B'11100001'
CALL ON1

MOVLW B'11100010'
CALL ON1

MOVLW B'11100100'
CALL ON1

MOVLW B'11101000'
CALL ON1

MOVLW B'11110000'
CALL ON1

MOVLW B'11110001'
CALL ON1

MOVLW B'11110010'
CALL ON1

MOVLW B'11110100'
CALL ON1

MOVLW B'11111000'
CALL ON1

MOVLW B'11111001'
CALL ON1

MOVLW B'11111010'
CALL ON1

MOVLW B'11111100'
CALL ON1

MOVLW B'11111101'
CALL ON1

MOVLW B'11111111'
CALL ON1
;MOVE ONE BY ONE FORWARD

MOVLW B'11111110'
CALL ON1

MOVLW B'11111101'
CALL ON1

MOVLW B'11111100'
CALL ON1

MOVLW B'11111010'
CALL ON1

MOVLW B'11111001'
CALL ON1

MOVLW B'11111000'
CALL ON1

MOVLW B'11110100'
CALL ON1

MOVLW B'11110001'
CALL ON1

MOVLW B'11110000'
CALL ON1

MOVLW B'11101000'
CALL ON1

MOVLW B'11100100'
CALL ON1

MOVLW B'11100010'
CALL ON1

MOVLW B'11100001'
CALL ON1

MOVLW B'11100000'
CALL ON1

MOVLW B'11010000'
CALL ON1

MOVLW B'11001000'
CALL ON1

MOVLW B'11000100'
CALL ON1

MOVLW B'11000010'
CALL ON1

MOVLW B'11000001'
CALL ON1

MOVLW B'11000000'
CALL ON1

MOVLW B'10100000'
CALL ON1

MOVLW B'10010000'
CALL ON1

MOVLW B'10001000'
CALL ON1

MOVLW B'10000100'
CALL ON1

MOVLW B'10000010'
CALL ON1

MOVLW B'10000001'
CALL ON1

MOVLW B'10000000'
CALL ON1

MOVLW B'01000000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00000100'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'00000001'
CALL ON1

CLRF PORTB
CALL DELAY101

DECFSZ WAIT1,F
GOTO LOOP004

;*********
CLRF PORTB ; <5>
MOVLW B'11111001'

MOVWF PORTA
MOVLW 20
MOVWF WAIT1

LOOP005
CALL REG1
F14A
MOVLW 1
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14A

CALL REG1
F14B
MOVLW B'00000011'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14B

CALL REG1
F14C
MOVLW B'00000111'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14C

CALL REG1
F14D
MOVLW B'00001111'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14D

CALL REG1
F14E
MOVLW B'00011111'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14E

CALL REG1
F14F
MOVLW B'00111111'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14F

CALL REG1
F14G
MOVLW B'01111111'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14G

CALL REG1
F14H
MOVLW B'11111111'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F14H

CLRF PORTB
CALL DELAY101
DECFSZ WAIT1,F
GOTO LOOP005
CLRF PORTB
CLRF PORTA

;**********

MOVLW 8
MOVWF WAIT1
LOOP006

BSF PORTB,0
CALL DELAY101
BSF PORTB,1
CALL DELAY101
BSF PORTB,2
CALL DELAY101
BSF PORTB,3
CALL DELAY101
BSF PORTB,4
CALL DELAY101
BSF PORTB,5
CALL DELAY101
BSF PORTB,6
CALL DELAY101
BSF PORTB,7
CALL DELAY101

BCF PORTB,7
CALL DELAY101
BCF PORTB,6
CALL DELAY101
BCF PORTB,5
CALL DELAY101
BCF PORTB,4
CALL DELAY101
BCF PORTB,3
CALL DELAY101
BCF PORTB,2
CALL DELAY101
BCF PORTB,1
CALL DELAY101
BCF PORTB,0
CALL DELAY61
CLRF PORTB
CALL DELAY101

DECFSZ WAIT1,F
GOTO LOOP006

;*********

MOVLW 40 ; [7]
MOVWF WAIT3

LOOP007
MOVLW 30
MOVWF WAIT1

LOOPA2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPA2
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPB2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPB2
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPC2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPC2
CLRF PORTB


MOVLW 30
MOVWF WAIT1

LOOPD2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPD2
CLRF PORTB
DECFSZ WAIT3,F
GOTO LOOP007



;********

MOVLW 40 ; [8]
MOVWF WAIT3

CALL DELAY31
LOOP008
MOVLW 30
MOVWF WAIT1

LOOPA3 MOVLW B'11110111';RB0,RA0
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11111011';RB1'RA4
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPA3
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPB3 MOVLW B'11110111';RB0,RA0
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11111011';RB1'RA4
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPB3
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPC3 MOVLW B'11110111';RB0,RA0
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11111011';RB1'RA4
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPC3
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPD3 MOVLW B'11110111';RB0,RA0
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11111011';RB1'RA4
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00010001'
MOVWF PORTB


DECFSZ WAIT1,F
GOTO LOOPD3
CLRF PORTB

DECFSZ WAIT3,F
GOTO LOOP008

;**********
MOVLW 8 ; [9]
MOVWF WAIT1
CLRF PORTA
LOOP009

MOVLW B'10000000'
CALL ON1

MOVLW B'01000000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'00000011'
CALL ON1

MOVLW B'01000101'
CALL ON1

MOVLW B'00001001'
CALL ON1

MOVLW B'00010001'
CALL ON1

MOVLW B'00100001'
CALL ON1

MOVLW B'01000001'
CALL ON1

MOVLW B'10000001'
CALL ON1

MOVLW B'01000001'
CALL ON1

MOVLW B'00100001'
CALL ON1

MOVLW B'00010001'
CALL ON1

MOVLW B'00001001'
CALL ON1

MOVLW B'00000110'
CALL ON1

MOVLW B'00001010'
CALL ON1

MOVLW B'00010010'
CALL ON1

MOVLW B'00100010'
CALL ON1

MOVLW B'01000010'
CALL ON1

MOVLW B'10000010'
CALL ON1

MOVLW B'01000010'
CALL ON1

MOVLW B'00100010'
CALL ON1

MOVLW B'00100010'
CALL ON1

MOVLW B'00010010'
CALL ON1

MOVLW B'00001010'
CALL ON1

MOVLW B'00001100'
CALL ON1

MOVLW B'00010100'
CALL ON1

MOVLW B'00100100'
CALL ON1

MOVLW B'01000100'
CALL ON1

MOVLW B'10000100'
CALL ON1

MOVLW B'01000100'
CALL ON1

MOVLW B'00100100'
CALL ON1

MOVLW B'00010100'
CALL ON1


MOVLW B'00011000'
CALL ON1


MOVLW B'00101000'
CALL ON1

MOVLW B'01001000'
CALL ON1

MOVLW B'10001000'
CALL ON1

MOVLW B'01001000'
CALL ON1

MOVLW B'00101000'
CALL ON1

MOVLW B'00110000'
CALL ON1


MOVLW B'01010000'
CALL ON1

MOVLW B'01100000'
CALL ON1

MOVLW B'10100000'
CALL ON1

MOVLW B'11000000'
CALL ON1

MOVLW B'10000000'
CALL ON1

CLRF PORTB
CALL DELAY101
DECFSZ WAIT1,F
GOTO LOOP009
;***********

MOVLW 40 ; (10)
MOVWF WAIT3
LOOP010
MOVLW 80
MOVWF WAIT1

LOOPA9 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00001111'
CALL OND31

MOVLW B'11110111';RB1'RA4
MOVWF PORTA
MOVLW B'11110000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPA9
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPB9
MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00001111'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'11110000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPB9
CLRF PORTB


MOVLW 80
MOVWF WAIT1

LOOPC9 MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00001111'
CALL OND31

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'11110000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPC9
CLRF PORTB


MOVLW 80
MOVWF WAIT1

LOOPD9 MOVLW B'11110111';RB0,RA0
MOVWF PORTA
MOVLW B'00001111'
CALL OND31

MOVLW B'11111110';RB1'RA4
MOVWF PORTA
MOVLW B'11110000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPD9

DECFSZ WAIT3,F
GOTO LOOP010


;******
MOVLW 40 ; (11)
MOVWF WAIT3

LOOP011
MOVLW 60
MOVWF WAIT1

LOOPF2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00000010'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'00000101'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00001000'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000101'
MOVWF PORTB
CALL DELAY31

DECFSZ WAIT1,F
GOTO LOOPF2
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPG2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00000100'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'00001010'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00010001'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00001010'
MOVWF PORTB
CALL DELAY31

DECFSZ WAIT1,F
GOTO LOOPG2
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPH2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00001000'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'00010100'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00100010'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00010100'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPH2
CLRF PORTB


MOVLW 30
MOVWF WAIT1

LOOPI2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00010000'
MOVWF PORTB
CALL DELAY31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'00101000'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'01000100'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00101000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPI2
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPJ2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'00100000'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'01010000'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'10001000'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'01010000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPJ2
CLRF PORTB

MOVLW 30
MOVWF WAIT1

LOOPK2 MOVLW B'11111110';RB0,RA0
MOVWF PORTA
MOVLW B'01000000'
CALL OND31

MOVLW B'11111101';RB1'RA4
MOVWF PORTA
MOVLW B'10100000'
CALL OND31

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00010000'
CALL OND31

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'10100000'
CALL OND31

DECFSZ WAIT1,F
GOTO LOOPK2
CLRF PORTB

DECFSZ WAIT3,F
GOTO LOOP011

;*********
MOVLW B'11111001' ; [12]
MOVWF PORTA
MOVLW 8
MOVWF WAIT1


LOOP012
MOVLW B'00000001'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'00000100'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'01000000'
CALL ON1


MOVLW B'10000001'
CALL ON1

MOVLW B'10000010'
CALL ON1

MOVLW B'10000100'
CALL ON1

MOVLW B'10001000'
CALL ON1

MOVLW B'10010000'
CALL ON1

MOVLW B'10100000'
CALL ON1

MOVLW B'11000000'
CALL ON1

MOVLW B'11000001'
CALL ON1

MOVLW B'11000010'
CALL ON1

MOVLW B'11000100'
CALL ON1

MOVLW B'11001000'
CALL ON1

MOVLW B'11010000'
CALL ON1

MOVLW B'11100000'
CALL ON1

MOVLW B'11100001'
CALL ON1

MOVLW B'11100010'
CALL ON1

MOVLW B'11100100'
CALL ON1

MOVLW B'11101000'
CALL ON1

MOVLW B'11110000'
CALL ON1


MOVLW B'11110001'
CALL ON1

MOVLW B'11110010'
CALL ON1

MOVLW B'11110100'
CALL ON1

MOVLW B'11111000'
CALL ON1

MOVLW B'11111001'
CALL ON1

MOVLW B'11111010'
CALL ON1

MOVLW B'11111100'
CALL ON1


MOVLW B'11111101'
CALL ON1

MOVLW B'11111111'
MOVWF PORTB
; CALL DELAYS ;MORE THERN DELAY10

DECFSZ WAIT1,F
GOTO LOOP012
;*****

MOVLW 8 ; [13]
MOVWF WAIT1
CLRF PORTA
LOOP013

MOVLW B'00000001'
CALL ON1
CALL DELAY41

MOVLW B'00000011'
CALL ON1
CALL DELAY41

MOVLW B'00000101'
CALL ON1
CALL DELAY41

MOVLW B'00000110'
CALL ON1
CALL DELAY41

MOVLW B'00001010'
CALL ON1
CALL DELAY41

MOVLW B'000001100'
CALL ON1
CALL DELAY41

MOVLW B'00010100'
CALL ON1
CALL DELAY41

MOVLW B'00011000'
CALL ON1
CALL DELAY41

MOVLW B'00101000'
CALL ON1
CALL DELAY41

MOVLW B'00110000'
CALL ON1
CALL DELAY41

MOVLW B'01010000'
CALL ON1
CALL DELAY41

MOVLW B'01100000'
CALL ON1
CALL DELAY41
MOVLW B'10100000'
CALL ON1
CALL DELAY41

MOVLW B'11000000'
CALL ON1
CALL DELAY41

MOVLW B'10000000'
CALL ON1
CALL DELAY41

CLRF PORTB
CALL DELAY41 ;MORE THERN DELAY10
DECFSZ WAIT1,F
GOTO LOOP013
;*******
MOVLW 8 ; [14]
MOVWF WAIT1
LOOP014

MOVLW B'10000000'
CALL ON1

MOVLW B'01000000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'10000001'
CALL ON1

MOVLW B'01000001'
CALL ON1

MOVLW B'00100001'
CALL ON1

MOVLW B'00010001'
CALL ON1

MOVLW B'00001001'
CALL ON1

MOVLW B'00000011'
CALL ON1

MOVLW B'10000011'
CALL ON1

MOVLW B'01000011'
CALL ON1

MOVLW B'00100011'
CALL ON1

MOVLW B'00010011'
CALL ON1

MOVLW B'00001011'
CALL ON1

MOVLW B'00000111'
CALL ON1

MOVLW B'10000111'
CALL ON1

MOVLW B'01000111'
CALL ON1

MOVLW B'00100111'
CALL ON1

MOVLW B'00010111'
CALL ON1

MOVLW B'00001111'
CALL ON1

MOVLW B'10001111'
CALL ON1

MOVLW B'01001111'
CALL ON1

MOVLW B'00101111'
CALL ON1

MOVLW B'00011111'
CALL ON1

MOVLW B'10011111'
CALL ON1

MOVLW B'01011111'
CALL ON1

MOVLW B'00111111'
CALL ON1

MOVLW B'10111111'
CALL ON1

MOVLW B'01111111'
CALL ON1

MOVLW B'11111111'
MOVWF PORTB

; CALL DELAYS ;MORE THERN DELAY10


;MOVE ONE BY ONE FORWARD


MOVLW B'01111111'
CALL ON1

MOVLW B'10111111'
CALL ON1

MOVLW B'00111111'
CALL ON1

MOVLW B'01011111'
CALL ON1

MOVLW B'10011111'
CALL ON1

MOVLW B'00011111'
CALL ON1

MOVLW B'00101111'
CALL ON1

MOVLW B'01001111'
CALL ON1

MOVLW B'10001111'
CALL ON1

MOVLW B'00001111'
CALL ON1

MOVLW B'00010111'
CALL ON1

MOVLW B'00100111'
CALL ON1

MOVLW B'01000111'
CALL ON1

MOVLW B'10000111'
CALL ON1

MOVLW B'00000111'
CALL ON1

MOVLW B'00001011'
CALL ON1

MOVLW B'00010011'
CALL ON1

MOVLW B'00100011'
CALL ON1

MOVLW B'01000011'
CALL ON1

MOVLW B'10000011'
CALL ON1

MOVLW B'00000011'
CALL ON1

MOVLW B'00000101'
CALL ON1

MOVLW B'00001001'
CALL ON1

MOVLW B'00010001'
CALL ON1

MOVLW B'00100001'
CALL ON1

MOVLW B'01000001'
CALL ON1

MOVLW B'10000001'
CALL ON1

MOVLW B'00000001'
CALL ON1

MOVLW B'00000100'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'01000000'
CALL ON1

MOVLW B'10000000'
CALL ON1

CLRF PORTB
CALL DELAY101
DECFSZ WAIT1,F
GOTO LOOP014

;**********

MOVLW 8 ; [15]
MOVWF WAIT1

LOOP015
CALL REG1
F8A MOVLW B'00000001'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8A

CALL REG1
F8B MOVLW B'00000010'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8B

CALL REG1
F8C MOVLW B'00000100'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8C

CALL REG1
F8D MOVLW B'00001000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8D

CALL REG1
F8E MOVLW B'00010000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8E

CALL REG1
F8F MOVLW B'00100000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8F

CALL REG1
F8G MOVLW B'01000000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8G

CALL REG1
F8H MOVLW B'10000000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8H

CALL REG1
F8I MOVLW B'01000000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8I

CALL REG1
F8J MOVLW B'00100000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8J

CALL REG1
F8K MOVLW B'00010000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8K

CALL REG1
F8L MOVLW B'00001000'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8L

CALL REG1
F8M MOVLW B'00000100'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8M

CALL REG1
F8N MOVLW B'00000010'
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F8N

DECFSZ WAIT1,F
GOTO LOOP015

;********
MOVLW 8 ; [16]
MOVWF WAIT1

MOVLW B'00011000'
CALL ON1
LOOP016

MOVLW B'00101000'
CALL ON1

MOVLW B'01001000'
CALL ON1

MOVLW B'10001000'
CALL ON1

MOVLW B'01001000'
CALL ON1

MOVLW B'00101000'
CALL ON1

MOVLW B'00011000'
CALL ON1

MOVLW B'00010100'
CALL ON1

MOVLW B'00010010'
CALL ON1

MOVLW B'00010001'
CALL ON1

MOVLW B'00010010'
CALL ON1

MOVLW B'00010100'
CALL ON1

MOVLW B'00011000'
CALL ON1

; CALL DELAYS ;MORE THERN DELAY10
DECFSZ WAIT1,F
GOTO LOOP016
;****

MOVLW 5
MOVWF WAIT3

LOOP017 ; <17>
CLRF PORTB
CLRF PORTA

MOVLW 20
MOVWF WAIT1

LOOPA11
MOVLW B'11111110' ;1STEP
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00011100'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00011100'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYR2


DECFSZ WAIT1,F
GOTO LOOPA11
CLRF PORTA


LOOPA22
MOVLW B'11111101' ;3STEP
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00111000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00111000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYR2


DECFSZ WAIT1,F
GOTO LOOPA22
CLRF PORTA


LOOPA33
MOVLW B'11111011' ;5STEP
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11110111'
MOVWF PORTA
MOVLW B'11100000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111110'
MOVWF PORTA
MOVLW B'11100000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYR2

DECFSZ WAIT1,F
GOTO LOOPA33
CLRF PORTA

LOOPA44
MOVLW B'11110111' ;1STEP
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00011100'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00011100'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYR2


DECFSZ WAIT1,F
GOTO LOOPA44
CLRF PORTA


LOOPA55
MOVLW B'11111110' ;3STEP
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00111000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00111000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYR2


DECFSZ WAIT1,F
GOTO LOOPA55
CLRF PORTA


LOOPA66
MOVLW B'11111101' ;5STEP
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111011'
MOVWF PORTA
MOVLW B'11100000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11110111'
MOVWF PORTA
MOVLW B'11100000'
MOVWF PORTB
CALL DELAYR2


MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYR2

DECFSZ WAIT1,F
GOTO LOOPA66
CLRF PORTA

DECFSZ WAIT3,F
GOTO LOOP017


;*************

; [18]
MOVLW 8
MOVWF WAIT2
LOOP018

MOVLW 3
MOVWF WAIT4
NEWA MOVLW B'00000001'
CALL ONDA1

MOVLW B'00000010'
CALL ONDA1

MOVLW B'00000100'
CALL ONDA1

MOVLW B'00001000'
CALL ONDA1

MOVLW B'00010000'
CALL ONDA1

MOVLW B'00100000'
CALL ONDA1

MOVLW B'01000000'
CALL ONDA1

MOVLW B'10000000'
CALL ONDA1

MOVLW B'10000000'
CALL ONDA1

MOVLW B'01000000'
CALL ONDA1

MOVLW B'00100000'
CALL ONDA1

MOVLW B'00010000'
CALL ONDA1

MOVLW B'00001000'
CALL ONDA1

MOVLW B'00000100'
CALL ONDA1

MOVLW B'00000010'
CALL ONDA1

MOVLW B'00000001'
CALL ONDA1


DECFSZ WAIT4,F
GOTO NEWA
CLRF PORTB

MOVLW 5
MOVWF WAIT3
LADDER MOVLW B'00000100'
CALL ONDA1


MOVLW B'00001000'
CALL ONDA1


MOVLW B'00010000'
CALL ONDA1


MOVLW B'00100000'
CALL ONDA1

MOVLW B'00010000'
CALL ONDA1

MOVLW B'00001000'
CALL ONDA1

MOVLW B'00000100'
CALL ONDA1
CLRF PORTB

DECFSZ WAIT3,F
GOTO LADDER
CLRF PORTB
; CALL DELAYS ;OFF TIME

DECFSZ WAIT2,F
GOTO LOOP018
;***********


MOVLW 10 ; <19>
MOVWF WAIT3

LOOP019
MOVLW 1
MOVWF WAIT1


LOOPD11
MOVLW B'11111100'
CALL FOOT
MOVLW B'01010101'
CALL STAIR

MOVLW B'11111101'
CALL FOOT
MOVLW B'10101010'
CALL STAIR

MOVLW B'11111001'
CALL FOOT
MOVLW B'01010101'
CALL STAIR

MOVLW B'11111011'
CALL FOOT
MOVLW B'10101010'
CALL STAIR

MOVLW B'11110011'
CALL FOOT
MOVLW B'01010101'
CALL STAIR


DECFSZ WAIT1,F
GOTO LOOPD11
CLRF PORTB

MOVLW 1
MOVWF WAIT1


LOOPD22
MOVLW B'11110011'
CALL FOOT
MOVLW B'01010101'
CALL STAIR

MOVLW B'11111011'
CALL FOOT
MOVLW B'10101010'
CALL STAIR

MOVLW B'11111001'
CALL FOOT
MOVLW B'01010101'
CALL STAIR

MOVLW B'11111101'
CALL FOOT
MOVLW B'10101010'
CALL STAIR

MOVLW B'11111100'
CALL FOOT
MOVLW B'01010101'
CALL STAIR


DECFSZ WAIT1,F
GOTO LOOPD22
CLRF PORTB
CLRF PORTA

DECFSZ WAIT3,F
GOTO LOOP019

;********

MOVLW 8 ; [20]
MOVWF WAIT1
LOOP020
MOVLW B'00000001'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'00000100'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'01000000'
CALL ON1


MOVLW B'10000001'
CALL ON1

MOVLW B'10000010'
CALL ON1

MOVLW B'10000100'
CALL ON1

MOVLW B'10001000'
CALL ON1

MOVLW B'10010000'
CALL ON1

MOVLW B'10100000'
CALL ON1

MOVLW B'11000000'
CALL ON1

MOVLW B'11000001'
CALL ON1

MOVLW B'11000010'
CALL ON1

MOVLW B'11000100'
CALL ON1

MOVLW B'11001000'
CALL ON1

MOVLW B'11010000'
CALL ON1

MOVLW B'11100000'
CALL ON1

MOVLW B'11100001'
CALL ON1

MOVLW B'11100010'
CALL ON1

MOVLW B'11100100'
CALL ON1

MOVLW B'11101000'
CALL ON1

MOVLW B'11110000'
CALL ON1


MOVLW B'11110001'
CALL ON1

MOVLW B'11110010'
CALL ON1

MOVLW B'11110100'
CALL ON1

MOVLW B'11111000'
CALL ON1

MOVLW B'11111001'
CALL ON1

MOVLW B'11111010'
CALL ON1

MOVLW B'11111100'
CALL ON1


MOVLW B'11111101'
CALL ON1

MOVLW B'11111111'
MOVWF PORTB
; CALL DELAYS ;MORE THERN DELAY10

DECFSZ WAIT1,F
GOTO LOOP020
;*********

MOVLW 8 ; [21]
MOVWF WAIT1

LOOP021

CALL REG1
F3A MOVLW 3
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3A

CALL REG1
F3B MOVLW 6
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3B

CALL REG1
F3C MOVLW 12
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3C

CALL REG1
F3D MOVLW 24
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3D

CALL REG1
F3E MOVLW 48
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3E

CALL REG1
F3F MOVLW 96
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3F

CALL REG1
F3G MOVLW 192
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F3G

DECFSZ WAIT1,F
GOTO LOOP021

;*******
MOVLW 2
MOVWF WAIT3

LOOP022 ;<22>
MOVLW 2
MOVWF WAIT1

LOOPC11

MOVLW B'11111100' ;STEP 1
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110011' ;STEP1
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110011' ;CROSS
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYC


MOVLW B'11111100'
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYC

DECFSZ WAIT1,F
GOTO LOOPC11
CLRF PORTB
MOVLW 2
MOVWF WAIT1


LOOPC22

MOVLW B'11111100' ;STEP 1
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYC


MOVLW B'11110011' ;STEP1
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110011' ;CROSS
MOVWF PORTA
MOVLW B'00001100'
MOVWF PORTB
CALL DELAYC


MOVLW B'11111100'
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYC

DECFSZ WAIT1,F
GOTO LOOPC22
CLRF PORTB
MOVLW 2
MOVWF WAIT1


LOOPC33
MOVLW B'11111100' ;STEP 2
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYC


MOVLW B'11110011' ;STEP2
MOVWF PORTA
MOVLW B'11000000'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110011' ;CROSS
MOVWF PORTA
MOVLW B'00110000'
MOVWF PORTB
CALL DELAYC


MOVLW B'11111100'
MOVWF PORTA
MOVLW B'11000000'
MOVWF PORTB
CALL DELAYC

DECFSZ WAIT1,F
GOTO LOOPC33
CLRF PORTB
MOVLW 2
MOVWF WAIT1

LOOPC44
MOVLW B'11111100' ;STEP 2
MOVWF PORTA
MOVLW B'11000000'
MOVWF PORTB
CALL DELAYC


MOVLW B'11110011' ;STEP2
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110011' ;STEP 2
MOVWF PORTA
MOVLW B'11000000'
MOVWF PORTB
CALL DELAYC


MOVLW B'11111100' ;STEP2
MOVWF PORTA
MOVLW B'00000011'
MOVWF PORTB
CALL DELAYC

DECFSZ WAIT1,F
GOTO LOOPC44
CLRF PORTB

DECFSZ WAIT3,F
GOTO LOOP022

CLRF PORTA
CLRF PORTB

;*************
MOVLW 20
MOVWF WAIT3

LOOP023 ;<23>

MOVLW 100
MOVWF WAIT1

LOOPF11
MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00011000'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPF11
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPF22 MOVLW B'11111011'
MOVWF PORTA
MOVLW B'01100110'
CALL ATTACH1

MOVLW B'11110101'
MOVWF PORTA
MOVLW B'00011000'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPF22
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPF33 MOVLW B'11111011'
MOVWF PORTA
MOVLW B'10000001'
CALL ATTACH1

MOVLW B'11110101'
MOVWF PORTA
MOVLW B'01100110'
CALL ATTACH1

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00011000'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPF33
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPF44 MOVLW B'11110101'
MOVWF PORTA
MOVLW B'10000001'
CALL ATTACH1

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'01100110'
CALL ATTACH1

DECFSZ WAIT1,F
GOTO LOOPF44
CLRF PORTB

DECFSZ WAIT3,F
GOTO LOOP023
CLRF PORTA
CLRF PORTB
;*****

MOVLW 8 ; [24]
MOVWF WAIT1

LOOP024

CALL REG1
F4A MOVLW 7
CALL FLASHON1

DECFSZ WAIT2,F
GOTO F4A

CALL REG1
F4B MOVLW 14
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F4B

CALL REG1
F4C MOVLW 28
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F4C

CALL REG1
F4D MOVLW 56
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F4D

CALL REG1
F4E MOVLW 112
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F4E

CALL REG1
F4F MOVLW 224
CALL FLASHON1
DECFSZ WAIT2,F
GOTO F4F

DECFSZ WAIT1,F
GOTO LOOP024

;*********


MOVLW 20 ; <25>
MOVWF WAIT1

LOOP026

MOVLW B'11111110' ;STEP 1A
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111011' ;STEP 2A
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111011' ;STEP1B
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111110' ;STEP2B
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYR2
CALL DELAYR2
CALL DELAYR2
;***
MOVLW B'11110111' ;STEP 3A
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111101' ;STEP 4A
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00110011'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111101' ;STEP3B
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11110111' ;STEP4B
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'11001100'
MOVWF PORTB
CALL DELAYC

DECFSZ WAIT1,F
GOTO LOOP026

;*********
;*************
CLRF PORTA

MOVLW 8 ;[26]
MOVWF WAIT1
LOOP025

MOVLW B'10000000'
CALL ON1

MOVLW B'01000000'
CALL ON1

MOVLW B'00100000'
CALL ON1

MOVLW B'00010000'
CALL ON1

MOVLW B'00001000'
CALL ON1

MOVLW B'00000010'
CALL ON1

MOVLW B'10000001'
CALL ON1

MOVLW B'01000001'
CALL ON1

MOVLW B'00100001'
CALL ON1

MOVLW B'00010001'
CALL ON1

MOVLW B'00001001'
CALL ON1

MOVLW B'00000011'
CALL ON1


MOVLW B'10000011'
CALL ON1

MOVLW B'01000011'
CALL ON1

MOVLW B'00100011'
CALL ON1

MOVLW B'00010011'
CALL ON1

MOVLW B'00001011'
CALL ON1

MOVLW B'00000111'
CALL ON1


MOVLW B'10000111'
CALL ON1

MOVLW B'01000111'
CALL ON1

MOVLW B'00100111'
MOVWF PORTB

MOVLW B'00010111'
CALL ON1

MOVLW B'00001111'
CALL ON1

MOVLW B'10001111'
CALL ON1

MOVLW B'01001111'
CALL ON1

MOVLW B'00101111'
CALL ON1

MOVLW B'00011111'
CALL ON1

MOVLW B'10011111'
CALL ON1

MOVLW B'01011111'
; PAGESEL ON
CALL ON1
; PAGESEL $

MOVLW B'00111111'
; PAGESEL ON
CALL ON1
; PAGESEL $

MOVLW B'10111111'
; PAGESEL ON
CALL ON1
; PAGESEL $

MOVLW B'01111111'
; PAGESEL ON
CALL ON1
; PAGESEL $

MOVLW B'11111111'
MOVWF PORTB

; CALL DELAYS ;MORE THERN DELAY10
DECFSZ WAIT1,F

GOTO LOOP025

PAGESEL LOOPB
GOTO LOOPB

;***********SUB-FUNCTION****************

DELAYR2 MOVLW 50
MOVWF STORE1

DELAYR3
DECFSZ STORE1,F
GOTO DELAYR3
RETLW 0

DELAY101
MOVLW 80
MOVWF STORE2

DELAY121
DECFSZ STORE3,F
GOTO DELAY121
DECFSZ STORE2,F
GOTO DELAY121
RETLW 0

REG1 MOVLW 3
MOVWF WAIT2
RETURN


STAIR MOVWF PORTB
CALL DELAY101
RETURN

FOOT MOVWF PORTA
CALL DELAY101
RETURN

ON1 MOVWF PORTB
CALL DELAY101
RETURN

ONDA1 MOVWF PORTB
CALL DELAYA1
RETURN

FLASH1 CALL DELAYA1
CLRF PORTB
CALL DELAYA1
RETURN

FLASHON1
MOVWF PORTB
CALL FLASH1
RETURN

DELAYA1 MOVLW 40
MOVWF STORE1

DELAYB1 DECFSZ STORE3,F
GOTO DELAYB1
DECFSZ STORE1,F
GOTO DELAYB1
RETLW 0

OND31 MOVWF PORTB
CALL DELAY31
RETURN

DELAY41 MOVLW 130
MOVWF STORE1

DELAY51 DECFSZ STORE3,F
GOTO DELAY51
DECFSZ STORE1,F
GOTO DELAY51
RETLW 0

DELAY31 MOVLW 150
MOVWF STORE1

DELAY21 DECFSZ STORE1,F
GOTO DELAY21
RETLW 0

ATTACH1 MOVWF PORTB
CALL DELAY151
RETURN

DELAY151
MOVLW 250
MOVWF STORE1

DELAY161
DECFSZ STORE1,F
GOTO DELAY161
RETLW 0


DELAYC MOVLW 100
MOVWF STORE1

DELAYD DECFSZ STORE3,F
GOTO DELAYD
DECFSZ STORE1,F
GOTO DELAYD
RETLW 0

DELAY61 MOVLW 30
MOVWF STORE1

DELAY71 DECFSZ STORE2,F
GOTO DELAY71
DECFSZ STORE1,F
GOTO DELAY71
RETLW 0

;*********

LOOPB

MOVLW 8 ;[27]
MOVWF WAIT1

LOOP027
CALL REG
F1A MOVLW 1
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1A

CALL REG
F1B MOVLW 2
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1B

CALL REG
F1C MOVLW 4
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1C

CALL REG
F1D MOVLW 8
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1D

CALL REG
F1E MOVLW 16
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1E

CALL REG
F1F MOVLW 32
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1F

CALL REG
F1G MOVLW 64
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1G

CALL REG
F1H MOVLW 128
CALL FLASHON
DECFSZ WAIT2,F
GOTO F1H

DECFSZ WAIT1,F
GOTO LOOP027

;****************
MOVLW 20
MOVWF WAIT3

LOOP028 ; <28>
MOVLW 40
MOVWF WAIT1

LOOPI11
MOVLW B'11111110' ;f
MOVWF PORTA
MOVLW B'00010001'
CALL ATTACH


MOVLW B'11111101' ;f
MOVWF PORTA
MOVLW B'00100010'
CALL ATTACH


MOVLW B'11111011' ;f
MOVWF PORTA
MOVLW B'01000100'
CALL ATTACH


MOVLW B'11110111' ;f
MOVWF PORTA
MOVLW B'10001000'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPI11
CLRF PORTB

MOVLW 40
MOVWF WAIT1

LOOPI22
MOVLW B'11111110' ;r
MOVWF PORTA
MOVLW B'10001000'
CALL ATTACH

MOVLW B'11111101' ;r
MOVWF PORTA
MOVLW B'01000100'
CALL ATTACH

MOVLW B'11111011' ;r
MOVWF PORTA
MOVLW B'00100010'
CALL ATTACH

MOVLW B'11110111' ;r
MOVWF PORTA
MOVLW B'00010001'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPI22
CLRF PORTB

DECFSZ WAIT3,F
GOTO LOOP028


;*********

CLRF PORTA
CLRF PORTB

MOVLW 8 ; [29]
MOVWF WAIT1

LOOP029
CALL REG
F7A MOVLW 1
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7A

CALL REG
F7B MOVLW 3
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7B

CALL REG
F7C MOVLW 7
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7C

CALL REG
F7D MOVLW 15
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7D

CALL REG
F7E MOVLW 31
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7E

CALL REG
F7F MOVLW 63
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7F

CALL REG
F7G MOVLW 127
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7G

CALL REG
F7H MOVLW 255
CALL FLASHON
DECFSZ WAIT2,F
GOTO F7H

DECFSZ WAIT1,F
GOTO LOOP029
;*********

MOVLW 40 ;(30)
MOVWF WAIT1
LOOP030
MOVLW B'11111111'
MOVWF PORTB

MOVLW B'11111110'
MOVWF PORTA
CALL DELAY4

MOVLW B'11111101'
MOVWF PORTA
CALL DELAY4

MOVLW B'11111011'
MOVWF PORTA
CALL DELAY4

MOVLW B'11110111'
MOVWF PORTA
CALL DELAY4

DECFSZ WAIT1,F
GOTO LOOP030
;********

CLRF PORTA ;(31)

MOVLW 12
MOVWF WAIT1
LOOP031
MOVLW B'00001111'
CALL OND

BCF PORTB,7
LOOPH RLF PORTB,F
CALL DELAY
BTFSS PORTB,7
GOTO LOOPH
MOVLW B'11100001'
CALL OND

MOVLW B'11000011'
CALL OND

MOVLW B'10000111'
CALL OND

DECFSZ WAIT1,F
GOTO LOOP031
;******
; <32>
MOVLW 10
MOVWF WAIT3

LOOP032
MOVLW 80
MOVWF WAIT1

LOOPJ11
MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00000101'
CALL ATTACH

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ11
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPJ22
MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00000101'
CALL ATTACH

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ22
CLRF PORTB


MOVLW 80
MOVWF WAIT1

LOOPJ33
MOVLW B'11111011'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000101'
CALL ATTACH

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ33
CLRF PORTB


MOVLW 80
MOVWF WAIT1

LOOPJ44
MOVLW B'11110111'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'00000101'
CALL ATTACH

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'00000010'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ44
CLRF PORTB

MOVLW 80
MOVWF WAIT1


LOOPJ55
MOVLW B'11111110'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'10100000'
CALL ATTACH

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ55
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPJ66
MOVLW B'11110111'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

MOVLW B'11111011'
MOVWF PORTA
MOVLW B'10100000'
CALL ATTACH

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ66
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPJ77
MOVLW B'11111011'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

MOVLW B'11111101'
MOVWF PORTA
MOVLW B'10100000'
CALL ATTACH

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ77
CLRF PORTB

MOVLW 80
MOVWF WAIT1

LOOPJ88
MOVLW B'11111101'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

MOVLW B'11111110'
MOVWF PORTA
MOVLW B'10100000'
CALL ATTACH

MOVLW B'11110111'
MOVWF PORTA
MOVLW B'01000000'
CALL ATTACH

DECFSZ WAIT1,F
GOTO LOOPJ88
CLRF PORTB

DECFSZ WAIT3,F
GOTO LOOP032

;*******


PAGESEL LOOPA
GOTO LOOPA

;************
;***********SUB-FUNCTION****************


DELAY15 MOVLW 250
MOVWF STORE1

DELAY16 DECFSZ STORE1,F
GOTO DELAY16
RETLW 0

DELAY MOVLW 100
MOVWF STORE1

DELAY1 DECFSZ STORE3,F
GOTO DELAY1
DECFSZ STORE1,F
GOTO DELAY1
RETLW 0


DELAY4 MOVLW 130
MOVWF STORE1

DELAY5 DECFSZ STORE3,F
GOTO DELAY5
DECFSZ STORE1,F
GOTO DELAY5
RETLW 0


DELAYA MOVLW 40
MOVWF STORE1

DELAYB DECFSZ STORE3,F
GOTO DELAYB
DECFSZ STORE1,F
GOTO DELAYB
RETLW 0

ATTACH MOVWF PORTB
CALL DELAY15
RETURN


REG MOVLW 3
MOVWF WAIT2
RETURN

FLASH CALL DELAYA
CLRF PORTB
CALL DELAYA
RETURN

FLASHON
MOVWF PORTB
CALL FLASH
RETURN

OND MOVWF PORTB
CALL DELAY
RETURN

END
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top