Led chaser sequense

 

;******************************************************************
;
;PIC-programmer and experiment board K8048 Velleman;
;
;******************************************************************
;Author: Henny Reudink
;Call  : PA3BYB
;Data  : 2016 januari 06
;******************************************************************
;Target device - PIC16F627
;Frequency : 4 MHz cristal
;******************************************************************
;
;           Led chaser sequense Sequense reverse switch SW1
;           Based on idea Michael A. Covington
;
;******************************************************************
;
;Version  : 0.1
;
;******************************************************************
;Uitgang                      Ingang
;   Led LD1 RB0 (pin6)        Switch SW1 RA0 (pin17)
;   Led LD2 RB1 (pin7)        Switch SW2 RA1 (pin18)
;   Led LD3 RB2 (pin8)        Switch SW3 RA2 (pin1)
;   Led LD4 RB3 (pin9)        Switch SW4 RA3 (pin2)
;   Led LD5 RB4 (pin10)
;   Led LD6 RB5 (pin11)
;
;******************************************************************
;
;   CPU-configuaration  
;   Processor PIC16F627
;
;******************************************************************
    processor   pic16f627
    include     p16f627.inc     ;include standard header for
                                ; selected device

    __CONFIG _BODEN_OFF & _CP_OFF & DATA_CP_OFF & _LVP_OFF & _MCLRE_OFF & _PWRTE_ON & _XT_OSC & _WDT_OFF 

;******************************************************************
;                          Setup and declare names
;******************************************************************
Jcount   equ            H'7F'   ; J = address hex 7F
Kcount   equ            H'7E'   ; K = address hex 7E
   
; Program start
    org        0                ;Start adress is 0000h

;******************************************************************
;                          Setup ports
;
; The PIC16F627A/628A/648A have two ports, PORTA and PORTB. Some 
; pins for these I/O ports are multiplexed with alternate functions
; for the peripheral features on the device. In general, when a 
; peripheral is enabled, that pin may not be used as a general 
; purpose I/O pin.

; The PORTA pins are multiplexed with comparator and voltage
; reference functions
; The operation of these pins are selected by control bits in the
; CMCON (Comparator Control register) register and the VRCON 
; (Voltage Reference Control register) register. When selected as a
; comparator input, these pins will read as '0's.
;