;******************************************************************************
;               HAPCAN Home Automation Project
;               Website: http://siwilo.com/hapcan/devices/diy
;******************************************************************************
;    Filename:                         template.asm
;    Firmware version:                 UNIV 1.0.255.X revision Y
        #define FIRMVER    .255        ;X user firmware version (.00 - .255)
        #define FIRMREV    .65535      ;Y user firmware revision (.00 - .65535)
;    Note:
;       This is a template file
;******************************************************************************


;******************************************************************************
;*** NEEDED DEFINITIONS *******************************************************
;******************************************************************************
		LIST P=18F2580					;directive to define processor
		#include <P18F2580.INC>			;processor specific variable definitions
	ORG		0x001000					;firmware version
		DB FIRMVER,FIRMREV/.256,FIRMREV-(FIRMREV/.256*.256)
;******************************************************************************
;*** MOVED VECTORS ************************************************************
;******************************************************************************
;PROGRAM RESET VECTOR
	ORG		0x001020
		goto	Main
;PROGRAM HIGH PRIORITY INTERRUPT VECTOR
	ORG		0x001030
		goto	HighInt
;RECEIVED LOW PRIORITY INTERRUPT VECTOR
	ORG		0x001040
		goto	LowInt
;******************************************************************************
;*** YOUR CODE ****************************************************************
;******************************************************************************
	ORG		0x001050
;********************************
;*** HIGH PRIORITY INTERRUPT ****
;********************************
HighInt:
		;your own code
	retfie

;********************************
;*** LOW PRIORITY INTERRUPT *****
;********************************
LowInt:
		;your own code
	return

;********************************
;*** MAIN PROGRAM ***************
;********************************
Main:
		;your own code
Loop:
		clrwdt
	bra		Loop

;******************************************************************************
;*** END OF MAIN PROGRAM ******************************************************
;******************************************************************************
		END

