Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. bricox
    3. Posts
    B
    • Continue chat with bricox
    • Start new chat with bricox
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by bricox

    • RE: FORUM RULES (!!!!READ THIS FIRST BEFORE POSTING!!!!)

      Hello @lukasmaximus,

      For those not familiar with the Markdown ...

      Snippets code example

      here is an example code.
      
      ```
      // this area is nested 3-backticks code block.
      const hello = "hello";
      ```
      
      

      Notes :

      1. To mark the block, don't forget line breaks after

      ```

      1. You can use to ...

      ~~~

      Result, after Copy/Paste to the left window :
      0_1616074520285_e068d0d1-059b-43d6-bd29-761c7ace8274-image.png

      posted in Forum Rules (!!!!READ THIS FIRST BEFORE POSTING!!!!)
      B
      bricox
    • RE: M5Paper EPD power consumption

      Use :

      void GT911::updateB()						// as update but modify by Bricox ...
      {
          r814E.reads = read(0x814E);				// "read struct" AND these 5 explicite bits fields
          if(r814E.status)
          {
              if(r814E.touchPts != 0)
              {
                  _is_finger_up = false;
                  _num = r814E.touchPts;			// "_num" could be definitively replaced by "r814E.touchPts"
                  uint8_t data[num * 8];
                  read(0x8150, data, _num * 8);	// read block of all fingers , up to 5*8 bytes
                  for(int j = 0; j < _num; j++)	// for each finger
                  {
                      uint8_t *buf = data + j * 8;// address base of each finger
      

      Sorry, comments that were aligned, in my notepad++ by multiple Tabs, are no longer aligned in the snippets viewer

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      Structure

      typedef struct reg814E_s {		// 
       union {						// same location of 2 fields of 1 byte
         uint8_t reads;				// this byte
         struct {					// field bits of this byte
           uint8_t touchPts  : 4;	// b0 to b3 : number of touch points
           uint8_t haveKey   : 1;	// b4 : HaveKey
           uint8_t proxi     : 1;	// b5 : Proximity Valid
           uint8_t largeDet  : 1;	// b6 : large detect
           uint8_t status    : 1;	// b7 : buffer status
         };
       };
      } __attribute__((packed)) reg814E_t;	// minimize memory alignment
      

      or simpler writing

      typedef struct {
        union {              // same location of 2 fields of 1 byte
          uint8_t reads;     // this byte
          struct {           // field bits of this byte, starting with low weight
            uint8_t
              touchPts  : 4, // b0 to b3 : number of touch points
              haveKey   : 1, // b4 : HaveKey
              proxi     : 1, // b5 : Proximity Valid
              largeDet  : 1, // b6 : large detect
              status    : 1; // b7 : buffer status
          };
        };
      } reg814E_t;
      

      Declarations

      private:
          bool _is_finger_up = false;
          uint8_t _num = 0;
          uint8_t _rotate = ROTATE_0;
          tp_finger_t _fingers[2];
          reg814E_t r814E;
          uint8_t _iic_addr = 0x14;
          uint8_t _pin_int = -1;
          bool _sleeping = false;
      };
      
      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      Hello @felmue,

      While I was commenting on the source code, I found un bug in the GT911 driver :
      _fingers[] can be indexed up to 5
      0_1615984070738_8f7e3c61-28a7-42c1-8623-ea7928136753-image.png
      In declaration, _fingers[] can be indexed up to 2
      0_1615984224513_b83a9d9e-e32d-4ca9-905f-fc2a4eb6e57b-image.png

      In addition, it would be elegant to use bit fields for describing registers that have specific functions.
      An example : 0_1615984402868_5b228515-423f-44aa-ad3a-d75715da83e9-image.png

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      Hello @felmue

      Find 1 output, to put low the INT signal of GT911, have another way possible ....
      In the ESP pdf, I found this :
      0_1615924512661_1f8661ba-bd5a-4d76-a558-18ffea82d6d8-image.png
      For reuse these pins, an article : https://www.instructables.com/ESP8266-Using-GPIO0-GPIO2-as-inputs/
      I think that, in the M5paper, we can use GPIO0 as output.
      What you think about ?

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      hello,

      a little bit of electronics (because no present in official doc) :

      0_1615907585552_012bf0da-f9ae-4cb6-90e6-45a8efbcad81-image.png
      The PFL with C1, C2, C3, C4 R1 and C5:
      0_1615907925252_16b48c7b-d348-47ab-860e-a68f73c0f68e-image.png
      Remark : pin 7&8 are "shield"

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      Hello guys .... @felmue, @fonix232, @tatar-andrei... and other enthusiasts ....

      I have others links for the GT911 driver in cpp
      With interrupt : https://github.com/nik-sharky/arduino-goodix/blob/master/Goodix.cpp
      No interrupt but handles 5 fingers : https://github.com/caiannello/ER-TFTM0784-1/blob/master/src/touch.cpp

      We’ll have to adapt these source codes.

      Sorry, i'm not a specialist for interrupts of Arduino framework....I am more familiar with the HAL framework of the STM32.

      Thank you for these sustained sharing

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      @felmue
      To fully understand the GT911 controller, download these 2 pdf
      0_1615801735370_a92c71b1-cc76-49b8-9bef-90da8225880d-image.png
      https://www.crystalfontz.com/controllers/GOODIX/GT911/464/
      https://www.crystalfontz.com/controllers/GOODIX/GT911ProgrammingGuide/478/

      Several developments are desirable :

      • read position under interrupt and not in polling mode [GT911::update()]
      • Exploit more all modes
      • Check if the "green mode" (3.3mA) automatically change after 1 second of inactivity
      • Generate a sound when you touch it

      List of 21 other GT911 drivers :
      https://github.com/search?q=gt911
      including one in cpp:
      https://github.com/blackketter/GT911/blob/master/src/GT911.cpp

      posted in Cores
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @fonix232
      My apologies, I don’t know how I made that big mistake ... ;>)
      You’re right, it’s definitely a native USB.

      The red symbol is, for me, that printfoot USB-C connector is on the pcb but not welded.
      This part of the schema is not completely greyed out as J10 because the 2 resistors R1 and R60 are welded.
      0_1615799393503_6e7b05c0-8cd3-4d95-b710-90b58b42b8d7-image.pngThe Google search with this image did not succeed.
      You’d have to look in the symbol library of the design software, I think it’s Altium...

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @fonix232
      USB-TYPEC/NC is not a real USB port because no bridge.
      The connector is USB-C but the line is UART only.

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @fonix232
      In my professional activity, I use the STM32L476.
      Its average power consumption is 15-20mA at 80 MHz.
      I use "Stop 2" mode to reduce consumption => 2.3µA (5µs wake-up with many sources).
      0_1615627138358_1a4a754d-475f-4039-ad0b-0930fe657365-image.png
      In addition, it has its own RTC with calendar and the ADCs are most linear than ESP32.

      posted in Features Wish List
      B
      bricox
    • RE: M5Paper EPD power consumption

      @felmue
      I did a summary of the 3 ports A, B and C
      0_1615480305762_c98a3e9f-53d3-4dda-989f-1548a6530bac-image.png
      You made a good choice using GPIO19.
      Indeed, welding work is simplified.
      Do you share your source code?

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      @bricox
      0_1615476228608_7ba0fa7a-2234-4eb5-bf2b-40ca8229e42a-image.png

      posted in Cores
      B
      bricox
    • RE: M5Paper EPD power consumption

      @felmue
      Indeed GPIO36 is only input.
      So I looked for another GPIO used only as input to reverse the 2 GPIO on the pcb.
      I found the GPIO27 which tells ESP32 that the IT8951 is ready for a SPI dialogue

      IT_SPI_HRDY (schema)
      #define M5EPD_BUSY_PIN 27 (M5EPD.h)
      EPD.begin(M5EPD_SCK_PIN, M5EPD_MOSI_PIN, M5EPD_MISO_PIN, M5EPD_CS_PIN, M5EPD_BUSY_PIN); (M5EPD.cpp)
      m5epd_err_t M5EPD_Driver::begin(int8_t sck, int8_t mosi, int8_t miso, int8_t cs, int8_t busy, int8_t rst)
      _pin_busy = busy;
      pinMode(_pin_busy, INPUT);

      0_1615456717810_50c5a8ea-8079-4817-a856-10c82417613c-image.png
      On my pcb, the resistance R87 is absent (unwelded)
      All you have to do is reverse the 5 and 16 tabs on the ESP32.
      I scraped the varnish and then scanned the pcb.
      You have to cut the 2 tracks between the 2 pins of the esp32 and the 2 vias.
      then solder 2 thin wires.

      posted in Cores
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      Hello,
      We can also replace the MCU IT8591 with a low power MCU as STM32L0 or STM32L4 family and keep le SPI bus.

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @fonix232
      2 months ago, you said :
      "Uhm... Pardon my ignorance but according to my research the IT8591 is a full-blown EPD timing controller, not just a bus register. I don't see how the 74HC4094D would be an alternative (most definitely not a drop-in replacement)."
      Now :
      "Replace IT8951 with a better option (maybe just a simple shift register, similar to how the LilyGO T5 4.7 solves it)"
      Congratulations for this nice evolution in the absence of my late answer ... ;>) ...

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @ajb2k3
      Thank you for this information ... ;>)...
      Unexpected Maker have some for board development
      https://www.youtube.com/watch?v=iW3xD7Eo5Gw
      SYL

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @bricox
      Touch connector most complete
      0_1614979812667_62ff4c68-43d2-47ea-972b-b136b45eed26-image.png

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @fonix232
      on https://www.espressif.com/en/support/documents/technical-documents
      No pdf for S3, just C3

      74HC4094D, IO extander, needs many pins

      ESP32-D0WD => 48 pin (m5paper)
      ESP32-C3-FH4 => 32 pin, with 4 Mo flash only
      ESP32-WROVER => 38 pin (LilyGo), with 16 Mo Flash and 8 Mo SDRAM
      ESP32-S2-FN4R2 => 56 pin, with 4 Mo flash and 2 Mo SDRAM integrated

      SYL

      posted in Features Wish List
      B
      bricox
    • RE: [M5Paper] Ideas/recommendations for a revision or V2 model

      @bricox
      bill of materials most complete
      0_1614879998136_d961fb26-9e57-4f96-89b2-ebd05449e028-image.png
      SYL

      posted in Features Wish List
      B
      bricox