#include <P16F630.INC>
 __CONFIG (_MCLRE_OFF & _CP_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT)  ;Internal osc.

 c1 equ 20
 c2 equ 21

 org 0

Start
 BCF   STATUS,RP0  ; select bank 0
 CLRF  PORTA       ; porta=0
 movlw b'11111111'
 movwf CMCON 
 BSF   STATUS,RP0  ; select bank 1
 movlw b'00001000'
 movwf TRISA
 CLRF  TRISC       ; make PORTC pins all output
 BCF   STATUS,RP0  ; select bank 0
 movlw b'00000000'
 movwf  PORTC       ; set portc pins equal to 0

loop
 movlw b'00101010'
 movwf PORTC
 call delay1
 movlw b'00100011'
 movwf PORTA
 call delay1
 goto loop

delay1
 movlw b'11111111'
 bcf STATUS,RP0
 movwf c2
lc0
 movlw b'11111111'
 movwf c1
lc1
 decfsz c1,1
 goto lc1
 decfsz c2,1
 goto lc0
 return

 end
