Lode 2 Posted June 30, 2016 Share Posted June 30, 2016 Writing a small lib for an i2c ic. I got it all working, but there's room for improvement and I can't seem to figure it out nor did I find anything similiar. The chip has combined it's SCL with an INT, which triggers (INT = 0) when measurement is complete. I have currently worked around this with a 1000 cycle delay at 8Mhz. Preferably I would like to enter LPMx in between ofcourse, could (ab)use a timer, but the interrupt seems the cleanest solution. So the question is howto capture this interrupt signal? I'm using the i2c code from TI with the exception that SDA = P1.7, SCL = P1.6 Furthermore SCL/SDA are pulled high with 1.2kOhm resistors. I've tried polling at various i2c related registers during the 1000 cycles delay (IFG2, UCB0STAT, UCB0I2CIE, IE2) for a flag, but cannot see anything happening. I was hoping UCSCLLOW could be a solution. SCL is more just an output signal I guess. I've also tried to swith to GPIO type interrupt and monitor P1IFG & BIT6 without any luck, I tried various settings maybe I missed something? Maybe I need a different approach in my hardware? Maybe there are other chips that work this way and someone else figured this out? Any help greatly appreciated Be happy to post more info or code if that helps. Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.