Menu

GLCD: MCUFriend Device Discovery

Anobium
2017-11-16
2017-11-17
  • Anobium

    Anobium - 2017-11-16

    I have just published a GLCD device discovey program. If you have an UNO and you have one of the GLCD shields and you are not sure what GLCD controller it has - this program should determine the type of controller.

    If you have a PIC and you want to use one of these 8bit bus GLCDs then the program will do the same.. it will just take a bit more time to hook up!

    This supported 8bit bus GLCD microcontrollers they are typically UNO shields. Lots of different types and this program will help determine which driver to use.

    This is a standalone program which means you do not need any GLCD drivers. Get the code off GitHub, compile and try. Get it here from GitHub

    Summary of ouput

    Shown below are examples output from the software. This examines the GLCD controller.

    Essentially, hook up the GLCD to the microcontroller (Ardunio UNO and any other type), compile and program, look at your terminal and you will see the results on the terminal…​ what could be simplier.

    Two examples are show below.

    1 .Terminal Output for a HX8347-G(T) microcontroller

    This is a HX8347-G(T) microcontroller - look at the bottom of this listing to see the determined type of controller. Refer to the specific datasheet for more information on the registers.

    This shows the determination of the microcontroller type.

     Read Registers on GLCD UNO shield
    controllers either read as single 16-bit
    e.g. the ID is at GLCDreadReg(0)
    or as a sequence of 8-bit values
    in special locations (first is dummy)
    
    Operting in 16-bit addressing mode
    
    
    Examining  : GLCD Device ID
    Read       : GLCD Device ID = 0x7575
    Controller : @reg(0x00) HX8347-G(T)
    Completed  :
    

    2 .Terminal Output for a ILI9481 microcontroller

    This is a ILI9481 microcontroller - this show the determined type of controller. Refer to the specific datasheet for more information on the registers.

    Examining  : GLCD Device ID
    Read       : GLCD Device ID = 0x9481
    Controller : @reg(0xBF) ILI9481
    Completed  :
    
     
  • Anobium

    Anobium - 2017-11-16

    This is an HX8347 GLCD. Stan sent it me a while ago. We (Stan and I ) believed this was an ILI9341 and as it did not work with the ILI9341 driver.. it was broken.

    Not anymore! I used the GLCD discovery program to find that it was an HX8347-G(T)....

    Cheers Stan...another GLCD. The next problem.... we had no GLCD driver for the HX8347-G(T) - we do now! See the next post.

     
  • stan cartwright

    stan cartwright - 2017-11-16

    Groovy. Could save wasteing time on wrong device. I noticed lines in the ili include-similar?
    'Read IC device code.
    'The 1st parameter means the IC version.
    'The 2rd and 3rd parameter mean the IC model name, should be 9341

     
    • Anobium

      Anobium - 2017-11-16

      Good point. I should able to create similar tool for SPI connected GLCD. I can look at that next week.

      :-)

       
  • bed

    bed - 2017-11-16

    Anobium your are a genious.
    Your I2C Discovery Program is still waiting for a standalone Project and you come around the Corner with this!

     
    • Anobium

      Anobium - 2017-11-17

      SPI GLCD discovery. See https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/blob/master/GLCD%20%20Solutions/GLCD%20Discovery%20for%20MCUFRIEND%20devices/GLCD_Discovery_SPI_Data.gcb

      This uses software SPI so no need to sort out PPS or other port configuration. Test on mega328p but should work on all microcontrollers.

      Example:

      Read Registers on GLCD device
      controllers with an SPI interface
      
      reg(0x0000) FF FF FF FF FF FF FF    f.k
      reg(0x0001) FF FF FF FF FF FF FF    f.k
      
      ....lots of regisiters
      
      reg(0x00D2) FF 00 03 03 03 03 03    f.k
      reg(0x00D3) 00 93 41 41 41 41 41    f.k
      reg(0x00D4) FF FF FF FF FF FF FF    f.k
      
      ....even more regisiters
      
      reg(0x00FC) FF FF FF FF FF FF FF    f.k
      reg(0x00FD) 00 00 00 00 00 00 00    f.k
      reg(0x00FE) 00 00 00 00 00 00 00    f.k
      reg(0x00FF) 00 00 00 00 00 00 00    f.k
      
      Examining  :
      Read       : GLCD Device ID = 0x9341
      Controller : @reg(D3) ILI9341
      Completed  :
      

      You extended the 'discovery section' by editing in GitHub and then sharing with us all!

      Enjoy

       

      Last edit: Anobium 2017-11-17

Log in to post a comment.