/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Newbie: counter use Primer 2 to count external digital signal

Username:     
Password:     
             

Forum
  • Index
  •  » circleOS
  •  » Newbie: counter use Primer 2 to count external digital signal

# 1   2009-06-17 15:19:01 Newbie: counter use Primer 2 to count external digital signal

alientechnology
New member
Registered: 2009-06-10
Posts: 2

Newbie: counter use Primer 2 to count external digital signal

Hi-

I already used the search function but found nothing that helped me too much...

I am working on a project to count impulses (which in the end should be written to a sd card every second with a time code and be displayed: total c/ cps).
I need to know now which input I can use to do so and if there is an internal counter.
If so- how to address it and initialize/ read/ clear it? I guess I can use pretty much each CX pin on the extension connector but which one is suited best (with internal counter?)?
Is there any demo software that might help me with this?

Thank you so much

(and I do not want to count Interrupts ;-)
Have to measure up to max. 100kcps- then the analogue stuff will pile up anyways ;-))

Offline

 

# 2   2009-06-18 06:52:46 Newbie: counter use Primer 2 to count external digital signal

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Newbie: counter use Primer 2 to count external digital signal

Read the 'timer' chapter in the 'STM32 Reference Manual' (available at the ST web site).
Most of the pins named CX_USART_.. are also connectable to an internal timer/counter. Or you can you CX_ADC_TIM too.. (PB0). I don't know what is the max frequency, but very often the pin is sampled at the clock freq. It should be at least several MHz (probably up to 36MHz).

Offline

 

  • Index
  •  » circleOS
  •  » Newbie: counter use Primer 2 to count external digital signal

Board footer