{"id":293,"date":"2017-02-15T04:43:58","date_gmt":"2017-02-15T04:43:58","guid":{"rendered":"http:\/\/bitmap2lcd.com\/blog\/?p=293"},"modified":"2017-02-16T20:01:03","modified_gmt":"2017-02-16T20:01:03","slug":"about-the-sitronix-st7528-grayscale-glcd","status":"publish","type":"post","link":"https:\/\/bitmap2lcd.com\/blog\/about-the-sitronix-st7528-grayscale-glcd\/","title":{"rendered":"About the Sitronix ST7528 grayscale GLCD"},"content":{"rendered":"<p><em>Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems.<\/em><\/p>\n<p>Bitmap2LCD V2.1b and upwards supports the Sitronix ST7528 grayscale GLCD<\/p>\n<p>The Sitronix ST7528 is a 16-Grey Scale Dot Matrix LCD Controller\/Driver<\/p>\n<p><strong><em>&lt; Quote &gt;<\/em><\/strong><\/p>\n<blockquote><p>The ST7528 LCD controller does not address rows directly, but rather groups of 8 rows in pages. The LCD memory on the controller is organized into 13 8-bit pages and 160 four-bit column addresses.<\/p>\n<p align=\"LEFT\">There are commands to set the starting page address and column address for a write operation, but no commands\u00a0to select a row address \u2013 you must determine what page the row you want to write is in and set the page address that includes that row. This also implies that if you want to write pixels on adjacent pages, you must address the first page and column(s), write the data, then increment the page address to write the pixels in the adjacent page.<\/p>\n<p align=\"LEFT\">The controller also happens to use what seems like a very bizarre way to load pixel data. Logically, once the address is set, you would write the 4-bit pixel data (or maybe write 2 pixels at a time with a single byte). However, since the addressing scheme addresses pages and not rows, this approach is not used.<\/p>\n<p align=\"LEFT\">Instead, one bit of data for the entire addressed column of pixels (8 vertical pixels) in the current page is written with each byte sent to the LCD. Since each pixel requires 4 bits of data to define the grayscale level, 4 bytes of data must be sent per column to fully define the bits. While this data is being clocked in, the \u201cmain\u201d column address does not change. Only after the fourth bit is written to a column is the main column address pointer automatically incremented inside the LCD controller so the next 4 bytes of data sent to the LCD will write the bit data for the next column.<\/p>\n<p align=\"LEFT\">To be complete, we must comment that the \u201ccolumn address\u201d that you send to the LCD controller is actually bits 9:2 of a larger column address inside the controller. The bottom two bits 1:0 are \u201cinternal column\u201d address bits. When the 4 bytes of data are written to the LCD controller by the MCU, the internal column address bits increment after each byte write. After the fourth byte is sent, the internal bits will roll from b\u201911\u2019 to b\u201900\u2019 and subsequently increase bit 2 of the column address. As you can probably guess, if you do not write LCD data to the controller in groups of 4 bytes, than you will not have complete data for the pixels and the internal LCD addressing will be corrupt.<\/p>\n<p align=\"LEFT\">The implication of all this is that you cannot ever write a single pixel on this LCD. The smallest number of pixels that can be refreshed is a 1 column x 8 row line and it will always take a minimum of four bytes sent to the LCD controller from the MCU to properly set those pixels. If you really do only want to update one pixel in the 1&#215;8 column, you must be sure to write the same data that is already present for the other 7 pixels so their information does not change. This is where keeping a local copy of all pixel data in the LCD RAM becomes essential as individual pixels can be changed in the local RAM as the application requires it, and pixel data for unchanged pixels will still be present for the LCD refresh&#8230;<\/p>\n<\/blockquote>\n<p><strong>&lt; End of Quote &gt;<\/strong><\/p>\n<p>Quote from this well\u00a0written\u00a0Application Note : \u00a0<a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/ST7528-Appnote.pdf\">ST7528 Appnote<\/a><\/p>\n<p><strong><span style=\"color: #ff0000;\">From Bitmap2LCD Version 3.0H<br \/>\n<\/span><\/strong><\/p>\n<ul>\n<li>Enable the Special Mode (<span style=\"color: #0000ff;\"><strong>blue arrow<\/strong><\/span>) for <strong>ST7528<\/strong> in the <strong>Output+Settings<\/strong> main menu<\/li>\n<li>To check it out, just draw 8 pixels in height in the work canvas, in one of the gray colors to be found inside the color picker ( in this example the chosen color is 7 )\u00a0 ( <span style=\"color: #ff0000;\"><strong>red arrow<\/strong><\/span> )<\/li>\n<li>Export Work Canvas to data array\u00a0 <a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2015\/11\/Start.bmp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2068\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2015\/11\/Start.bmp\" alt=\"\" width=\"16\" height=\"16\" \/><\/a><\/li>\n<li>Find your 8 pixels inside the data array, 4 x 0x77 , corresponding to the these 8 gray pixels ( <strong><span style=\"color: #008000;\">green arrow<\/span><\/strong> )<\/li>\n<\/ul>\n<p><a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/Bitmap2lcd_ST7528.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2642\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/Bitmap2lcd_ST7528.png\" alt=\"\" width=\"906\" height=\"830\" srcset=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/Bitmap2lcd_ST7528.png 906w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/Bitmap2lcd_ST7528-300x275.png 300w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/Bitmap2lcd_ST7528-768x704.png 768w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/Bitmap2lcd_ST7528-624x572.png 624w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><\/a><\/p>\n<p>When converting a picture into hex data for a graphic LCD\u00a0of 160 x 100 pixels , you will get 8320 Bytes, in vertical slices of 8 pixels in height. \u00a0( Normal Gray 4bpp Mode outputs slices of 2 pixels in height = 8000 bytes of data\u00a0)<\/p>\n<p>&#8212;&#8212;-<\/p>\n<p><strong><span style=\"color: #ff0000;\">Before Bitmap2LCD Version 3.0H <\/span><\/strong><\/p>\n<p>Here&#8217;s the needed configuration of Bitmap2LCD\u00a0for a data output for the\u00a0ST7528 :<\/p>\n<ul>\n<li>Enable the Special Mode (red Arrow) for ST7528 in the Output main menu<\/li>\n<li>Select the correct data\u00a0direction (blue arrow)<\/li>\n<li>Enable the Special Mode ON\/OFF Switch (green arrow)<\/li>\n<li>Select 4bpp Grayscale Mode in the Mode main menu<\/li>\n<\/ul>\n<p>When converting a picture into hex data for a graphic LCD\u00a0of 160 x 100 pixels , you will get 8320 Bytes, in vertical slices of 8 pixels in height. \u00a0( Normal 4bpp Mode outputs slices of 2 pixels in height = 8000 bytes of data\u00a0)<\/p>\n<p><a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/St7528-config.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-298\" title=\"St7528 config\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/St7528-config.jpg\" alt=\"\" width=\"678\" height=\"566\" srcset=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/St7528-config.jpg 678w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2012\/09\/St7528-config-300x250.jpg 300w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/a><\/p>\n<p>Other special Modes for the following Sitronix LCD controllers\u00a0are planed in future upgrades :<\/p>\n<p>4-Gray Graphic : ST7541 , St7571<\/p>\n<p>32-gray Graphic : ST7529 , ST7586<\/p>\n\t<div class=\"quickshare-container\">\r\n\t<ul class=\"quickshare-genericons quickshare-effect-round quickshare-effect-expand quickshare-small\">\r\n\t\t<li class=\"quickshare-share\"><\/li> \r\n\t\t<li><a href=\"https:\/\/facebook.com\/sharer.php?u=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fabout-the-sitronix-st7528-grayscale-glcd%2F&amp;t=About+the+Sitronix+ST7528+grayscale+GLCD+<+Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming\" target=\"_blank\" title=\"Share on Facebook\"><span class=\"quickshare-facebook\">Facebook<\/span><\/a><\/li>\t\t<li><a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fabout-the-sitronix-st7528-grayscale-glcd%2F&amp;text=About+the+Sitronix+ST7528+grayscale+GLCD+<+Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming\" target=\"_blank\" title=\"Share on Twitter\"><span class=\"quickshare-twitter\">Twitter<\/span><\/a><\/li>\t\t<li><a href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fabout-the-sitronix-st7528-grayscale-glcd%2F&amp;media=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fwp-content%2Fuploads%2F2012%2F09%2FBitmap2lcd_ST7528-300x275.png&amp;description=Bitmap2LCD+is+a+tool+for+programming+small+Graphic+LCDs+in+embedded+systems.+Bitmap2LCD+V2.1b+and+upwards+supports+the+Sitronix+ST7528+grayscale+GLCD+The+Sitronix+ST7528+is+a+16-Grey+Scale+Dot+Matrix+LCD+Controller%2FDriver+%26lt%3B+Quote+%26gt%3B+The+ST7528+LCD+controller%26hellip%3B\" target=\"_blank\" title=\"Share on Pinterest\"><span class=\"quickshare-pinterest\">Pinterest<\/span><\/a><\/li>\t\t<li><a href=\"http:\/\/linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fabout-the-sitronix-st7528-grayscale-glcd%2F&amp;title=About+the+Sitronix+ST7528+grayscale+GLCD&amp;source=Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming&amp;summary=Bitmap2LCD+is+a+tool+for+programming+small+Graphic+LCDs+in+embedded+systems.+Bitmap2LCD+V2.1b+and+upwards+supports+the+Sitronix+ST7528+grayscale+GLCD+The+Sitronix+ST7528+is+a+16-Grey+Scale+Dot+Matrix+LCD+Controller%2FDriver+%26lt%3B+Quote+%26gt%3B+The+ST7528+LCD+controller%26hellip%3B\" title=\"Share on Linkedin\" target=\"_blank\"><span class=\"quickshare-linkedin\">Linkedin<\/span><\/a><\/li>\t\t<li><a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fabout-the-sitronix-st7528-grayscale-glcd%2F\" target=\"_blank\" title=\"Share on Google+\"><span class=\"quickshare-googleplus\">Google+<\/span><\/a><\/li>\t\t\t\t\t\t\t\t<li><a href=\"mailto:?subject=Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming:+About+the+Sitronix+ST7528+grayscale+GLCD&amp;body=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fabout-the-sitronix-st7528-grayscale-glcd%2F\" target=\"_blank\" title=\"Share via Email\"><span class=\"quickshare-email\">Email<\/span><\/a><\/li>\t<\/ul>\r\n\t<\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems. Bitmap2LCD V2.1b and upwards supports the Sitronix ST7528 grayscale GLCD The Sitronix ST7528 is a 16-Grey Scale Dot Matrix LCD Controller\/Driver &lt; Quote &gt; The ST7528 LCD controller does not address rows directly, but rather groups of 8 rows in pages. The LCD [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[81],"tags":[124,15,123,119,55,118,38,121,37,122,120,80],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-grayscale-glcd","tag-16-gray-graphic","tag-16-gray-levels","tag-160x100","tag-glcd-controller","tag-graphic-lcd","tag-gray-shades","tag-grayscale","tag-grey-levels","tag-greyscale","tag-lcd-controller-ram","tag-sitronix","tag-st7528"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":24,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":2645,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions\/2645"}],"wp:attachment":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}