CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Why does OLED need RAM in the PIC Microcontroller?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
CMatic



Joined: 11 Jan 2012
Posts: 69

View user's profile Send private message

Why does OLED need RAM in the PIC Microcontroller?
PostPosted: Sun Jun 01, 2014 11:16 pm     Reply with quote

I am new to OLED .96" Display and while reading this forum, I can not clearly understand why the OLED display need to use the RAM in the uC? And why writing directly pixel by pixel functions are bad? Thnx
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 02, 2014 12:02 am     Reply with quote

You are asking questions about some PIC software driver for your OLED
display. But we don't have your driver file.

1. Post a link to the OLED driver file.

2. Post the manufacturer and part number of your OLED display.
Ttelmah



Joined: 11 Mar 2010
Posts: 19448

View user's profile Send private message

PostPosted: Mon Jun 02, 2014 12:22 am     Reply with quote

As a comment, ignoring the lack of detail for a moment, the graphic LCD driver may well give a clue.

On this there are two ways of using the driver. The first only uses a little RAM, and setting/clearing a pixel, involves sending the commands to read a byte where the pixel 'lives', then setting/clearing the pixel in this byte, and writing this back. Slow.
Then there is a second mode, where the PIC holds a copy of 'what is to be displayed', and setting/clearing a pixel is done by setting/clearing it in the 'copy', and then writing the copy to the display.

I'd suspect your OLED, is being driven in this second manner.
Some do not offer the ability to read, and so can only be driven this way. These would have to have the whole display held in the PIC RAM.
Some are super smart, and give high level commands to draw lines etc., and require almost no PIC RAM.
Some can be driven either way but at a cost in speed.

So as PCM_programmer says 'details'.
CMatic



Joined: 11 Jan 2012
Posts: 69

View user's profile Send private message

Why does OLED need RAM in the PIC Microcontroller?
PostPosted: Mon Jun 02, 2014 2:49 pm     Reply with quote

PCM programmer wrote:
You are asking questions about some PIC software driver for your OLED
display. But we don't have your driver file.

1. Post a link to the OLED driver file.

2. Post the manufacturer and part number of your OLED display.


Thank you PCM Programmer for your reply. I will try to clarify my question. I have bought the 0.96" OLED with SSD1306 controller chip. I have searched the forum but after reading all the OLED comments, I was wondering why the Pic16F88 chip was a poor choice for driving this OLED display as it has RAM 368 bytes but the OLED display needs about 1K of RAM. But I don't understand exactly why this is bad?
CMatic



Joined: 11 Jan 2012
Posts: 69

View user's profile Send private message

Why does OLED need RAM in the PIC Microcontroller?
PostPosted: Mon Jun 02, 2014 2:58 pm     Reply with quote

Ttelmah wrote:
As a comment, ignoring the lack of detail for a moment, the graphic LCD driver may well give a clue.

On this there are two ways of using the driver. The first only uses a little RAM, and setting/clearing a pixel, involves sending the commands to read a byte where the pixel 'lives', then setting/clearing the pixel in this byte, and writing this back. Slow.
Then there is a second mode, where the PIC holds a copy of 'what is to be displayed', and setting/clearing a pixel is done by setting/clearing it in the 'copy', and then writing the copy to the display.

I'd suspect your OLED, is being driven in this second manner.
Some do not offer the ability to read, and so can only be driven this way. These would have to have the whole display held in the PIC RAM.
Some are super smart, and give high level commands to draw lines etc., and require almost no PIC RAM.
Some can be driven either way but at a cost in speed.

So as PCM_programmer says 'details'.


Thank you Ttelmah. I have a OLED 0.96" with SSD1306 controller. My question was regarding the second way, so when the uC completes an I/O operation to the OLED it is much slower then reading uC RAM and writing to the external OLED Display.
Jerson



Joined: 31 Jul 2009
Posts: 125
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Mon Jun 02, 2014 11:26 pm     Reply with quote

You say that a particular chip is bad in conjunction with OLED 0.96" I have used such a display in the recent past.

1 - You will need quite a bit of ROM space to hold all the fonts you wish to use.
2 - If you need to do lots of random image type operations, it will be better to use a shadow memory in RAM to get a good frame update rate(FPS). The SSD1306 has its own buffer to refresh the LCD and in most cases can be used as the shadow memory. However, using the SSD memory is much more slower than using a page buffer right on your micro controller.

If you are going to use the OLED mainly for displaying fonts and a few line graphics, the amount of RAM on the chip may not be very important. You will need much more ROM for any amount of decent graphics.

Usually a chip with ROM capacities of >32kb is suggested for graphic type lcd operations simply because you cannot work with just one font. You may need a couple of fonts at least; one small size, one big size.
Ttelmah



Joined: 11 Mar 2010
Posts: 19448

View user's profile Send private message

PostPosted: Tue Jun 03, 2014 12:24 am     Reply with quote

Also, the speed in talking to the chip, will depend on the interface being used.
The fastest 'low number of pins' interface, is the four wire SPI interface. Use this with the hardware SPI on the PIC, and a byte can be sent in just a couple of PIC instruction times. The I2C is slower, but again uses a nice low pin count.

Key problem is that the smaller interfaces (I2C/SPI), have the following comment in the data sheet:

"No data read is provided in serial mode operation."

This explains why the RAM in the PIC is needed.....

If you switch to one of the parallel interfaces, then data read is supported, but then twelve pins are needed on the PIC to control the interface.

So assuming the driver you have uses SPI or I2C, then the answer to your original question is in the data sheet.
CMatic



Joined: 11 Jan 2012
Posts: 69

View user's profile Send private message

PostPosted: Tue Jun 03, 2014 1:11 pm     Reply with quote

Jerson wrote:
You say that a particular chip is bad in conjunction with OLED 0.96" I have used such a display in the recent past.

1 - You will need quite a bit of ROM space to hold all the fonts you wish to use.
2 - If you need to do lots of random image type operations, it will be better to use a shadow memory in RAM to get a good frame update rate(FPS). The SSD1306 has its own buffer to refresh the LCD and in most cases can be used as the shadow memory. However, using the SSD memory is much more slower than using a page buffer right on your micro controller.

If you are going to use the OLED mainly for displaying fonts and a few line graphics, the amount of RAM on the chip may not be very important. You will need much more ROM for any amount of decent graphics.

Usually a chip with ROM capacities of >32kb is suggested for graphic type lcd operations simply because you cannot work with just one font. You may need a couple of fonts at least; one small size, one big size.


Thank you Jerson. Now it makes a lot more sense to me why we need more ROM.
CMatic



Joined: 11 Jan 2012
Posts: 69

View user's profile Send private message

PostPosted: Tue Jun 03, 2014 1:13 pm     Reply with quote

Ttelmah wrote:
Also, the speed in talking to the chip, will depend on the interface being used.
The fastest 'low number of pins' interface, is the four wire SPI interface. Use this with the hardware SPI on the PIC, and a byte can be sent in just a couple of PIC instruction times. The I2C is slower, but again uses a nice low pin count.

Key problem is that the smaller interfaces (I2C/SPI), have the following comment in the data sheet:

"No data read is provided in serial mode operation."

This explains why the RAM in the PIC is needed.....

If you switch to one of the parallel interfaces, then data read is supported, but then twelve pins are needed on the PIC to control the interface.

So assuming the driver you have uses SPI or I2C, then the answer to your original question is in the data sheet.


Sir you hit it right on the head! Its in the data sheet, No data read is Serial mode operation. Thanks very much.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group