lpcware

Frequency Counter

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by santner on Wed May 16 05:48:28 MST 2012
I'm trying to setup a counter using TIMER0.  I have the LPC4350 Hitex board and I'm using pin 1.17 as my external clock input (this is coming from a function generator set at 100kHz, 3.3v, 50% duty cycle).  In the code I first setup the pin as an input configured for FUNCTION4 (T0_CAP3 Input).  I then configure the GIMA to route this pin to TIMER0.  I also set TIMER0->CTCR = 0xd.  Finally, I enable the timer.  After some analysis what I find is that there is a scale factor of 1/8.  So rather than seeing 100,000 ticks per second, I'm seeing 100,000/8 ticks per second.  Any ideas or examples which show how to accomplish this?

Outcomes