Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

2138 Match/Toggle Problems

2005-03-03 by Richard

Perhaps someone can clue me into the missing detail here.  I am trying
to get a match output pin to toggle on the LPC2138.  Here is the jist
of the code:

  PINSEL0 |= 0x0A000000;      //enable Match pins 1.0 and 1.1
  PINSEL0 &= 0xF5FFFFFF;

  PINSEL1 |= 0x40;            //enable match 1.2
  PINSEL1 &= 0xFFFFFF7F;

  T1IR = 0xFF;
  T1TCR = 0x2; /* Reset timer 1 */
  T1TC = 0;
  
  T1CTCR = 0x0;
  T1PR = 1; /* Set the timer 1 prescale counter */

  T1MCR = 0x2;      /* reset TC on MR0 */
  T1EMR = 0x3F0;    //enable match toggle outputs
  
  T1MR0 = 0x70000; /* Set timer 1 match register */
  T1TCR = 1;   /* Start timer 1 */

I can get an interrupt on a match, but Icannot get a pin to toggle.

Richard

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.