Skip to content

Instantly share code, notes, and snippets.

Created April 28, 2015 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/848875129e7cf16e110f to your computer and use it in GitHub Desktop.
Save anonymous/848875129e7cf16e110f to your computer and use it in GitHub Desktop.
Timer8_1INT.asm
;;*****************************************************************************
;;*****************************************************************************
;; FILENAME: Timer8_1INT.asm
;; Version: 2.70, Updated on 2015/3/4 at 22:27:48
;; Generated by PSoC Designer 5.4.3191
;;
;; DESCRIPTION: Timer8 Interrupt Service Routine
;;-----------------------------------------------------------------------------
;; Copyright (c) Cypress Semiconductor 2015. All Rights Reserved.
;;*****************************************************************************
;;*****************************************************************************
include "m8c.inc"
include "memory.inc"
include "Timer8_1.inc"
;-----------------------------------------------
; Global Symbols
;-----------------------------------------------
export _Timer8_1_ISR
AREA InterruptRAM (RAM,REL,CON)
;@PSoC_UserCode_INIT@ (Do not change this line.)
;---------------------------------------------------
; Insert your custom declarations below this banner
;---------------------------------------------------
;------------------------
; Constant Definitions
;------------------------
;------------------------
; Variable Allocation
;------------------------
;---------------------------------------------------
; Insert your custom declarations above this banner
;---------------------------------------------------
;@PSoC_UserCode_END@ (Do not change this line.)
AREA UserModules (ROM, REL)
;-----------------------------------------------------------------------------
; FUNCTION NAME: _Timer8_1_ISR
;
; DESCRIPTION: Unless modified, this implements only a null handler stub.
;
;-----------------------------------------------------------------------------
;
_Timer8_1_ISR:
;@PSoC_UserCode_BODY@ (Do not change this line.)
;---------------------------------------------------
; Insert your custom code below this banner
;---------------------------------------------------
; NOTE: interrupt service routines must preserve
; the values of the A and X CPU registers.
INC [_timer_1msec]
CMP [_timer_1msec],10 ;check for 10msec
JZ time_10msec
reti
time_10msec:
MOV [_timer_1msec],0
INC [_timer_10msec]
CMP [_timer_damp_pos],7fh ;check maximum
JZ skip_damp_pos
INC [_timer_damp_pos]
skip_damp_pos:
CMP [_timer_10msec],10 ;check for 100msec
JZ time_100msec
reti
time_100msec:
MOV [_timer_10msec],0
INC [_timer_heart_beat]
INC [_timer_100msec]
CMP [_timer_100msec],10 ;check for 1sec
JZ time_1sec
reti
time_1sec:
MOV [_timer_100msec],0
INC [_timer_sample_freg]
;---------------------------------------------------
; Insert your custom code above this banner
;---------------------------------------------------
;@PSoC_UserCode_END@ (Do not change this line.)
reti
; end of file Timer8_1INT.asm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment