LIST P=16F88
#include <p16f88.inc>

C1	EQU	21h
C2	EQU	22h
C3	EQU	23h

__CONFIG _CONFIG1, _WDT_OFF & _CP_OFF & _DEBUG_OFF & _CCP1_RB3  &_DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_ON & _INTRC_IO
__CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF


ORG 0
GOTO START

ORG 4
GOTO START

START

CLRF STATUS

BANKSEL	OSCCON

MOVLW	B'01110100'		; 8MHz, takt stabilny, takt - FOSC
MOVWF	OSCCON

BANKSEL	ANSEL

MOVLW B'00000000' 	; Configure all pins
MOVWF ANSEL 		; as digital inputs
MOVLW B'00000000'
MOVWF OPTION_REG

MOVLW B'00000000'
MOVWF TRISB
MOVLW B'10100000'
MOVWF TRISA

MOVLW	B'10110000'
MOVWF	TXSTA

MOVLW	.129
MOVWF	SPBRG

BCF STATUS,RP0

MOVLW	B'10100000'
MOVWF	RCSTA

CLRF PORTB
CLRF PORTA



PROGRAM


MOVLW	B'00000001'
MOVWF	PORTA
MOVWF	TXREG
CALL	CAKAJ

MOVLW	B'00000010'
MOVWF	PORTA
MOVWF	TXREG
CALL	CAKAJ

MOVLW	B'00000100'
MOVWF	PORTA
MOVWF	TXREG
CALL	CAKAJ

MOVLW	B'00001000'
MOVWF	PORTA
MOVWF	TXREG
CALL	CAKAJ


GOTO	PROGRAM


CAKAJ
MOVLW	.255
MOVWF	C1
MOVWF	C2
MOVLW	.10
MOVWF	C3
MOVLW	.255
DECFSZ	C1
GOTO	$-1
MOVWF	C1
DECFSZ	C2
GOTO	$-4
DECFSZ	C3
GOTO	$-6
RETURN

END