Modified Adafruit GFX library with support for selecting displays using an 74HC4067 Analog Multiplexer

Dependents:   mbed_oled

Fork of Adafruit_GFX by Neal Horman

Files at this revision

API Documentation at this revision

Comitter:
jimconner
Date:
Tue Feb 03 13:04:17 2015 +0000
Parent:
17:bf0e4072b06d
Child:
19:f393e67ed0b5
Commit message:
Fixed display offet issue whereby the start line was not reset back to the top of the screen during a reset, and sometimes moved during normal operation.

Changed in this revision

Adafruit_SSD1306.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Adafruit_SSD1306.cpp	Fri Jan 30 00:00:56 2015 +0000
+++ b/Adafruit_SSD1306.cpp	Tue Feb 03 13:04:17 2015 +0000
@@ -139,6 +139,12 @@
 // Send the display buffer out to the display
 void Adafruit_SSD1306::display(void)
 {
+	// I was hitting a problem where the start line was not going back to zero during reset
+	// Setting the page start and end addresses seems to fix that.
+	command( 0x22 ); // Set page start and end addresses
+	command( 0x00 ); // start at zero
+	command (0x07) ; // end at seven.
+	
 	command(SSD1306_SETLOWCOLUMN | 0x0);  // low col = 0
 	command(SSD1306_SETHIGHCOLUMN | 0x0);  // hi col = 0
 	command(SSD1306_SETSTARTLINE | 0x0); // line #0