SSD1306 OLED Display, In Depth How To Get It Going

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ย. 2020
  • A look at an OLED Display and how to get it working.
    The Midas PDF's have been updated.
    My C file also has a clever 'switch' statement for counting now.
    Latest C File github.com/JohnBrods/SSD1306-...
    Midas OLED Display Part Number - MDOB128064V1V-YI
    Farnell Link - uk.farnell.com/midas/mdob1280...

ความคิดเห็น • 15

  • @grosserkuchen
    @grosserkuchen 3 ปีที่แล้ว +2

    Cool looks like you fixed your problem... nice Presentation 😁😁😁

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว +1

      Thank you Mike, yes a simple display turned into a real pain.

  • @Elbowgen
    @Elbowgen 3 ปีที่แล้ว +2

    This was a very helpful video. Thank you.

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว

      Thank you for your feedback, I'm pleased it helped.

  • @wilsonafuevu9036
    @wilsonafuevu9036 3 ปีที่แล้ว +3

    Thanks for the video, although I was expecting to see how your set up the ssd1306 from the datasheet step by step, i learnt other things though thanks

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว

      I found the datasheet ok to follow so didn't mention it, I only had trouble with the communication, that and the fact my IDE did not support it.
      The average view duration is 3 & half minutes so 45 minutes wasted anyway.
      Thank you for your comments.

  • @souravmp7851
    @souravmp7851 3 ปีที่แล้ว +3

    One doubt, even if the value is stored in RAM, the corresponding value is loaded from programmed hex file right. So it will take up space in ROM also, ain't I correct. A better way is to compress data into different sections

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว

      No you're not correct.
      RAM is RAM and ROM is ROM, if you're out of ROM, you can use some spare RAM as I showed.
      How does one compress data in a Pic?

    • @souravmp7851
      @souravmp7851 3 ปีที่แล้ว +1

      @@JohnB-2021 1. I still think that the value is stored in ROM also. If it is stored only in RAM then the data will be lost after power on reset.You can also cross verify by comparing ROM consumption before and after the change.
      2.about compression, Instead of storing each byte into an array, all the consecutive locations with same value can be replaced with only 2 bytes. One to indicate number of bytes and other to indicate value.
      eg: value1[10]=[0,0,0,0,5,5,5,0,0,0] can be written as value1[6]=[4,0,3,5,3,0]. a new function should be used to decode the values.
      3. One small algorithm i can think of , to check numbers is to take modulus with 10(x%10). This will give the value at the ones position, and only one if condition is required. This will also reduce code size.
      Anyway nice work, wanna try it myself someday!

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว +1

      @@souravmp7851
      @Sourav Mp Oh yes how very true about the RAM.
      Maybe there is a separate location / address for RAM?
      So last night, (12am to 5am) I finally cracked the numbers game.
      I mentioned that I required my 'num' for the counter to be a string, I could then pick out each character up to 1000 as an example.
      I finally thought of my favourite function, used in most of my previous videos and something I had not thought of. When displaying numbers on a TFT I use ‘inttostr’ integer to string and didn't know I could use it for my number checking.
      I changed my code, used intostr, 3 switch cases and my display counts up to 999.
      My ROM changed from 71% to 21%.
      So knowing what to do will save a tonne of ROM.
      I understand your compression now, much like ‘zip’ but that would take forever, easier to buy an 18Fk22 which has another 32Kbytes making 64KB.
      I’m guessing I could now count up to 1million and stay under 70% of ROM.
      Obviously the font would be many times smaller too which is a massive help to ROM storage.
      Thanks for your input, do you program Pics etc?.

    • @souravmp7851
      @souravmp7851 3 ปีที่แล้ว +1

      @@JohnB-2021Glad i could help :)
      I am not sure exactly, but i think the data will be stored in different sections of ROM. I have seen this functionality in some other controllers.
      That 'zip' logic which i have mentioned can be done easily with a small python code. By this way you will be able to store much larger data. Storing big fonts wont be a problem. Can you give me the link to the video mentioned above, where you mentioned your algorithm?
      I have some experience with PICs and some ARM based controllers.

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว +1

      @@souravmp7851 Hi,
      Thank you for your support, but if you read the whole of my last reply, I sussed the numbers game.
      My display counts up to 9'999'999, I could go to a billion or trillion with a little extra effort but no point.
      My old code up to 999 used 50% more ROM, my new 10 million code uses nearly 50% less.
      The code is in the link but now out of date since the code is much improved.
      I'll be making something then putting the final code in a new video.
      Thank you.

  • @riemanndiy6693
    @riemanndiy6693 3 ปีที่แล้ว +2

    Are you programming the OLED through an arduino? Great Job

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว +2

      Thank you for your comments but no it’s a Pic

    • @JohnB-2021
      @JohnB-2021  3 ปีที่แล้ว

      😀