;--------------------------------------------------------------------------
; File:   Main.asm
; Author: topicchi
;
; Created on 11 maggio 2015, 16.00
;--------------------------------------------------------------------------


    INCLUDE "p10f220.inc"   ; include le definizioni standard
    list p=pic10f220	    ; Processoer utilizzato
    errorlevel -302	    ; suppresses message "Bank Switch Check"
     __CONFIG _IOSCFS_8MHZ & _MCPU_ON & _WDTE_OFF & _CP_OFF & _MCLRE_OFF

; - - - - -
ciclo	EQU 0x10            ; primo valore RAM (0x10-0x1F)
valore  EQU 0x11

    org 0x00
Start
    movlw b'00001000'	    ;set GPIO 0..2 OUT, GPIO 3 IN
    tris GPIO
    movlw 0xFF
    movwf valore
Main
    movwf GPIO
    call delay
    movf valore,w
    xorlw 0xFF
    movwf valore
    movwf GPIO
    call delay
    goto Main

delay
    movlw 0xFF
    movwf ciclo
loop
    decfsz ciclo,f
    goto loop
    retlw 0

    org 0xff		;Location of calibration value
    movlw 0xff		;Your calibration value
    
    end


