Texas Instruments MSP50C614 User Manual
Page 364

Implementation Details
5-64
nop
ret
;****************************************************************
; Dummy interrupt routines
;****************************************************************
DAC_ISR
TIMER2_ISR
TIMER1_ISR
PORTD2_ISR
PORTD3_ISR
PORTF_ISR
PORTD4_ISR
PORTD5_ISR
DUMMY_ISR
nop
INTE
iret
Here is a sample C–– file that accesses the routines.
#ifdef DOC_FILE
#*******************************************************************************
#File: main.cmm
#
#Version: Release 1.00 25 MAY 99
#
#Description: Main routine for 614 lock demo
#
Demonstrates use of assembly routines with C––
#
Utilizes the microswitches and LED’s on a Speech
#
Code Development Unit. Waits for user input on the switches.
#
The correct sequence is MS7, MS9, MS7, MS10. If the correct
#
sequence is detected then all LED’s will light for 5 seconds.
#
As soon as an incorrect sequence or portion of the sequence is
#
detected the LED’s will flash and the procedure will repeat.
#
Due to the indication of an incorrect sequence partway through,
#
there are only 4! combinations needed to find a sequence of length
4.
#
The difficulty of determining the code could be increased greatly
by
#
using multiple key combinations (MS7 and MS8 simultaneously for ex-
ample )
#
or by only indicating an incorrect code after the sequence is com-
plete.
#
#Revisions:
#
#Copyright: (c) Copyright 1999 Texas Instruments, Inc.
# All Rights Reserved
#*******************************************************************************
#endif
#include ”ram\ram.h”
cmm_func
asminit();
cmm_func
wait(int x)
; // wait function ( x is ms)
cmm_func
oport(int x, int y) ; // output to a port
cmm_func
cport(int x, int y) ; // configure a port