I'm trying to take a 10bit ADC value and output it as an exponential pwm value to OCR0A/OCR0B.
CPU cycles are important so I would rather not do math or an if or switch statement.
Ideally some sort of lookup table would be best, but I spent the last day looking into options and I can't seem to find the right track. Arrays were a dead end as they are indexed from 0. Structures seemed to be viable, but I can't figure out how to select the correct member from the adc result.
Any ideas? Thanks!
edit: The numbers I gave for the pwm output are logarithmic, but you get the idea.