version 0.0
rev 28/09/2021


OLED 0,96" Jaune et Bleu , I2C1 Hw MikroC
avec Fonctions grafiques et images BMP
(2021)




LCD OLED 0.96" (25x15mm) grafique 128x32 , PIC 18F26K22
(2021)

L'afficheur :

OLED LCD Display Module IIC I2C 0.96" 128x64 ou 128x32 ?

Description :
OLED display, no need backlight, self-illumination, the display performance is better than the traditional LCD display, also lower consumption.
Driver IC: SSD1306
Size: 0.96 inch OLED
Resolution: 128 x 64 ???
Dimensions: board= 28 x 28 mm, mais Display=25 mm x 15 mm utile ONLY !
IIC interface , Device Adresse fixe= 0x78 (8bits)!
Display Color: Yello 1ere page et Blue 3 pages

Pin Description:
1 VCC: Power > =4.0V minimum !
2 GND: Power Ground
3 SCL: Clock Line
4 SDA: Data Line




Hardware :
Base 18F26K22 --- liaison I2C1 SDA SCL
Base 18F26K22 -- liaison UART1 ---TX,RX ---prolific cable _USB-- YAT terminal PC
Alimentation via un bloc secteur 9V DC -- Regulateur DC/DC LM2906--ajustable 3.3V à 5V

Le controleur LCD est basé sur un SSD1306 .
Librairie : Driver_Oled_I2C1_Hw_18Fxxk22_2021_03.mcl
Header : Driver_oled_I2C1_HW_18FxxK22_2021_03.h

Le point clé est l'INITIALISATION correcte du LCD



Au demarrage du programme ... option recherche de l'adresse du device (LCD OLED)
ici adresse I2C device trouvé = 120 soit 0x78


Programme:

Enfin trouvé le bug sur le tracé de rectangle avec angles ronds

Driver_Oled_I2C1_Hw_18Fxxk22_2021_03.c

// Draw a rounded rectangle
void SSD1306_DrawRoundRect(Byte x, Byte y, Byte w, Byte h, Byte r)
{
// parties droites
SSD1306_DrawFastHLine(x + r, y, w - 2 * r); // Top
// bug ci-dessous 11-03-2021
// SSD1306_DrawFastHLine(x + r,
y + h - 1, w - 2 * r); // Bottom
SSD1306_DrawFastHLine(x + r,
y + h - 2, w - 2 * r); // Bottom
SSD1306_DrawFastVLine(x, y + r, h - 2 * r); // Left
SSD1306_DrawFastVLine(x + w - 1, y + r, h - 2 * r); // Right
// les 4 angles
SSD1306_DrawCircleHelper(x + r, y + r, r, 1);
SSD1306_DrawCircleHelper(x + w - r - 1, y + r, r, 2);
SSD1306_DrawCircleHelper(x + w - r - 1, y + h - r - 1, r, 4);
SSD1306_DrawCircleHelper(x + r, y + h - r - 1, r, 8);
}

Presentation :




Projet MikroC 7.60 :
version 11 mars 2021
images/t_Projet_Base_18F26K22_Test_OLED_I2C1_HW_128x64_2021.gif

Projet complet :
18F26K22_Test_OLED_SSD1306_I2C1_0.96p_Jaune_Bleu_2021_0312.zip
executable : Base_18F26K22_Test_OLED_I2C1_HW_128x64_2021_0312.hex
main source : Base_18F26K22_Test_OLED_I2C_128x64_2021_0312.c
Librairies : Driver_Oled_I2C1_Hw_18Fxxk22_2021_03.mcl
Headers : Driver_oled_I2C1_HW_18FxxK22_2021_03.h
*BMP datas dans le zip



voir aussi :
http://paulfjujo.free.fr/_18F47J53_Click/Clicker_18F47J53.htm#OLED_I2C
Test_OLED_1_3p_SSD1106_Bleu_128x64_18F26K22.htm



../common/mylogo_CI.jpg



Retour à l'index general