0

CAP1188 stops responding after reading productid, manufactur
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CAP1188 stops responding after reading productid, manufactur

by nidalp on Tue Feb 17, 2015 2:55 am

Code reads product id, manufacturer id and revision:

Product ID: 0x50
Manuf. ID: 0x5D
Revision: 0x00

and after that all I get are 0x00 on any read. This code

if ( (readRegister(CAP1188_PRODID) != 0x50) ||
(readRegister(CAP1188_MANUID) != 0x5D) ||
(readRegister(CAP1188_REV) != 0x83)) {
return false;
}

returns false because those 3 reads return 0x00.

If anyone has any ideas what could be the case, please let me know, because I'm out of ideas after 3 hours of wrestling with this thing trying to get it to work.

Btw, Vin pin has to be powered with 5V, anything somewhat lower, like 4.5V, will not work.

There are other gotchas, but I'm kind of tired to remember them right now :)

Thanks for any help!

nidalp
 
Posts: 7
Joined: Fri Dec 06, 2013 10:49 am

Re: CAP1188 stops responding after reading productid, manufa

by adafruit_support_rick on Tue Feb 17, 2015 12:38 pm

Please post clear, detailed pictures of both sides of the module, showing your soldering and wiring.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: CAP1188 stops responding after reading productid, manufa

by nidalp on Tue Feb 17, 2015 1:25 pm

Thanks Rick!

I attached pictures of soldering and wiring, it might help, might not.

I have checked connections from controller board to CAP1188 breakout board, that AD pin on board is grounded, voltages on chip are there, that SPI module on controller is set up and working (sending out bytes what it needs to send, using MODE0 SPI, which is supported by CAP1188, SCK is working, #CS is asserted when it needs to be asserted), reset pin on CAP1188 is asserted, correcte sequence of bytes is sent to CAP1188 from controller (used oscilloscope capture to get waveforms), SPI is set to 100kHz, and wires that connect board with are cca 15cm long which gives fairly clean signal for that speed, as I can see on oscilloscope.

At certain point I finally managed to get response from CAP1188 which is what I posted: product ID, manufacturer ID and revision.
However, once I got that, CAP1188 just went silent and I only get 0x00 on any SPI read.
When I reset controller board (and CAP1188 via #RES signal), same thing repeats again: returns product ID, manufacturer ID and revision and then stops.
Since same scenario is consistently repeating I don't think it has anything to do with soldering or wire noise (those are things to check in very early stages of debugging), more likely I'm not "telling" CAP1188 something I should be.

As if I'm in a bad movie:
- "What's the status of your touch register?"
- "I'm leutenant Johhny Doe, serial number CAP1188, U.S. Air Force, and that is all you'll get from me!"
xD

So, I was just wondering if maybe there's someone out there who could have an idea what sequence of events (SPI commands, pin assertions?) could turn CAP1188 silent after it returns product ID, manufacturer ID and revision.

I do have at least 5-6 different scenarios yet to try, which will probably take couple of hours later today, but I thought it can't hurt to ask on a forum, eh?

Then again, it just might be a bad wire, who knows....
Attachments
03.jpg
03.jpg (208.33 KiB) Viewed 353 times
02.jpg
02.jpg (212.35 KiB) Viewed 353 times
01.jpg
01.jpg (235.48 KiB) Viewed 353 times

nidalp
 
Posts: 7
Joined: Fri Dec 06, 2013 10:49 am

Re: CAP1188 stops responding after reading productid, manufa

by nidalp on Wed Feb 18, 2015 1:51 am

It was an SPI timing issue. CAP1188 recognizes 0x7A, 0x7D, 0x7E and 0x7F bytes as commands and if it receives any other value it just outputs 0x00.
For some reason (never mind) my data stream was off by one byte and after reading first 3 register everything else stopped working.

Board is alive and LEDs are blinking.
Attachments
04.jpg
04.jpg (173.08 KiB) Viewed 326 times

nidalp
 
Posts: 7
Joined: Fri Dec 06, 2013 10:49 am

Re: CAP1188 stops responding after reading productid, manufa

by adafruit_support_rick on Wed Feb 18, 2015 10:12 am

Glad to hear it!

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: CAP1188 stops responding after reading productid, manufa

by capraj on Mon Aug 19, 2019 9:06 am

hi nidalp
can you please post whole sketch because i am also facing same issue.

capraj
 
Posts: 3
Joined: Thu Jul 25, 2019 8:45 am

Re: CAP1188 stops responding after reading productid, manufa

by oesterle on Mon Aug 19, 2019 6:37 pm

Hi, capraj!

Welcome to the Forums!

Please create a new topic with your specific issue. (This is generally a good practice, as new topics get more attention, and while you may have a similar issue, it's easier to help each maker's issue in their own, separate thread. Also, this thread is over 4 years old, and as such, your question may not get noticed.)

It will also help if you include a sharp picture of your wiring. (800x600 works well.)

Cheers,

Eric

oesterle
 
Posts: 687
Joined: Tue Sep 17, 2013 11:32 pm

Re: CAP1188 stops responding after reading productid, manufa

by capraj on Tue Aug 20, 2019 1:28 am

cap1188_SPI.ino
(2.77 KiB) Downloaded 8 times


Hi oesterle

Thanks for quick reply, for wiring i am following adafruit document for i2c.
wiring connection
arduino mega - cap1188
20 - SDA
21 - SCL
GND - GND
Vin - VCC
9 - Reset

capraj
 
Posts: 3
Joined: Thu Jul 25, 2019 8:45 am

Re: CAP1188 stops responding after reading productid, manufa

by adafruit_support_carter on Tue Aug 20, 2019 3:05 pm

Locking thread.

@capraj Please continue with your issue in this thread:
viewtopic.php?f=8&t=155439

adafruit_support_carter
 
Posts: 13503
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.