Excelente Trabajo, aunque mi ssd1306, no muestra la imagen como se aprecia en el tuyo, a no ser que el mío se deba ajustar, pero es el TZT-SSD1306. Sabrías por qué?... lo hice con un stm32f4
Hi, I had this working on an BluePill, but after swapping to an STM32 Nucleo board im not getting anything to work. I changed the #include "stm32f1xx_hal.h" to #include "stm32f3xx_hal.h" n the 1306.h file to get it to compile. Is there any reason why t isnt working? Thank you :)
Would be awesome to see you explore a camera periph... QV7670 is very popular among DIY - thank you for this video though it's great and got me on the right track!
@@ControllersTech Also, is there an alternative to pins b7, b6 when hooking up this interface I need them for a SDA and SCL? I need those pins for another sensor and am trying to work around this.
Yes there is. After selecting the I2C in the CubeMx, Keep pressing ctrl key and select that pin. CubeMx will show you the alternative for that. Just drag and drop the selection to the new pin.
Hi, Im using Monochrome 0.96" 128x64 OLED from Adafruit, run the same code but it just doesn't work. Any suggestions? I'm using NUCLEO f411re development board
@@switcher3545 In 2 files fonts.h and main.h find the string #include "stm32f1xx_hal.h" and replace it on #include "stm32f4xx_hal.h". Don't copy HAL files from downloaded project, copy only lib files.
@@switcher3545 I can give fragment of code to check connection on I2C channel /* USER CODE BEGIN 2 */ place the code after this point if(HAL_I2C_IsDeviceReady(&hi2c1, OLED1.getCAddress(), 1, 10) == HAL_OK) //if ok led just ON { HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); } else //if No correct addr led BLINK { while (1){ HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); //my external led on this pin (replace it for y connection) HAL_Delay(500);} }
@@ControllersTech The fonts i could found are not using the same "mapping". So using them result in ""hieroglyphe" writing :) . The smallest i found and compatible is a 6x8. I'm looking for a smaller one. If someone found it ... Thanks.
@monjiro make sure you select the right pins for the i2c. Check the schematics of the board to see which pins you need to connect to. I am guessing that you have connected to the pins on the top right (scl and sda). When you enable i2c1 in cubemx, by default it will not configure these pins. You have to change the pin manually.
all SSD1306 have the same I2C address. So if u do connect them to the same I2C, they will show the same data. If you can somehow modify the address, then u can control them individually
if i can only set my HCLK to max of 48MHz. can that affect the scrolling? Only top part scrolls and the rest doesnt. not sure if its the code or hardware.
@@ControllersTech Thanks for the reply. I did the next thing, which could be ok: Gain every digit from a float value and add the next character to the digit '0' and update the screen with Putc function.
Hello, I'm using STM32F407G-Disc1 board interfacing with SSD1306 128x64 OLED. When I'm trying with Arduino, the OLED is working perfectly. But, it is not working with STM controller. Code is compiling without any errors. Still OLED is not giving any output. Do you know any possible solution ?
OK...SOLVED now .... no change in address with 0x78 only it working.but i dont know why its like that.previous mu oled is gone bad taken new oled and now its working
You can use the same code for it. Just make sure in the ssd1306.c, change the i2c operations to spi. That's all. You can watch my video about using spi generally.
@@ControllersTech I adjusted from ssd1306.h as (128x160) but it didn't work.I used 4.7k pull up resistor and I tried both address.Do you have any ideas?
yes, but follow this: -open "ssd1306.c" -in line 194 change "SSD1306_WRITECOMMAND(0x3F);" to "SSD1306_WRITECOMMAND(0x1F);" -in line 203 change "SSD1306_WRITECOMMAND(0x12);" to "SSD1306_WRITECOMMAND(0x02);" if you do that, you are sending , with I2C protocol the especific command to OLED 0.91(128x32) to change 128x64 to 128x32. Otherwise it will never work.
thanks you for making the wonderful tutorial about OLED display. I have try it and i am fail on display "hello world". i have double check the I2C (&hi2c1) and i am using stm32F103c8 which the pin for i2c (PA6 and PA7), BUT one this diff is i am using "STM32CubeIDE 1.0.0" to do it. CAN anyone help me by suggesting me about the possible problem, i suspect i must made a silly mistake. Thank you.
What error are u getting? Is the code compiling successfully? Make sure u update the display after writing anything. Or else you won't be able to see it. The code should work on all IDEs so stm32cube ide is not the problem
@@ControllersTech Thank you for the reply Controllers Tech, i getting not error, the code was successfully compiled, i have put the update of display which is "SSD1306_UpdateScreen()" after every writing, i even put the breakpoints to check the code is running and the result is: code is runing but OLED display nothing. i have check the OLED with my Arduino program and it is function well. I have run out of IDEA to test it, but i will keep trying to figure it out. Thanks for the help.
I am so blind, i can't believe i made this lower mistake. i am using the STM32F103 smart v2 MCU board and i confuse myself by the pin number .I even said that i use "PA6 and PA7" as hi2c1, but actually it is "PB6 and PB7", right now i am able to display "Hello world" on OLED. Thanks you for the help anyway and great video as always. I am appreciate, Thanks a lot .
@@ControllersTech is pull up resistor needed externally by circuit.directly i coneected ssd1306 with addres 0x3c and changed adress in program.but not working