; ; Nathan's Binary Clock ; Version 0.0.1 ; ; 2000-03-19 19:40 0.0.1 Started code ; ; OSC=regular xtal ; WDT=off ; 4 MHz ; ;------------------------ list P=16F84 radix hex include "p16f84.inc" ;------------------------ w equ 0 f equ 1 ;------------------------ ; Start of RAM ;------------------------ cblock 0x0c count1 count2 endc ;------------------------ ; Start of ROM ;------------------------ org 0x00 init movlw b'11000000' tris PORTB movwf PORTB movlw b'00000011' tris PORTA start bsf PORTB,0 rot_L call wait bcf status,C rlf PORTB,f btfss PORTB,7 goto rot_L rot_R call wait bcf status,C rrf PORTB,f btfss PORTB,0 goto rot_R goto rot_L wait movlw $200 movwf count1 d1 movlw $200 movwf count2 d2 decfsz count2,f goto d2 decfsz count1,f goto d1 retlw 0 END