Jump to content

How to program OLED with STM32

RTX 3090
10 hours ago, WereCatf said:

Press and hold the boot0 - button down until it has successfully begun the flashing - process. Or, if that doesn't work, press the boot0 - button down and hold it, then press nrst, then release the nrst and then release boot0, after which it should be in flashing-mode.

Which SSD1036 library should I use for the Arduino IDE, I can't find any that work

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

46 minutes ago, RTX 3090 said:

Which SSD1036 library should I use for the Arduino IDE, I can't find any that work

Adafruit's library should work just fine.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, WereCatf said:

Adafruit's library should work just fine.

When I install the STM32DUINO the Adafruit for STM32 does not automatically install. How do I do that manually

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, WereCatf said:

Adafruit's library should work just fine.

Does Arduino require Java ? Am trying to install that now and see if it helps

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, RTX 3090 said:

When I install the STM32DUINO the Adafruit for STM32 does not automatically install. How do I do that manually

It's not even supposed to be automatically installed. You go to Sketch -> Include library -> Manage Libraries and install any libraries you wish to use from there.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, WereCatf said:

It's not even supposed to be automatically installed. You go to Sketch -> Include library -> Manage Libraries and install any libraries you wish to use from there.

Hi, I have managed to install everything and even compile correctly but it is still not working. 

I am using an STM32F103C8 as it recommended to do so. 

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

28 minutes ago, RTX 3090 said:

I am using an STM32F103C8 as it recommended to do so. 

Your board doesn't have an STM32F103C8 on it, it has an STM32F401something (the picture is too blurry to read.) Selecting the wrong microcontroller is obviously not going to work.

 

Also, as I mentioned, you need to test in the sketch if the display uses the 0x3C or 0x3D address.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, WereCatf said:

Your board doesn't have an STM32F103C8 on it, it has an STM32F401something (the picture is too blurry to read.) Selecting the wrong microcontroller is obviously not going to work

I swapped the board for a blue pill as it said it is better with that

 

2 hours ago, WereCatf said:

Also, as I mentioned, you need to test in the sketch if the display uses the 0x3C or 0x3D address.

But should the display not at least power on when it is getting a signal

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, RTX 3090 said:

But should the display not at least power on when it is getting a signal

It's an OLED-display, it doesn't have a backlight, so there's nothing for you to see, even if it did get power.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, WereCatf said:

It's an OLED-display, it doesn't have a backlight, so there's nothing for you to see, even if it did get power

Am I supposed to feed it 3.3 or 5v on VCC

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, RTX 3090 said:

Am I supposed to feed it 3.3 or 5v on VCC

Check where you bought it from, it should say its specs there. I don't have that display.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, WereCatf said:

Check where you bought it from, it should say its specs there. I don't have that display.

It says either so I don't know which one is best. I guess I'll try again with 5V

 

image.png.f0d3547dce0f7acfa95df1d875126d52.png

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, RTX 3090 said:

It says either so I don't know which one is best.

Then it shouldn't matter which one you use, it should work fine with either.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, WereCatf said:

Then it shouldn't matter which one you use, it should work fine with either.

I am supposed to keep boot 0 at the value 1 whilst uploading right ? 

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, RTX 3090 said:

I am supposed to keep boot 0 at the value 1 whilst uploading right ? 

No need to. If it successfully begins to upload, you don't need to keep holding boot 0 down.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, WereCatf said:

No need to. If it successfully begins to upload, you don't need to keep holding boot 0 down.

Hi, it fully compiled and uploaded the code but still nothing on the OLED

Using Parser : Raw BINARY
Interface serial_w32: 115200 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote address 0x0800888c (100.00%) Done.

Starting execution at address 0x08000000... done.

I used this guide to help me change the code from 64 to 32

https://squonk42.wordpress.com/2016/11/15/generic-stm32f103c8t6-board-with-ssd1306-oled-display/

 

Any ideas as to why this is happening ? Screen is still fully blank btw

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, RTX 3090 said:

That guide is bad and it's also outdated, it's from 2016. None of those "fixes" are needed anymore. Undo any changes you made and just use the standard ssd1306_128x32_i2c example-sketch.

 

Just make sure that all four wires are connected properly and on the correct pins, ie. VCC to 3.3V, GND to GND, SCL to SCL and SDA to SDA, then try the sketch. If it's not working, change the address from 0x3C to 0x3D and try again, like I have now said multiple times.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, WereCatf said:

use the standard ssd1306_128x32_i2c example-sketch

Ok, will try now. I thought because it didn't say STM32 it won't work

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, RTX 3090 said:

I am now getting this error again

Well, did you install that library?

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, WereCatf said:

Well, did you install that library?

Shouldn't that have come with the all in one STM32 library

image.png.d0c1077c1d098591569dc16fe7a4b81f.png

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, RTX 3090 said:

Shouldn't that have come with the all in one STM32 library

I already told you already 5 hours ago, no, you need to install it. STM32-library only contains STM32-specific stuff. That display is not an STM32-device, so no, it's not there.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

 

Just now, WereCatf said:

I already told you already 5 hours ago, no, you need to install it. STM32-library only contains STM32-specific stuff. That display is not an STM32-device, so no, it's not there.

sorry, am getting confused. I will try with the non STM32 library, I thought you meant the code that did not end with _stm32 but in the library

 

image.png.a23acb7e9d94b4686da13c7faba042e3.png

I will Google the pinout for the blue pill SDA and SCL and use those pins for the 12c

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

@WereCatfSo I found this diagram and did PB11 and PB10 for SDA and SCL and used the non-stm32 code and uploaded it. Boot 0 was set to 1 and once uploaded I set it back to 0. The OLED still shows no signs of life. How can I test if it is giving an output on the SDA and SCL pin's.  

STM32F103 Bluepill–Getting Started with Arduino core | alselectro

Please tag me @RTX 3090 so I can see your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×