sensor interrupts

All about Sub-20 Multi Interface USB Adapter USB to I2C, SPI, GPIO, RS232, RS485, Ir, LCD

Moderator: serg

Post Reply
hatepod
Posts: 1
Joined: Thu Sep 15, 2011 6:28 pm

sensor interrupts

Post by hatepod »

Hi,
I have 3 different sensors sith SPI interfaces. These sensors also have an interrupt pin for a "new data" indication. When the data is ready on any one of the sensors, the corresponding sensor sets its interrupt pin to high so that we can then read the new data from that sensor through spi.

My question is this: is there anyway to use such an interrupt schema in sub20? The only possible way seems to connect interrupt pins to gpio and the continuously poll gpio for low to high edge transition. Is this the only way or is there any other better way? (For instance, does sub20's api provide some kind of software interrupt for hardware interrupt indication etc).

serg
Posts: 143
Joined: Mon Aug 31, 2009 9:17 pm

Re: sensor interrupts

Post by serg »

Hi hatepod,

The SUB-20 doesn't support interrupts currently. It has an "edge detector", but you still need to call a function to read the detection result, i.e basically the same polling. The only advantage is that this functionality can be used for edge triggered interrupts detection

Post Reply