Autor Tema: Display Oled SSD1306  (Leído 8243 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado Enner

  • PIC10
  • *
  • Mensajes: 47
Display Oled SSD1306
« en: 29 de Marzo de 2013, 03:40:51 »
Hola,

Me gustaria saber si alguien ha utlizado este display SSD1306 de 128x64 de 0,96"

http://learn.adafruit.com/monochrome-oled-breakouts
Librerias: https://github.com/adafruit/Adafruit_SSD1306

Ya que no encuentro librerias y tampoco se si se podria programar con Picbasic pro o Proton Basic.
Se que se puede programar en SPI o I2C.  Todo lo que he encontrado esta en C. y si estas librerias
puden servir para Picbasic pro o Proton.

Gracias, Saludos.

Desconectado rotting79

  • PIC12
  • **
  • Mensajes: 91
Re: Display Oled SSD1306
« Respuesta #1 en: 15 de Marzo de 2015, 22:26:32 »
Hey there

just start working on this OLED, as I work on PICs, I'm writing a library for them.

Yesterday I just draw some pixels, and were Ok on PIC16F886, but when I tried draw a horizontal line and a inclined line, the BYTE erase the first one, So the trick should be read first and then 'OR' the BYTE with the new to draw... sadly there is no READ Operation  over I2C from the OLED Display, And that's when I learn why they use a bigger uCronotroller for this s***t

Hola

Acabo de empezar a trabajar en este OLED, ya que trabajo en los PIC, estoy escribiendo una biblioteca para ellos.


Ayer acaba de presento algunas píxeles, y estaban bien en PIC16F886, pero cuando traté de dibujar una línea horizontal y una línea inclinada, la BYTE borrar la primera, Así que el truco debe leerse primero y luego 'OR' BYTE con el nuevo dibujar ... lamentablemente no hay ninguna operación de lectura sobre I2C de la pantalla OLED, y ahí es cuando me entero de por qué utilizan una uCronotroller más grande para este s *** t


So here is so far the Library, just the SetUp and Draw a Pixel so u can apply it meanwhile
Así que aquí es hasta el momento la Biblioteca, sólo la configuración y Dibuje un Pixel, así que puedes aplicarlo mientras tanto


Example
Código: C
  1. OLEDSetUp ( );
  2.         ClearOLED ( );
  3.  
  4.                 OLEDFill ( 0x00 );
  5.                 OLEDDisplay ( );
  6.                
  7.         for ( unsigned char i = 15; i < 100; i ++ )
  8.                 OLEDPixel ( i, 54, WHITE );
  9.  
  10. //      for ( unsigned char i = 15; i < 100; i ++ )
  11. //              OLEDPixel ( i, 27, WHITE );
  12.  
  13.         for ( unsigned char i = 1; i < 125; i ++ )
  14.                 OLEDPixel ( i, i, WHITE );

Library
Código: C
  1. /************ OLED Display.c *********/
  2.  
  3. #include "OLED Display.h"
  4.  
  5.  
  6.  
  7.  
  8. char OLEDSetUp ( void )
  9. {
  10.         __delay_ms ( 1 );                               // As OLDE VDD goes high sooner than VCC,
  11.         OLED_RESET_PIN = OFF;                   // we must wait to stabilize VCC
  12.         __delay_ms ( 1 );                               // OLED Reset pin.
  13.         OLED_RESET_PIN = ON;                   
  14.  
  15. // 1. Fundamental Commands.
  16.         OLEDCommand ( OLED_SETCONTRAST );                       // 0x81
  17.         OLEDCommand ( 0x2f );                                           // was 0x9F.
  18.         OLEDCommand ( OLED_DISPLAYALLON_RESUME );       // 0xA5
  19.         OLEDCommand ( OLED_NORMALDISPLAY );                     // 0xA6
  20.         OLEDCommand ( OLED_DISPLAYON );//--turn on oled panel
  21.  
  22. // 2. Scrolling.
  23.  
  24. // 3. Addressing.
  25.         OLEDCommand ( OLED_MEMORYMODE );                        // 0x20
  26.         OLEDCommand ( 0x00 );
  27.                
  28. // 4. Hardware Configuration.
  29.         OLEDCommand ( OLED_SETSTARTLINE | 0x00 );       // line #0
  30.         OLEDCommand ( OLED_SEGREMAP | 0x01 );           // WTF???
  31.         OLEDCommand ( OLED_SETMULTIPLEX );                      // 0xA8
  32.         OLEDCommand ( 0x3F );
  33.         OLEDCommand ( 0xC8 );                                           // WTF???
  34.         OLEDCommand ( OLED_SETDISPLAYOFFSET );          // 0xD3
  35.         OLEDCommand ( 0x0 );                                            // no offset
  36.         OLEDCommand ( OLED_SETCOMPINS );                        // 0xDA
  37.         OLEDCommand ( 0x12 );
  38.  
  39. // 5. Timing.
  40.         OLEDCommand ( OLED_SETDISPLAYCLOCKDIV );        // 0xD5
  41.         OLEDCommand ( 0x80 );                                           // the suggested ratio 0x80
  42.         OLEDCommand ( OLED_SETPRECHARGE );                      // 0xd9
  43.         OLEDCommand ( 0x22 );
  44.         OLEDCommand ( OLED_SETVCOMDETECT );                     // 0xDB
  45.         OLEDCommand ( 0x40 );
  46.  
  47. // 6?. Other
  48.         OLEDCommand ( OLED_CHARGEPUMP );                        // 0x8D
  49.         OLEDCommand ( 0x10 );
  50.  
  51.         return 0x00;
  52.         }

Hopefully the next weekend it is done!!
Esperemos que el próximo fin de semana está hecho !!
...On November 2nd, a PIC10 became self-aware and decided our fate in __delay_us ( 1 ); ...

Desconectado rotting79

  • PIC12
  • **
  • Mensajes: 91
Re: Display Oled SSD1306
« Respuesta #2 en: 15 de Marzo de 2015, 22:45:00 »
Here are some pics of the OLED working with the PIC16F886



I'll be working on the  PIC18F45K22 from tomorrow
Voy a estar trabajando en el PIC18F45K22 a partir de mañana
...On November 2nd, a PIC10 became self-aware and decided our fate in __delay_us ( 1 ); ...

Desconectado rotting79

  • PIC12
  • **
  • Mensajes: 91
Re: Display Oled SSD1306
« Respuesta #3 en: 16 de Marzo de 2015, 19:34:33 »
...On November 2nd, a PIC10 became self-aware and decided our fate in __delay_us ( 1 ); ...

Desconectado Arsenic

  • PIC10
  • *
  • Mensajes: 47
Re:Display Oled SSD1306
« Respuesta #4 en: 18 de Octubre de 2018, 18:03:12 »
Hola, amigos. Yo tengo uno de 128x32 también OLED i2c. Encontré una librería que puede llegar a servir. No sé si para el mío, pero tal vez para los suyos. Aquí va:
https://libstock.mikroe.com/projects/view/1489/0-96-inch-128-x-64-ssd1306-oled-display-demo


 

anything