SC18IM704 interrupts

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SC18IM704 interrupts

跳至解决方案
1,126 次查看
jj100126
Contributor I

Hello, I have a SC18IM704-EVB and I want to pair it with PCF8575, is there a way for the SC18 to accomodate the INT pin of the PCF? How does the host get the interrupt?

0 项奖励
回复
1 解答
1,098 次查看
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Joshua,

yes, that is correct. You need to poll for checking if the !INT was asserted low by reading the IOState register.

With Best Regards,

Jozef

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,117 次查看
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Joshua,

you can connect the !INT pin to one of the GPIOs pin in the SC18IM704. The GPIO pins are configured as inputs after reset. 

JozefKozon_0-1653567634125.png

You can make sure, that the used GPIO is set as input only by setting the PortConfx registers to 00 or 01.

JozefKozon_5-1653568371693.png

JozefKozon_1-1653567691836.png

JozefKozon_2-1653567727380.png

Then you by reading the IOState register of the GPIO pin, you can check if the !INT pin is asserted (LOW).

JozefKozon_3-1653567851782.png

JozefKozon_4-1653568149213.png

With Best Regards,

Jozef

 

 

1,113 次查看
jj100126
Contributor I

i have thought of this as well, setting the GPIO as input, but how about on the host side? Should the host poll everytime for the input from the INT pin, and if there's one, the host then read the inputs from the PCF?

I am also thinking of ditching the INT pin and just let the host poll for the PCF inputs directly

0 项奖励
回复
1,099 次查看
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Joshua,

yes, that is correct. You need to poll for checking if the !INT was asserted low by reading the IOState register.

With Best Regards,

Jozef

0 项奖励
回复