??? 02/15/05 18:57 Read: times |
#87562 - lcd_not_busy(); Responding to: ???'s previous message |
this is not the only problem, the major problem is the read modify write scheme to be done 3840 times each time calling lcd_not_busy() 7 times.
to set a pixel look at the trouble microcontroller goes through: void lcd_set_pixel(x, y) { address = y * 30 + (x >> 3); // convert x y into sequential address (30 columns) lcd_write_data(address & 0x0ff); // write lower byte first lcd_write_data(address >> 8); // write upper byte lcd_write_command(LCD_ADDRESS_POINTER_SET); // position cursor at that address lcd_write_command(LCD_DATA_READ_NO_INCREMENT); // read current byte data = lcd_bit_to_byte(7 - (x % 8)); data = data | lcd_read_data(); // read existing byte( my pixel + 7 neighbours) lcd_write_data(data); lcd_write_command(LCD_DATA_WRITE_NO_INCREMENT); } Did you see why i'm getting something like 10 seconds for my vertical line (128 pixels) to scan the 240 pixels display width? If I had a buffer memory I don't have to worry about reading from display, I only write chunks of 8 pixels at a time with auto increment address. where I acheive much higher speed! |