contrast fade on GLK12232-25-SM
Posted: Sat Mar 12, 2005 12:39 pm
I am delighted with my display and it is working BUT can you tell me where my brain failed?
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.
The above code displays the graph. It works and things wobble around as I block the light.
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.
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.