Menu

2.13" e-paper display

Help
MBB
2023-06-12
2023-08-24
  • Anobium

    Anobium - 2023-06-12

    I think this board is total solution with a specific mcu controlling the display. So, yes, this is the wrong type.

     
  • MBB

    MBB - 2023-06-12

    Thanks for the fast response.

    Does anyone have a link to an e-paper display that will work with GCB?

     
  • Anobium

    Anobium - 2023-06-13

    These are the part I have used - check with them if this part number includes the HAT and the e-Paper display

    Small Display
    212x104, 2.13inch flexible E-Ink display HAT for Raspberry Pi
    SKU: 15084
    Part Number: 2.13inch e-Paper HAT (D)
    https://www.waveshare.com/2.13inch-e-paper-hat-d.htm

     
  • MBB

    MBB - 2023-06-13

    Thanks!

     
  • MBB

    MBB - 2023-08-24

    I now have the display Anobium mentioned above.

    I'm using Great Cow BASIC (1.00.00 2023-05-31 (Windows 64 bit) : Build 1249) with an 18F4550.

    I copied the below program from GCB Help:

    ;Chip Settings
    #chip 18F4550,48
    #config PLLDIV=1, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, LVP=OFF, MCLRE=ON

     #include <glcd.h>
    
     #define HWSPIMode MasterFast
    
     #define GLCD_TYPE GLCD_TYPE_EPD_EPD2in13D
     #define GLCD_EXTENDEDFONTSET1
     #define GLCD_TYPE_EPD2in13D_LOWMEMORY4_GLCD_MODE
     #define GLCD_OLED_FONT
     #define GLCD_PROTECTOVERRUN
    

    'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
    #define GLCD_SCK portB.1
    #define GLCD_CS portB.2
    #define GLCD_DC portB.3
    #define GLCD_RESET portB.4 .
    #define GLCD_Busy portD.2
    #define GLCD_DO portC.7

        #define EPD_HardwareSPI
    

    'Pulling BUSY line high allows SCK, CS, DC & MOSI signals to work
    ' BUT display still does NOT work.

    wait 100 ms

    'Main program

    GLCDForeground=TFT_BLACK
    GLCDBackground=TFT_WHITE
    
        Do_Again:
    
            GLCD_Open_PageTransaction
                GLCDPrintStringLN ("Great Cow BASIC")
                GLCDPrintStringLN ("")
                GLCDPrintStringLN ("Test of the e-Paper")
                GLCDPrintStringLN ("")
                GLCDPrintStringLN ("Aug. 2023")
            GLCD_Close_PageTransaction
            GLCDDisplay Off
    
                wait 2 s
                GLCDDisplay On
                GLCDCLS
                GLCDDisplay off
    
    Goto Do_Again
    
    
    I can see the SPI signals on my O'Scope BUT the display remains blank.
    
    Any ideas what I'm doing wrong?
    
     
  • Anobium

    Anobium - 2023-08-24

    No idea. If the program is a demo program. Then, that is a good start.

    Try using software SPI. comment out #define EPD_HardwareSPI

     
  • Chris Roper

    Chris Roper - 2023-08-24

    Looking at your code are you not missing a GLCDDisplay On
    After the Do_Again Label?

     
  • Anobium

    Anobium - 2023-08-24

    Also, slow that clock speed down for the purpose of testing.

    Also, when using the hardwareSPI, slow the SPI frequency. Add #define HWSPIMode MASTERSLOW ( this is shown in the Help :-) )

     
  • MBB

    MBB - 2023-08-24

    Thanks!

    I tried the above suggestions but the display still remains blank.

    Any other suggestions?

     
  • Anobium

    Anobium - 2023-08-24

    This is probably a product version issue.

    Let us assume that the library works. I know it does.

    Looking at GitHub there are four different displays. And, I have scanned the different versions of the GitHub code and the 2019 GCBASIC library is version 1 of the hardware. The initialisation is very different across the four different displays.

    So, figure out which one you have. And, then, using the CPP file ( appropiate to your display ) change Init_EPD2in13D() and LoadLUTS_EPD2in13D() to suit. The LUTS data ( not need for version 4 of the display) is simply tables in GCBASIC.

    Makes sense?

     
  • MBB

    MBB - 2023-08-24

    Thanks!

    I'll try this.

     

Log in to post a comment.