arduino use a 7 bit address pbp uses an 8 bit addresss , correct address to use is (arduino address)<<13. Confirmed the proper oled address with the Arduino (0x3C). I made the change in the demo.pbp file
0x3c<<1 = 0x78
arduino use a 7 bit address pbp uses an 8 bit addresss , correct address to use is (arduino address)<<13. Confirmed the proper oled address with the Arduino (0x3C). I made the change in the demo.pbp file
0x3c<<1 = 0x78
Warning I'm not a teacher
thanks Richard,
I had no idea. I changed the address back to 0x78 just now and I still don't get anything on the screen. I get this ASM Warning in the results window after compiling. Not sure if it matters
[ASM WARNING] SD1306_DEMO_16.ASM (400) : Found label after column 1. (GLCD_BAR?CCBWC)
[ASM WARNING] SD1306_DEMO_16.ASM (432) : Found label after column 1. (GLCD_BAR?CCBWC)
it does matter, it means you are not compiling the code you posted.I get this ASM Warning in the results window after compiling. Not sure if it matters
[ASM WARNING] SD1306_DEMO_16.ASM (400) : Found label after column 1. (GLCD_BAR?CCBWC)
[ASM WARNING] SD1306_DEMO_16.ASM (432) : Found label after column 1. (GLCD_BAR?CCBWC)
Found label after column 1 means the macro you are trying to compile does not exist.
the GLCD_BAR usercommand does not exist in the original include it was added to for louis' setup and only a small subset of input var combinations are
catered for. i have not tested the added code and am not sure what louis wound up with.
get the demo working first
Warning I'm not a teacher
thanks, I went back and used the original ssd1306_I2C.inc. Now no warning when I compile. With no changes to the demo I still can't get anything to show on the oled. To make sure the oled hardware is still good I just checked it with the arduino and it's working fine. I've triple checked my wiring and don't see any mistakes.
i havent used one of those displays for some time ,my other demo for a pic16f1619 used the mssp i2c module
try this ,it worked on my curiosity board , plugged straight in to click socket
Code:'**************************************************************** '* Name : ssd1306_DEMO.PBP * '* Author : richard * '* Notice : * '* : * '* Date : 19/11/2017 * '* Version : * '* Notes : plugs into click port note !!!!sda/scl swapped on click skt* '* :FOR pic 16F1619 SSD1306 * '**************************************************************** #CONFIG __config _CONFIG1, _FOSC_INTOSC & _PWRTE_OFF & _MCLRE_ON & _CP_OFF & _BOREN_ON & _CLKOUTEN_OFF & _IESO_OFF & _FCMEN_OFF __config _CONFIG2, _WRT_OFF & _PPS1WAY_OFF & _ZCD_OFF & _PLLEN_OFF & _STVREN_ON & _BORV_HI & _LVP_ON __config _CONFIG3, _WDTCPS_WDTCPS6 & _WDTE_OFF & _WDTCWS_WDTCWS100 & _WDTCCS_LFINTOSC #ENDCONFIG define OSC 32 ; --- *** Oscillator *** --------------------------------------------------- OSCCON = %11110000 ;32 MHz, ANSELb = 0 ANSELA = 0 ANSELC = 0 char var byte x var byte y var byte BUFF VAR BYTE[16] ;use this define for hw i2c #define hwi2c 1 #DEFINE PIC16 1 ;set and uncomment these to use softi2c 'SCL var PortB.4 ' I2C Clock 'SDA var PortB.6 ' I2C Data RB VAR WORD ;set these to match display ssdheight con 7 ; 7 = 8 PAGES 64*128 , 3 = 4 pages 32*128 ssdwidth con 127 ; 128 PIXELS WIDE sdd1306_addr con $78 Include "ssd1306_I2C.INC" ' bring it in include "font7x5_16.bas" '========================== MAIN Routine ============================== TRISB = $F0; PPSLOCK = $55; PPSLOCK = $AA; PPSLOCK = 0 ; unlock PPS SSPCLKPPS = $0C; //RB4->MSSP:SCL; SSPDATPPS = $0E; //RB6->MSSP:SDA; RB6PPS = $11; //RB6->MSSP:SDA; RB4PPS = $10; //RB4->MSSP:SCL; PPSLOCK = $55; PPSLOCK = $AA; PPSLOCK = 1; ; lock PPS gosub glcd_init GLCD_CLR BIG_TEXT = 0 ARRAYWRITE BUFF,["READY",0] GLCDSTR 10,1,BUFF
Warning I'm not a teacher
unfortunately I don't get anything on the oled
Maybe it is nonsense this but, is there a contrast control? I had an issue once on LCD with this.
Ioannis
Bookmarks