Jenniffier Bieberbach

Problem with NE64 Interrupts

Discussion created by Jenniffier Bieberbach on Apr 3, 2007
Latest reply on Apr 4, 2007 by Mark Butcher
I'm trying to program a keypad (standard grayhill 4x4 matrix) with a DEMO9S12NE64.  I'm not using an encoder - I just wrote a simple function in C that checks each row to see if it has been asserted, then checks to see if the column is asserted (through a counter).  I wrote a timer interrupt to assert each column.  I used the following code to configure the timer.
 
  TSCR1 = 0x80; //enable timer
  TCTL1 = 0x00;
  TIOS = 0xF0;//Timer channels 4 - 7 act as output compare
  TIE = 0x40; //enable standard timer interrupt on Channel 6
  TSCR2 = 0x0E; //enable timer overflow & timer reset interrupts
I wrote the interrupt in main:
  
   interrupt void HandleTimerInterrupt(void)
 
Then added the appropriate entry in Vectors.c:
 
  HandleTimerInterrupt,                 /* 49 Default Timer CH6 interrupt FFE2*/
 
I configured the pins (on Port J) that I'm using for the columns using DDRJ (setting those that are being used for the columns as low)
 
I'm not sure what I'm missing, this interrupt never polls the columns, so I can't get anything out of my keypad!
 
(I'm new to MCU programming, so any help is greatly appreciated!)
 
Thanks!

Outcomes