need some help to active a delay

Hi all, I'm new here, and new with arduino as well
i have an idea to tune a motorcycle engine as a "test" and i need to do the following

i need to "delay" a input signal a X amount of ms, where X goes from .1ms to 20ms depending on the value of an analog pin that will be a 10k potenciomenter , with 3 pins, +, signal out, and ground.

but i need this circuit to be working around 8000rpm, that will be 133hz ( as maximun )

the idea its to provide more power to a combustion engine of my brother motorcycle , but to provide more power the signal spark needs to be when the cilynder its on the top of the cycle, but the sensor its located on the button, so i dont really need to do any frequency measure, i just need to change the amout of delay that im adding, and to create diferent steps for that, for example at 1000rpm (16hz ( delay of 5ms) and then more and more...
can anybody give me an example or the documentation according this idea to achive this project ? is there any similar projects to this ?
and what is the maximun frecuency of operation that i can run a code like this ?

the next step will be to move this to a single pic,,, but i need to so several measures of performance and fuel consume

any tip is welcome :slight_smile:

AndresC4:
the next step will be to move this to a single pic,,, any tip is welcome :slight_smile:

Hmmm, are you sure you want to move from an arduino board to a single pic?

Texy

i need to "delay" a input signal

Is the input signal analog or digital? What voltage? How long is the signal HIGH or LOW, if it is a digital signal? Will one cycle complete and start over before the delayed cycle has completed?

the signal its digital at 12v, i can convert that to ttl , the fastest signal will be around 1200mhz
and it won't be shorter that 0.00083 seconds, the output need to be fix at around 0.00020 seconds cycle,
can this will be done with an atmega328 ?

the idea is to active the project with arduino due to the easy modification, and the next step will be to make a fix pic to reduce costs.
but all the experimental prices needs to be done in arduino