I understand the signal goes to an input pin, but then what happens inside? For example, to measure frequency, common techniques would be: 1a) Configure free-running timer, and whenever a transition is detected, the ISR code would read the timer's counter to compute the frequency 1b) Configure Input-Timer Capture, where the timer value is latched when an edge is detected. The Isr code would read the timer's latched value to compute frequency 2) Configure a timer for a specific period of time, and count the number of ISR interrupts due to edge transitions that occur during that time to compute frequency Some STM32 have pins that can be configured for "External Clock Input" Input, where the hardware peripheral, automatically counts the number of transitions on the line! There's a post "External TRigger for TIMER 3" that even shows how a non-ETR pin (ex. CH3) can be used by as the input to the Slave Mode Controller (TIMx_CCMR1=1) by selecting the XOR of CH1,2,3 as the TI1 source (TIMx_CR2.TI1S = 1). However, I assume you still need a precise timer running to interrupt and see how many transitions were counted during that time?
@electronics.unmessed Жыл бұрын
Love your ideas of making inexpensive measurement equipment for hobbyists!
@siliconvalley40667 ай бұрын
FYI, If you set the ETR prescaler to divide by 8, it counts up to 240MHz. This is done by changing the SMCR register value: TIMER2_BASE->SMCR = (1
@gardeningfromscratch.Ай бұрын
Great project, I want to build but can't get it to compile in Arduino IDE 2.3.2, using STM32F103C8T6 just get lots of these "Compilation error: base operand of '->' is not a pointer". Any suggestions? Sorted ! I needed the dan.drown board definitions, not the "official" stm32 definitions.
@moonwalker573 Жыл бұрын
excellent
@NaderGator8 ай бұрын
cool project .. can this be done with "OLED Display Module 128X64 " ?!
@electronicscaos Жыл бұрын
Everything MCU'd nowadays... You can do it with some decade counters, an inverter buffer and a crystal for far cheaper and simpler.
@MirkoPavleskiMK Жыл бұрын
Maybe so, but making it would be much more complicated