1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

How to translate wire.requestfrom (arduino) to c?

Discussion in 'Arduino' started by electroRF, Oct 10, 2013.

  1. electroRF

    electroRF Member

    Joined:
    Jun 23, 2012
    Messages:
    689
    Likes:
    9
    Location:
    Portugal
    Thanks mister T.
    I play around with these delays and update.

    The GLCD Datasheet
     
  2. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    Have you noticed that the datasheet says that the device address is 0x46. You are using 0x8C.
     
  3. electroRF

    electroRF Member

    Joined:
    Jun 23, 2012
    Messages:
    689
    Likes:
    9
    Location:
    Portugal
    Hi,

    I tried using at the beginning 0x46, but failed to write to the GLCD.

    Then I guess it's the 7-bit address - so for WRITE i used 0x8C (which is shifting 0x46 1 step left) - and it worked.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland

    Oh, yes.. that is one thing that should be mentioned in the datasheet. At least when they represent it as a hexadecimal. Hex value strongly implies an 8 bit bit-pattern. Some (most?) datasheets include the R/W bit in the address. Officially the address is 7bits of course.
     
  6. electroRF

    electroRF Member

    Joined:
    Jun 23, 2012
    Messages:
    689
    Likes:
    9
    Location:
    Portugal
    Hi T,

    I tried reading the FW, and I read 0x01.

    I still haven't tried the delays, however 0x01 sounds suspicious, i'm not sure it is the actual FW version of the GLCD.
     
  7. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    I think that sounds promising at least. Better than zero. Sucks that they don't give any info about firmware versions in the datasheet.

    Play with the delays. I saw this one thread where the code had 500ms delays between different drawing instruction. And he also had 500ms delay before he did anything... to let the glcd initialize.
     
  8. electroRF

    electroRF Member

    Joined:
    Jun 23, 2012
    Messages:
    689
    Likes:
    9
    Location:
    Portugal
    well, I tried so many delays, but I keep reading zeros.
    I also tried as you suggested to place other commands between the "Write Cursor" and "Read Cursor", but failed.
    something is wrong with this GLCD or with its manual.
     
  9. MohamedAbid

    MohamedAbid New Member

    Joined:
    Oct 13, 2014
    Messages:
    1
    Likes:
    0
    Can anyone send me a copy of the GLCD-FLEXEL.pdf and the C library of the Web4Robot GLCD-FLEXEL board please?
     

Share This Page