MPASM 02.13 Released EXPT4.ASM 9-20-1981 0:56:46 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;Experiment-4 for "5x7 Video Screen" Project 00002 ;PIC16F84 and only F84 chip 00003 ;LEDs scan up and down at 2Hz. 00004 0000 00005 START ORG 0X00 0000 1683 00006 BSF 03,5 ;Go to page1 for setting-up the ports 0001 3000 00007 MOVLW 00H ;Put 00 into W 0002 0085 00008 MOVWF 05H ;Make all RA lines output 0003 0086 00009 MOVWF 06H ;Make all RB lines output 0004 1283 00010 BCF 03,5 ;Go to Page0 for programming 0005 3002 00011 MOVLW 02H ;Put 02 into W to 0006 0085 00012 MOVWF 05H ; Reset the 4017 00013 00014 0007 1003 00015 UPDOWN BCF 03H,0 ;clear the carry flag 0008 3001 00016 MOVLW 01H ;Turn on the bottom LED 0009 0086 00017 MOVWF 06H ; and output a HIGH 000A 2014 00018 CALL DELAY 000B 0D86 00019 UPDOWN1 RLF 06H,1 ;Shift the HIGH up the column 000C 2014 00020 CALL DELAY 000D 1F06 00021 BTFSS 06H,6 ;Has it reached the top? 000E 280B 00022 GOTO UPDOWN1 ;NO. 000F 0C86 00023 UPDOWN2 RRF 06H,1 ;YES. Shift the HIGH down 0010 2014 00024 CALL DELAY 0011 1C06 00025 BTFSS 06H,0 ;Has it reached the bottom? 0012 280F 00026 GOTO UPDOWN2 ;NO. 0013 280B 00027 GOTO UPDOWN1 ;YES. Repeat the cycle 00028 00029 0014 3003 00030 DELAY MOVLW 03 0015 009A 00031 MOVWF 1AH 0016 0B9B 00032 DELAY1 DECFSZ 1BH,1 0017 2816 00033 GOTO DELAY1 0018 0B9C 00034 DECFSZ 1CH,1 0019 2816 00035 GOTO DELAY1 001A 0B9A 00036 DECFSZ 1AH,1 001B 2816 00037 GOTO DELAY1 001C 0008 00038 RETURN 00039 00040 00041 END MPASM 02.13 Released EXPT4.ASM 9-20-1981 0:56:46 PAGE 2 SYMBOL TABLE LABEL VALUE DELAY 00000014 DELAY1 00000016 START 00000000 UPDOWN 00000007 UPDOWN1 0000000B UPDOWN2 0000000F __16F84 00000001 MEMORY USAGE MAP ('X' = Used, '-' = Unused) 0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXX--- ---------------- ---------------- All other memory blocks unused. Program Memory Words Used: 29 Program Memory Words Free: 995 Errors : 0 Warnings : 0 reported, 0 suppressed Messages : 0 reported, 0 suppressed