Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 26 to 50 of 95

Thread: Has anyone tried running the GSL16880 capacitive touchscreen controller with Teensy3?

  1. #26
    wolfmanjm,

    No luck on my side either. I used your code to clean up and check for mistakes in my code, and am confident that the right bits are getting there but no response.

    I'm going to start comparing to the BuyDisplay sample code next.

    @Paul, I love Limor as much as the next nerd, but when your goal is a production run it's pretty hard to be competitive paying retail prices.

    Do you guys think the Bus Pirate is fast enough to track this?

    Thanks,

    DougM

  2. #27
    Ok I made progress, which is good and bad the good news is it works, with the code pretty much as I have posted except for the firmware download (which I now think must be the problem with my posted code). The bad news is I gave up on the Arduino Uno, and used an STM32L100 Discovery board instead as it had enough flash to load the original firmware as is.
    The other good news is that this will almost certainly work with the teensy3 with the original firmware upload code.
    I'll update my repo with the firmware upload that is taken pretty much from the bydisplay.com sample and the original firmware .h file.
    I think that will work for you. I mat try this on my teensy3 later tomorrow if I get a chance, but I'll be using the stm32L100 though as I can't get my LCD to work reliably with teensy3. (Although I haven't tried the display yet with the stm3232L100).
    Look for an update to github sometime tomorrow. I'm pretty sure this will work for you too.
    It is quite cool to see it tracking five fingers at a time

  3. #28
    @dougm... did you remember to put pullups on SDA and SCL? I used around 10k, but I think 4.7K is recommended.

  4. #29
    Junior Member
    Join Date
    Jan 2015
    Posts
    2
    Hi, I too am trying to write a library for the GSL1680. My target platform is not a teensy, however it is a "bare metal" C application for an Atmel processor, so I thought I might be able to find or provide some useful knowledge at this topic. So far I have it running in a usable fashion with an ER-TFT050-2 LCD with touch panel from BuyDisplay.com. However, an odd behavior I am noticing is that the GSL1680 seems to signal touch events by asserting the IRQ pin high in a train of pulses (3 to 6 1ms pulses with ~20ms between pulses). But then the GSL160 will also seemingly randomly assert the IRQ pin high with single 1ms pulses every now and then. Is this a behavior anyone else has noticed? Right now I am filtering out the false touches by only registering the "pulse train" events, but I would ideally expect the controller to only assert the IRQ pin in one pulse after a touch event, and then never if there are no touches detected; so I wonder if I have set it up wrong.

  5. #30
    according to the spec it will assert the interrupt after a power loss or after a sleep cycle. They seem easily ignored as the number of fingers value is zero in those cases. I have not done an extensive test on it yet though as I only just got it working. (mine is also currently bare C for the stm32)

  6. #31
    Junior Member
    Join Date
    Jan 2015
    Posts
    2
    Ah yes, I wasn't looking into register 0x80 close enough before. That all makes sense now. Thanks!

  7. #32
    Senior Member
    Join Date
    Nov 2012
    Location
    Chipping Norton, UK
    Posts
    274
    Quote Originally Posted by wolfmanjm View Post
    Right now I am waiting on some breakout boards so I can connect the tiny FFC connector to a breadboard
    Can you post a link to the breakout you used?

    Ex

  8. #33
    ya here is the breakout board.. http://www.ebay.com/itm/381051996870

  9. #34
    Senior Member
    Join Date
    Nov 2012
    Location
    Chipping Norton, UK
    Posts
    274
    Quote Originally Posted by wolfmanjm View Post
    ya here is the breakout board.. http://www.ebay.com/itm/381051996870
    Ta, can help with Teensy testing then :0)

  10. #35
    cool multi touch is working http://youtu.be/REFw3no-Ltk

  11. #36
    Junior Member
    Join Date
    Jan 2015
    Location
    Norway
    Posts
    16
    Great work!
    I've wanted to write an arduino GSL1680 driver for a long time, but was prevented because I didn't understand a thing about the "firmware" thingy.
    It sure looks much more difficult than for the FT5x06 series of controllers!
    Who will be the first one to get the GSL1680 to work on an arduino ?

  12. #37
    well this would work on an arduino, except the firmware is too big to fit in the flash of a Uno, it should work fine on a teensy3 or teensy++ though.

  13. #38
    Junior Member
    Join Date
    Jan 2015
    Location
    Norway
    Posts
    16
    Sounds good. I'll order a display with GSL1680 and try.

  14. #39
    FYI I have not tested it on a teensy though, but it should work . the FT5x06 is much easier because they actually document the chip, whereas the makers of the GSL1680 decided to not release the register documentation, it also looks like it does not need 28kbytes of firmware downloaded to the chip everytime you powerup.

  15. #40
    Junior Member
    Join Date
    Jan 2015
    Location
    Norway
    Posts
    16
    I plan to use it with a 5" screen with resolution of 480x272. Your code in https://github.com/wolfmanjm/GSL1680 is currently hardcoded to 800x640. But reading the README file it seems like you have plans to create a library to support both resolutions. Great !

  16. #41
    you just replace the gslX680firmware.h file with the one from buydisplay.com for the 480x272.

  17. #42
    @wolfmanjm, yes, I remembered the pullups but I haven't tried your latest code - I'll get time to work on it this weekend and will let you know. Again, thank you! :-)

    DougM

  18. #43
    @wolfmanjm, you are a freaking genius! Loaded on the Teensy with your code and the 480x272 firmware and now there is nothing between me and Total World Domination!

    Thank you!

    DougM

  19. #44
    Junior Member
    Join Date
    Jan 2015
    Posts
    11
    Hi, I also got a 800x480 5'' display from buydisplay.com and have trouble with the GSL1680 touch controller. I2C works fine, firmware downloads but the IRQ line is dead - touches do not seem to register - and any attempt to read the coordinates results in zero values. Any clues? The project is loaded into an XMEGA AVR. I have tried many many different things (demo code, code from others) but nothing solves my problem. I am very frustrated at the moment - like wolfmanjm was a few days ago - because I follow the demo code ro code from others but I get no results. Any help would be greatly appreciated.

  20. #45
    did you try my code? are you running through a level converter? as it requires 3v3? I have it working quite well, but not on a 5v arduino. i think maybe the level converters are in the way as it works great on a 3v3 arm chip.

    I had the same issue with running on arduino, the interrupt line never went high.

  21. #46
    Junior Member
    Join Date
    Jan 2015
    Posts
    11
    Yes, I tried your code wolfmanjm but no luck. It's strange but the GSL1680 doesn't accept the reset sequence before downloading the firmware, only afterwards. No lever converter in between (had one but was causing problems - low level signal was about 1.5V with 10K pull-up and around 2.0V with 4K7). The whole systems runs on 3V3.

  22. #47
    and you have pullups on the I2C lines?

  23. #48
    Junior Member
    Join Date
    Jan 2015
    Posts
    11
    Yes, 4K7. The firmware is stored in progmem - I'm now checking to see if everything is read & written correctly.

    UPDATE

    I have checked the first few bytes of the firmware with my scope - they are OK like they should - so I guess the firmware file (downloaded from buydisplay.com) downloads OK.

    There's still an issue with the INIT process - the only sequence that "works" is:
    -WAKE chip
    -(wait 50ms)
    _GSLX680_load_fw();
    _GSLX680_startup_chip();
    _GSLX680_reset_chip();
    _GSLX680_startup_chip();

    reset after wake doesn't work (acknowledge fails). Also wolfmanjm's init procedure won't work either (acknowledge fails)
    _GSLX680_clr_reg also fails the acknowledge regardless of sequence

    I'm stuck :-(

    NEW UPDATE

    Everything seems to be fine, e.g. if I change chip address from 0x40 to something else chip will not acknowledge any command. If I pull the WAKE line low chip will not respond to any command.
    But still the IRQ line is dead and x-y data are read to be zero.

    NEW NEW UPDATE

    A small breakthrough at last! After the chip goes from shutdown mode to active mode (WAKE pin 0->1) it issues an IRQ and ONLY after this IRQ the chip is ready to receive data. Seems that 300ms delay wasn't enough (or the power line's rise time is a bit slow). The chip now receives all commands but still no IRQ on touch :-( but I'm getting closer now...

    FINAL UPDATE

    OK, the problem is that GCC flash addressing is 16bit, so data in Flash above 64K can't be accessed with pgm_read commands. So, only part of the firmware is downloaded correctly. Will eventually sort it out and I guess then the touch will come to life...
    Last edited by CosR1; 01-22-2015 at 01:46 PM.

  24. #49
    Junior Member
    Join Date
    Jan 2015
    Posts
    11
    Hi to all,

    At last the touch is alive!!! I finally managed to read flash memory locations>64K. I needed to use pgm_read_byte_far and tweak it so that it accepts 24bit addressing. I'm very happy now :-)
    Thank you all for your help!!!

  25. #50
    Ahh That maybe why mine didn't work on the Uno. Thanks for the hint.

Posting Permissions

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