Go Down

Topic: Evaluate two signals -- Change input Timer Source between T1 and T0  (Read 87 times) previous topic - next topic

FlorMaye

Hi everyone,

I'm using this code to evaluate capacity (change of frequency) on a Bluno beetle ATmega328P (almoast same as Uno)

http://interface.khm.de/index.php/lab/interfaces-advanced/arduino-frequency-counter-library/


The code works fine but I need to evaluate two signals.
Is it possible to change the input Pin T1 of timer/counter 1 to T0 or one of the INT0/INT1?


Or do I need to switch between the two Signals externaly with Mosfet-switchs?

I need to use Timer 1 because this one uses 16 bit registers. Had a look into the .ccp-File and working with the Datasheet but doent find the register to change inputs.





I hope someone can help me with this 
Greetings Flo
 

pylon

Timer 1 is the only with 16bit registers on an ATmega328p. I recommend to change to a Mega2560 where you have 4 16bit counters.

gfvalvo

No technical questions via PM. They will be ignored. Post your questions in the forum so that all may learn.

FlorMaye

thanks first!

@Pylon 
I would change the MC, but I have an application where I do not have enough room for Arduino Mega


@gfvalvo
I read the chips datasheet and went pretty deep but could not fugure out if there is a way to change the import pins. From what I understand the T0/T1 is fixed to the timers. But I'm not an expert so might be wrong.


As I said, the last option is to somehow switch the signals externally with mosfets. But before I work on it, I want to be sure that there is no way in the program to do this.

Greetings Flo

Go Up