Graphic display RAM - GLCD 12864zw with st7920 chips

Started by Pen 4 months ago2 replieslatest reply 4 months ago67 views

Hi Everyone
I'm using the 12864zw GLCD display and have noticed what appears to be errors in the datasheet 

www.digole.com/images/file/Digole_12864_LCD.pdf

1. in basic instruction mode the Address counter for the display is quoted as being as follows (my findings are in brackets)

(PDF page 15 "Set DDRAM Address")
first line range 0x80 to 0x8F - I find the following (0x80 to 0x87)

second line range 0x90 to 0x9F- I find the following (0x90 to 0x97)

Third line range 0xA0 to 0xAF- I find the following (0x88 to 0x8F)

fourth line range 0xB0 to 0xBF- I find the following (0x98 to 0x9F)

2. in extended instruction mode The GDRAM memory is quoted as being as follows (my findings are in brackets)

(PDF page 9 Table 7 GDRAM display coordinates and corresponding address)

Horizontal address range 0x00 to 0x0F two bytes of data per addressI find (correct)

Vertical address range 0x00 to 0x2F I find the following (0x00 to 0x1F)

Also I've noticed that the graphic display is set out in two halves (top and bottom)

where top is mapped horizontal address 0x00 to 0x07 and bottom horizontal address 0x08 to 0x0F


I'd appreciate anyone's comments on this

thank you

[ - ]
Reply by BVRameshJanuary 2, 2018

Please refer to the page 4 Display Data RAM, which say that 64X2 bytes are available, and 16 characters by 4 lines:

Which means each line has: 16 character x 2 bytes in 16 bit Big endian order, (this is not mentioned specifically in data sheet).

The Table 4 referes the way data is stored.

If you are using CGROm from 0x02 to 0x7F, Then location 0x80 has 2 bytes, similarly 0x81 has 2 bytes, ... 0x87 has 2 bytes

which completes the 16 charaecters (including hi/lo)

If you switch to CGROM fonts beyond 0xA1, then you can see from 80 - 8F, each location will have 16 bit data (not 2 bytes). This 16 bit data you have to give in big Endian oredr, like 0xA1 - 0x00 0xA1.

You can also mix 2 bytes data and 16 bit character data only at word boundaires

In order to acheive this they have provided locations 0x80 - 0x8F.

Suppose we want to display characters which lie betwee 02-7F in one line, we should send two bytes at each location in big endian oredr, from 80 to 87.

Suppose we want to display charecters which lie beyond 0xA1 ... highest in one line, we sjould send two byets at eact location which will occupy 80-8F.

We can mix these two (characters 0x02-0x7f and characters > 0xa1) at word boundaries.

Hope this will clarify.


I will get back for Graphics display after 4-5 Hrs.


Regards,

BV Ramesh.

[ - ]
Reply by PenJanuary 2, 2018

Hi BV
You seem to be well informed about the display but you still didn't address my query see page 15 on the datasheet under (set DDRAM address)

If we look at the first line of the display in basic instruction set
The address counter range for the first line of the display is 0x80 to 0x87 not 0x80 to 0x8F as stated in the datasheet. We can only display 16 characters per line and it displays two characters per DDRAM address so 8 addresses per line and not 16

Line 1 is 0x80 to 0x87, Line 2 is 0x90 to 0x97, line 3 is 0x88 to 0x8F and line 4 is 0x98 to 0x9F

if you use the stated address counter for lines 3 and 4 you will not display characters as the stated address counter 0XA0 to 0xBF is not in the DDRAM

Two characters (ASCII) per address and 16 characters per line = 8 address locations per line. not 16 as stated in datasheet.
"AA" is displayed for one address