I want a 120 pixel bar graph to represent a one line picture from my TSL1401 optical linear array.
My array, photo, is loaded with unsigned char data in my program.
Code: Select all
// Data defined in photo. Now display on LCD
//
write_LCD(254); // Command prefix
write_LCD(88); // Clear screen
for (i=0; i <= array_size; ++i)
{
write_LCD(254); // Command prefix
write_LCD(108); // draw a line
write_LCD(i); // from x-location
write_LCD(photo[i]); // height = measured data
write_LCD(i); // vertical line at x
write_LCD(0); // reference location y=0
}
My problem is: The display fades accross the screen. Pixels in the first column are dark and they gradually fade off to nothing by column 80.
Any clues? array_size is not the problem.