Colt45
Lifer
I'm working on a little project that involves a 10bit ADC.
I want to take the adc value and then read the output value off an array.. simple enough.
but... I don't need the 10bit accuracy. a 1KB array is kind of excessive when 100B would be accurate enough. (not to mention I've only got 8KB of ROM)
so would the best way of doing this?
I was thinking to take the ADC input, divide by 10 and then read that off a 102 byte array?
Or is there an easier way?
I'm not terribly good at this so any ideas would be good 🙂
or is there a short way of writing an array with duplicate values? i.e. values 0 - 20 (out of 1024) are all 0xFF or something like that.
thanks
I want to take the adc value and then read the output value off an array.. simple enough.
but... I don't need the 10bit accuracy. a 1KB array is kind of excessive when 100B would be accurate enough. (not to mention I've only got 8KB of ROM)
so would the best way of doing this?
I was thinking to take the ADC input, divide by 10 and then read that off a 102 byte array?
Or is there an easier way?
I'm not terribly good at this so any ideas would be good 🙂
or is there a short way of writing an array with duplicate values? i.e. values 0 - 20 (out of 1024) are all 0xFF or something like that.
thanks