Hi Majid,
I did a test with the Nokia 5110 display which has a resolution of 84 x 48 pixels.
Since you can only write to this Nokia display the JAL driver for this display keeps a pixel cache which is first updated with the pixel data and then written to the display so it is different from yours. In your case the driver reads data from the display,
updates that and writes it back.
With the following code I was able to write a box at the edges of the display (the delays are just to see it working) for the Nokia display:
glcd_clear_cache()
nokia_clear_screen()
delay_1s(1)
glcd_box(0,0,83,47)
glcd_cache_update()
delay_1s(3)
In the libraries the glcd_box function calls glcd_line function which in the end calls the glcd_write_pixel function. The first two functions are in glcd_common.jal but the glcd_write_pixel_function is device specific and is so part of the Nokia library and
part of the KS0108 library.
So if something is wrong then I assume it must be in the pixel function. So what you could do is test if you can write pixels in all corners of the display.
I used this code for the Nokia display and I see a pixel in each corner so that works correctly.
glcd_clear_cache()
nokia_clear_screen()
delay_1s(1)
glcd_write_pixel(0,0)
glcd_write_pixel(83,0)
glcd_write_pixel(0,47)
glcd_write_pixel(83,47)
glcd_cache_update()
delay_1s(3)
Can you test if you can write these pixels too using the resolution of your display?
The total program is attached in the zipfile.
Kind regards,
Rob