Cannot drive I2C Oled :(


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Apr 2013
    Posts
    32


    Did you find this post helpful? Yes | No

    Default Re: Cannot drive I2C Oled :(

    By the way TimC, your character table is clearly more efficient and Flash friendly. I will try it too when I have opportunity.
    But I want to ask something first; I'm not sure how LOOKUP and LOOKUP2 commands treats different data types, so that is why I'm asking this, lets say I wrote;
    "lookup2 variable,['string',variable2],variable3"
    And variable 2 contains 7 as data.
    Now, since string and variable2 are different data types, will this char table be able to recognize them both? I mean, is it working for both of '7' and 7 ?
    I'm just asking because I really don't know the behavior of lookup commands for different data types.

  2. #2
    Join Date
    Jan 2005
    Location
    Boston MA
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Cannot drive I2C Oled :(

    Personally I would not alternate different data types in a big character table because you want to make it as simple and small as possible. From the PBP manual it says: "Lookup2 generates code that is about 3 times larger then Lookup."
    So I went back to Lookup. The only other reason that you might use Lookup2 is because it can address 1024 values. The new manual for V3 says Lookup can address 1024 values but it failed after "S" and before it reached "T" which is exactly 256 values.

    Me thinks the V3.0.8 compiler has a bug!

  3. #3
    Join Date
    Jan 2005
    Location
    Boston MA
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Cannot drive I2C Oled :(

    I posted a full demo of a SSD1306 add-in over on the code example forum. elcrcp I think this is what you were asking for earlier.
    Best part is you can start to use it like a regular LCD with data from other devices and formatted output.

    http://www.picbasic.co.uk/forum/showthread.php?t=20179

    TimC

  4. #4
    Join Date
    Apr 2013
    Posts
    32


    Did you find this post helpful? Yes | No

    Default Re: Cannot drive I2C Oled :(

    Yes TimC that is my answer =)
    By the way, I tried your init suggestion and it's fine (I didn't know that upper limit of contrast was 7F) then I wanted to see your include file and sample code (good job you did there ) but I couldn't make it work don't know why, I'll examine them detailed later but they are definetly very useful and easy to work with.

  5. #5
    Join Date
    Jan 2005
    Location
    Boston MA
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Cannot drive I2C Oled :(

    The Contrast Init line should read
    Set contrast FROM $01 to $FF NOT Set contrast to $01 to $FF.
    Therefore $FF is the upper limit.

    Good luck

Similar Threads

  1. OLED 128X96 cheap china lcd
    By starwick in forum Code Examples
    Replies: 10
    Last Post: - 19th June 2017, 05:23
  2. Help With OLED Display / 128X64 SSD1306
    By Denner in forum General
    Replies: 6
    Last Post: - 25th May 2013, 15:40
  3. SEROUT + SERIN, OLED + PICAXE coding help required
    By SeanHowson in forum mel PIC BASIC
    Replies: 4
    Last Post: - 15th October 2012, 16:11
  4. Master SPI interface to LCD/OLED??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 19th September 2009, 23:44
  5. OLED 128x128 color display
    By Ron Marcus in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 21st May 2007, 01:45

Members who have read this thread : 3

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts