Hello there,
I am currently working on a pic assembly project converting the results from an acceleromet into an 8 bit LED bar graph.
I can get output from the accel but now i need to convert the results into bar graph and i'm looking for an efficient way to do this. what i need is 255 to equal 11111111
127 to equal 11110000 or (00001111) and 0 00000000
the only way i can find it subtracting results from determined values, i.e. if i had a 255, subtract it from 233, if the result sets of a carry flag then i output 11111111, but this is a very inconvenient way to do it if anyone can help, thanks.