Datasheet
www.ti.com
SOFTWARE LISTING
TLV5619
SLAS172F – DECEMBER 1997 – REVISED FEBRUARY 2004
APPLICATION INFORMATION (continued)
; File: ramp.asm
; Description: This program generates a ramp.
;------------- I/O and memory mapped regs -----------
.include "regs.asm"
TLV5619 .equ 0084h
;------------- vectors -------------------------------
.ps 0h
b start
b INT1
b INT23
b TIM_ISR
*********************************************************************
* Main Program
*********************************************************************
.ps 1000h
.entry
start:
ldp #0 ; set data page to 0
; disable interrupts
setc INTM ; disable maskable interrupts
splk #0ffffh, IFR
splk #0004h, IMR
; set up the timer
splk #0000h, 60h
splk #0042h, 61h
out 61h. PRD
out 60h, TIM
splk #0c2fh, 62h
out 62h, TCR
; enable interrupts
clrc INTM ; enable maskable interrupts
; loop forever!
next idle ; wait for interrupt
b next
; all else fails stop here
done b done ; hang there
*********************************************************************
* Interrupt Service Routines
*********************************************************************
INT1: ret ; do nothing and return
INT23: ret ; do nothing and return
TIM_ISR:
; useful code
add #1h ; increment accumulator
sacl 60h
14