For a project I need a high frequency (analog) measurement.
each microsecond (or faster) a signal needs to be evaluated;
It is either rising, falling or steady.
I need to know the time between a rising signal and a steady signal, resolution < 1 microsecond.
First bridge i’d like to cross is having a analog measurement below 1 mirco.
Thus far I’ve been able to reduce it from 110 mirco to 17 by changing the prescale to 16.
I do not need to store the data, the only info i need is the time it takes from the signal to switch between the rising state and the steady state.
Would a ATtiny 45 work as an external ADC, they can run at 64MHz.
As long as your MCU's digital input characteristics are suitable, you could connect the same signal to a digital pin to evaluate the time between a rising signal and a steady signal. This would be much faster. The ADC could still be used to read the signal's value if required.
I do not need to store the data, the only info i need is the time it takes from the signal to switch between the rising state and the steady state.
This is very unclear. Do you mean the rise time of the signal? That is often defined as the time the signal takes to go from 10% of steady state amplitude to 90% of steady state.
I'm not sure where i picked up the 64 MHz, can't seem to reproduce it at this time.
The signal I want to measure is the (characteristic) flyback signal of a coil. The signal first rises to a peak level (start timer),and then decays until it becomes steady again (end timer). Or if the signal drops below a certain threshold.
Use two comparators and a flip flop to get digital signals. Then use a high speed oscillator to count the clock pulses between those two events.
No arduino needed.
The ATtiny85 has a PLL that runs at 64MHz. The CPU can use that as a clock source after being prescaled/4 (so, 16MHz). Timer1 can also be clocked from the PLL with a variety of prescalers, including /1 (so, 64MHz).
You don't need the PLL to speed up the ADC clock, though. The ADC (on other ATtinies as well as ATmega) has it's own clock which can be prescaled to various values separate from the CPU clock.
Could you elaborate a bit, i’m not sure i can follow you.
Perhaps you could use an interrupt pin.
The datasheet will specify the VIH and VIL levels.
VIH would be the peak level that triggers the interrupt and starts a timer (RISING interrupt).
VIL would signify that the signal is steady and stops the timer (FALLING interrupt).
The time would measure a significant portion of the signal, could scale this result to approximate other trigger levels.
You should be able to get accurate timing measurements with a logic analyzer that has adjustable trigger levels. The signal could be connected to 2 inputs, one input triggering on "rising edge" and the other at the required voltage level.