SSD1306 OLED dipslay on olimexino STM32

Posted on
Page
of 2
/ 2
Next
  • Hi, I am try connect this display to my olimexino but not working, is unsupported on this board or I have something wrong?

  • It should work - the control is just I2C.

    Make sure you have the board correctly set for I2C, if the interface board supports more than just I2C. Note that if the board supports interface modes other than just I2C, it doesn't have the pullups installed, so you'll need to include the 10k pullups on SDA and SCL.

    That said, I bought one, and couldn't for the life of me make it work. The ones with the I2C-only breakout boards, like the one shown in the picture on the module page, I think, will work without complaint. The one I got, however, had tons of pins on the back, to allow for all interface modes supported by the chip, and I was never able to make it work - couldn't get it to respond in any way, so I don't know if I was doing something wrong, or my screen was just DoA. I lost interest in the problem when I got one of the 3" 128x64 displays with the Digole controller and handed the SSD1306 screen off to a friend.

  • I am not sure if any graphic library not missing in this lower flash cpu. is possible fit graphic and waveform library to this board type? I have not experice with compiling that large project.

  • Why do you suspect a graphics library is missing? As far as I know, the the Olimexino should have the graphics library (reference doesn't say otherwise)

    What's happening when you try to use it?

  • When I send to board :
    1v63 Copyright 2014 G.Williams

    echo(0);
    ERROR: Using '.' operator on undefined at line 1 col 15
    {var e=Graphics.createArrayBuffer(128,64,1,{v­ertical_byte:!0...

               ^
    

    in function "connect" called from line 7 col 1
    );
    ^
    =undefined

  • Wow, well, yeah... Looks like it doesn't have the Graphics library.

    And dang, the Olimex only has 128k of flash/20k ram? I'm not surprised he wasn't able to cram the graphics library into that.
    That only leaves you with 400 JSVars.... And using them with the SSD1306, you'd use like 110 of them for the frame buffer and module, which wouldn't leave you much for code. Pity they used such a low-spec chip on the Olimex, it would have only cost them a few bucks more per unit to get a lot more flash and ram.

  • I admit to, but I do not have OLIMEXINO but my usb stick clone of this board.
    https://www.tindie.com/products/bobriciu­s/stm32-arm-arduino-maple-mini-or-esprui­no-compatible-with-uext-interface-and-st­m32f103rbt6/

    Looks to be quite unusable toy :(

  • @Peter That looks like a really neat little board! I'm afraid it's been quite difficult to keep supporting the Olimexino - while the RAM is enough for doing simple things, the lack of flash makes it hard to cram everything that's needed in (especially as a lot more memory gets used up with trying to be more JS compatible now).

    Having said that, you could compile your own version of Espruino. The filesystem support takes up quite a lot of flash, and as you don't have an SD card you could remove that and could then add the graphics library instead. It's as simple as changing USE_FILESYSTEM=1 to USE_GRAPHICS=1 in the Makefile under OLIMEXINO_STM32.

    Of course it'd be cool if you (or the board's designers) could contribute the relevant stuff (Makefile changes, and a boards/FOO.py file) to add 'proper' support with pins named in the correct way.

  • Just to say, wow - I didn't realise Espruino came preinstalled.

    It's such a shame the designer didn't spend a day just tweaking the build to make it a bit better suited to the board... There's actually quite a bit that could be done to improve Espruino on this kind of board too (there are a lot of issues on GitHub related to it) but it's just unfortunate that they choose just to use Espruino as-is rather than actively contributing to help make it better for everyone.

  • I only have 6 pieces STM32F103RBT6. The next version will use more powerful processor. I am looking for a way to begin in arm because I wanted to make a board that would be compatible with maple and espruino = olimexino core . I'm a complete beginner in programing Arm. I still did not get the blinking led:) Espruino the largest support and multiply the examples I've seen . I'm obsessed with Build smallest development board but arm for me have awful lot of pins. It is a pity the espruino is so very hardware demanding, I like would like the option to use stm32f072cb, but it probably will not be possible: (, or any cpu in LQFP 48, or with USB host. but I understand, it is very difficult to maintain many hardware revisions alive.

  • So are you the designer of that board, and also bobricius on tindie/GitHub?

    stm32f072cb looks like a really interesting chip (especially the crystal-less USB). I don't see why Espruino wouldn't work on it, although in 128kB some functionality would have to be removed. If an external eeprom/flash could be added, the saved code could go into that instead, and it'd free up another 20kB of program memory for Espruino.

    Having said that there are a lot of ways that memory usage could be reduced too. It just needs someone to spend some time and find the main culprits and fix them.

  • Yes, I am Bobricius. Thanks for help. We will test your example on github. I completely forgot I signed up as Peter.

  • About your GitHub post - looks like the waveform class was left out of Olimexino due to lack of Flash. It probably wouldn't use up too much space to add it though.

  • Hi I am new here so want to say hello first ;)

    I was trying to use code from here http://www.espruino.com/SSD1306 but got that error when was trying to program my Maple Leaflabs R3+.

    function start(){                               
    :g.drawString("dafa",2,2);
    :g.flip();
    :}
    =undefined
    >I2C1.setup({scl:B6,sda:B7});                    
    =undefined                
    >var g = require("SSD1306").connect(I2C1, start);
    ERROR: Unable to mount SD card : NOT_READY
    WARNING: Module "SSD1306" not found
    =undefined
    Uncaught Error: Field or method "connect" does not already exist, and can't create it on undefined
     at line 1 col 27
    var g = require("SSD1306").connect(I2C1, start);
                               ^
    >
    

    is something missing in my picocom or Espruino Web IDE?
    I tried to run my oled under both, same error

  • Put the code on the right-hand side of the IDE, and send the code to Espruino, so the module gets sent over.

    That should sort it out - the IDE is responsible for fetching the module and sending it over with your code. If you press the up arrow after sending code that way, you'll see the modules.addCached() call, and the code for that module, inserted by the IDE.

  • this time got this error

    *Uncaught Error: Field or method "createArrayBuffer" does not already exist, and can't create it on undefined
     at line 1 col 16
    {var d=Graphics.createArrayBuffer(128,64,1,{v­ertical_byte:!0...
                    ^
    in function "connect" called from line 1 col 47
    var g = require("SSD1306").connect(I2C1, start);*
    
  • How much flash does that board have? Really low memory boards don't have the Graphics library (no room in the flash)

  • It is maple rev3+ It has arm M3 72Mhz 128kb flash mcu

  • So you're using the olimexino binary with it? I'm afraid those boards just don't have enough Flash to fit the graphics library in - you'll find that other modules (that don't use graphics) will work though.

    You could probably fake it by adding some code like:

    Graphics = { createArrayBuffer:function(w,h,b,o) {
      return { buffer : new Uint8Array(w*h/8) };
    });
    

    But then you'd have to set the pixels in g.buffer manually in order to do anything useful.

    You could also build your own firmware which has the filesystem support removed, but graphics support added instead.

    Or... you could buy a proper Espruino board in, which has enough flash to fit everything in by default ;)

  • Yes, I'll buy proper one board ;) tnx

  • If the Olimexino is required then you can improve it replacing the micro.
    I have recently replaced the STM32F103RBT6 with:
    STM32F103RET6 (512k FLASH, 48K SRAM)
    STM32F103RGT6 (1M FLASH, 96k SRAM).
    In our case the the device is designed for a Arduino to be plugged in but I prefer to develop and test with the Olimexino (compatible sockets) and Espruino (because it is sooooo much nicer).
    Newer devices will use a proper Espruino or Pico.
    Jamie

  • however HD44780 display connected by I2C1 is working, but flashing, even when I pulled up SCL and SDA by 4,7K resistors to 3.3V

  • flashing? Could it be that the power isn't connected properly? I can't be 100% sure but IIRC some of those displays actually need 5v, not 3.3v.

  • I checked it with both 3.3v and 5.0V - it looks like refresh rate is low or something like that, as I can't see stable prints on the display but they are flashing very fast,
    maybe I should connect Vcc by transistor, maybe power source from maple leaflabs isn't powerful enough?

  • Ahh - actually do you have Pin 3 connected? If you look at the HD44780 page, it needs to be connected to GND. It's contrast, so if it were floating around I guess it could be causing the screen to flicker.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

SSD1306 OLED dipslay on olimexino STM32

Posted by Avatar for bobricius @bobricius

Actions