Yahoo Groups archive

Lpc2000

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

Message

Capture pin issues.

2005-05-05 by jase_ko

Okay this is the code that I'm trying:


void CapturePin() __attribute__ ((interrupt));
void CapturePin()
{
	unsigned long temp = T0CR2;
	SerialSendString("Hi");
	T0IR = 1;
	VICVectAddr = 0;
}

void InitCapture()
{
	VICVectAddr0 = (unsigned)CapturePin;
	VICVectCntl0 = 0x20 | 4;
	VICIntEnable = 0x00000010;

	PINSEL1 = 0x00000002;
	T0PR = 0x00000000;

	T0CCR = 0x000001C0;
  	T0TCR = 1;
	SerialSendString("Capture pin initialised\n");
}

When I turn on my signal generator, nothing happens even though I 
expect it to display "hi" on my terminal.
It works fine if I set the PINSEL to EINT0, instead of CAP.. what 
could be going on here?

thanks
Jason

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.