X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/6dc0e5dfc2d00d5f2fd0cf684c87cf889b9d4ae9..4292be14c78b8f30075c9e4837dd026f6fec532e:/drivers/displays/bitmap/ssd1306/ssd1306.h diff --git a/drivers/displays/bitmap/ssd1306/ssd1306.h b/drivers/displays/bitmap/ssd1306/ssd1306.h index 2f4abf1..538cd4d 100644 --- a/drivers/displays/bitmap/ssd1306/ssd1306.h +++ b/drivers/displays/bitmap/ssd1306/ssd1306.h @@ -69,7 +69,7 @@ /*========================================================================= I2C Address - 011110+SA0+RW ... 0x78 for SA0 = 0, 0x7A for SA0 = 1 ---------------------------------------------------------------------*/ - #define SSD1306_I2C_ADDRESS (0x78) + #define SSD1306_I2C_ADDRESS (0x7A) #define SSD1306_I2C_READWRITE (0x01) /*=========================================================================*/ #endif @@ -109,16 +109,24 @@ #endif /*=========================================================================*/ + // Pin Definitions -#define SSD1306_DC_PORT (2) // Data/Command ... used for SA0 with I2C +// --------------- +// The following are only relevant for SPI mode! +// For I2C, connect Reset to the LPC1114 reset pin, and HW DC for 1 or 0 +// to set last I2C address but to 1 or 0. This means the OLED can not +// be reset in SW seperate from the MCU, but allows the OLED to be used +// with only the two I2C pins + +#define SSD1306_DC_PORT (2) // Data/Command ... also used as SA0 for I2C #define SSD1306_DC_PIN (1) -#define SSD1306_RST_PORT (2) // Reset (I2C + SPI) +#define SSD1306_RST_PORT (2) // Reset #define SSD1306_RST_PIN (2) -#define SSD1306_CS_PORT (2) // Select (SPI only) +#define SSD1306_CS_PORT (2) // Select #define SSD1306_CS_PIN (3) -#define SSD1306_SCLK_PORT (2) // Serial Clock (SPI only) +#define SSD1306_SCLK_PORT (2) // Serial Clock #define SSD1306_SCLK_PIN (5) -#define SSD1306_SDAT_PORT (2) // Serial Data (SPI only) +#define SSD1306_SDAT_PORT (2) // Serial Data #define SSD1306_SDAT_PIN (6) // Commands