ST7565 LCD using a lot of SRAM

by bluenomad on Fri Nov 30, 2012 4:48 am

Hi,
I bought the ST7565 display because I wanted to use it to display the results of a variety of sensors I'm monitoring in an aquarium setup. It works fine in it's own program, but when I tried to add the code into my main sensor program, I was getting bizarre hangups. After playing with it for several days, I realized that when I call any functions to write to or clear the screen, this would cause my program to hang or prevent any results from displaying on the LCD or in the serial monitor. After running some tests with the code, I've realized that this display requires at least 1024 bytes of memory - essentially half of the SRAM. My main program requires about 1500 bytes of SRAM. So I'm over by about 500 bytes. Is there any way to minimize the memory usage of this display? Or should I return it and buy a different display which doesn't use so much RAM? I wish the specs had described this problem. It seems virtually useless if you can't run it with other system inputs. My program is not complicated.
Thanks.
bluenomad
 
Posts: 2
Joined: Wed Oct 17, 2012 6:32 pm

Re: ST7565 LCD using a lot of SRAM

by adafruit_support_bill on Fri Nov 30, 2012 5:58 am

This is noted in the tutorial:
The biggest downside is that you can't read from the LCD in serial mode, only write. This means that the chip has to keep track of the display (the KS0108 lets you read or write). So whatever microcontroller you use will need to spend 1024 bytes (1Kb) of RAM on the display memory. For some chips this is a little and some its a lot - you will need to check the micro's datasheet.


Another option would be to use the Mega which has much more available RAM.
User avatar
adafruit_support_bill
 
Posts: 25551
Joined: Sat Feb 07, 2009 9:11 am

Re: ST7565 LCD using a lot of SRAM

by Texy on Sun Dec 09, 2012 3:48 am

Ok, so if you are not interested in reading from the display, but you code 'knows' where everything needs to be written too, there is no need to actually store the complete displays 'memory' - correct?
Texy
Texy
 
Posts: 1
Joined: Sun Dec 09, 2012 3:45 am

Re: ST7565 LCD using a lot of SRAM

by adafruit_support_bill on Sun Dec 09, 2012 7:14 am

If you want to keep track of it all in your code, then you can get by without a frame buffer. For typical applications that would add a lot of code complexity.
User avatar
adafruit_support_bill
 
Posts: 25551
Joined: Sat Feb 07, 2009 9:11 am