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

Status
Not open for further replies.
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
 
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 :)
 
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.
 
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)
 
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 ?
 
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.
 
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.
 
@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
 
@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
 
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.
 
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.
 
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.
 
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:
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!!!
 
Status
Not open for further replies.
Back
Top