EmbeddedRelated.com
Forums

Pulse/Event Counter

Started by Matthew Bivans July 30, 2002
You could use your input signal to drive the Timer clock, then use a compare
block from that timer to interrupt when the compare value is reached.

I'm not familiar with the F413 (F149 is my game), but look for TACLK or
TAINCLK  to use as the pulse input.  Then configure TimerA to use the respective
pin as the clock source, and set CCR0 to compare on the value you want.  When
the compare interrupt occurs, increment your compare value, or reset the timer
to start over from zero.

Although, if your signal is relatively low frequency, you could just use a port
pin interrupt and count the pulses manually.

Read up on TimerA (or TimerB) in the users guide and check the F413 spec. for
the specific F413 implimentation.

cheers,
matt b.

-----Original Message-----
From: mehmetozcelebi [mailto:mehmetozcelebi@mehm...]
Sent: Tuesday, July 30, 2002 10:59 AM
To: msp430@msp4...
Subject: [msp430] pulse/event counter


Dear All,
  I am new to the MSP430 and have to implement an event/pulse 
counter using the MSP430F413.
The requested task is:
   Counting the incoming Pulses into a PORT pin. 
   Generating an interrupt whenever a predefined number is reached.

How could I use the hardware counter/timer to accomplish the 
requested task? Are there any application notes / examples?

Thanks






.

 

">http://docs.yahoo.com/info/terms/ 



Beginning Microcontrollers with the MSP430