Hi All,
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi All,
Hello,
The interrupt is generated whenever the input port state differs from the value previously read through the input port register. This should apply to a 1-to-0 transition as well, but you would need to read the status while the input port state is 1 first. Please let me know if this isn't clear or doesn't line up with what you are observing.
Regards,
Max
Hello,
Have you been able to verify that interrupts generate properly on 1-to-0 transitions if the last read state of the input port was 1?
Regards,
Max
Hi Max,
Still I am unable to get interrupt for 1-0 transition.
Please find the things we followed.
I followed the read sequence of Scenario 1(Figure 30, Page# 29) mentioned in datasheet & I observed I2C waveform with scope and it is as per defined.
1. If the initial state of the port pin is 0, then I am able to get interrupt for 0 to 1 transition, but if i make 1 to 0 transition on the same port pin the interrupt is not generated. Now if i make that port pin from 0 to 1 the interrupt is not generated. if I change 0 to 1 on other pin of that port the interrupt is generated, but again for 1 to 0 the interrupt is not generated.
2. If the initial state of the port pin is 1, then interrupt is not generated even for 0 to 1 transition and for 1 to 0 transition on the port pin
3. for checking,I read the data two times once the interrupt comes for 0 to 1 transition to make sure we read the data when port pin is 1, but still the interrupt is not generated for 1 to 0 transition.
3. When the interrupt pin will get high after power up? whether we need to do any software configuration/reading sequences?
since it is open drain pin we kept 10K pullup.
4. Can you provide any sample code for this chip if you have?
Thank you
Thank you for the additional info. From my knowledge, the sequence that you described should be generating an interrupt. To clarify, though, on point number 3 above do you see the INT line de-assert after reading the port status via I2C?
I'm curious if perhaps there is some "analog" issue like the input port or INT line not reaching proper high/low thresholds in all cases. Could you please share an oscilloscope waveform capture showing the input port toggling high and low and the INT signal responding?
There shouldn't be anything special required to initialize the interrupt; it should be high automatically once the device becomes powered. Note, though, that only a port that is configured as an input will generate interrupts.
We do not provide sample code directly, although you can find some community resources linked in this thread:
Regards,
Max
Hi Max,
Thanks for the reply.
Yes upon reading the interrupt is getting reset (i.e going to high).
Can you please let me know whether I need to keep pull down resistors on used port pins also?, but datasheet says only on unused port pins the pull down resistors are to placed.
I will share you the wave forms shortly
Thank you
Unused output ports can be left floating, but it is recommended to tie unused input ports either high or low. Without some kind of external bias, the logic state of these pins will be undefined. That could result in them toggling between high/low states randomly and generating unwanted interrupts.
Max
Yes, for unused port pins we tied pull down resistors, if not it will generate unwanted interrupts.
but whether used port pins also required pull down resistors? since we are unable to get interrupt for 1 to 0 transition?
Are the used port pins always driven high or low by some other device, or are they ever high impedance (for example, if they are connected to an open drain output driver)? If they are even in the high-Z state it would be good practice to include either a pull-up or pull-down resistance in order to prevent unwanted interrupt generation.
Do you think it would be possible to provide the oscilloscope waveform captures that I requested? That may help further the debug efforts.
Max
Hi Max,
If there is no pull down resistors on used port pins we observed the voltage on port pin is 0.04V at zero level(but as per datasheet 0.3*VCC i.e 0.3*3.3=0.99V is is low level), with this the interrupt is not generated for 1 to 0 transition.
After connecting pull down resistors on used pins also the voltage became exactly 0V at that port pin & the interrupt is generated for 1 to 0 transition also.
Now we are able to get interrupt for both transitions.
Thanks for the support.