Page 1 of 1

RC INTERUPT for MIAC (Arduino)

Posted: Sat Mar 11, 2017 6:05 pm
by Monie Jacobsen
Hello everyone

Want RC interupt for MIAC (Arduino) MI5466 user ATmega1281.
I want signal from RC Receiver to below interrupt:

INT0 = B0 ATmega1281 pin No.:10
INT1 = B1 ATmega1281 pin No.:11
INT2 = B2 ATmega1281 pin No.:12
INT3 = B3 ATmega1281 pin NO.:13
INT4 = B4 ATmega1281 pin No.:14

Can interrupt used ?
Is this possible?
If yes, the output-pin must then be used for the above?

Yours sincerely

Re: RC INTERUPT for MIAC (Arduino)

Posted: Tue Mar 14, 2017 2:35 pm
by LeighM
Hi Monie,

Sorry for late reply.
Port B is not externally accessible.
Page 21 of the MIAC datasheet gives to the processor pin usage map for the MIAC.

The I1 and I2 MIAC inputs are connected to Port G0 and G1 if that is of any help.

Regards,
Leigh

Re: RC INTERUPT for MIAC (Arduino)

Posted: Tue Mar 14, 2017 4:33 pm
by Monie Jacobsen
Hi Leigh,

Are there others in the MIAC series
which can C ++ and have access to interrupt?
So enlighten me kindly type and order number!

Hi Leigh,

Re: RC INTERUPT for MIAC (Arduino)

Posted: Tue Mar 14, 2017 5:35 pm
by LeighM
Hi Monie

The dsPIC version inputs I1 and I2 are connected to RB0 and RB1.
I will need to check the datasheet to see if IOC can be mapped to those pins,
however it is still only the two,
is it possible for you to wire OR the outputs to give one interrupt,
upon which you can then poll all inputs?

Leigh

Re: RC INTERUPT for MIAC (Arduino)

Posted: Tue Mar 14, 2017 6:04 pm
by Monie Jacobsen
Hi Leigh,
Do not know how I poll all inputs

Re: RC INTERUPT for MIAC (Arduino)

Posted: Wed Mar 15, 2017 9:37 am
by LeighM
Hi Monie,

For polling I mean reading the state of the input within the main loop of the program.
So it depends upon the maximum time between polling/reading the inputs and how long the input active pulse lasts,
and how quickly you need to take action after the start of the input pulse.

If that is not feasible, then on the dsPIC, RB0 and/or RB1 can be configured to interrupt on change.
So all 5 of your inputs, as well as going to Ix inputs, could possibly be wire OR'd (via diodes) into say I1 (RB0) to generate the interrupt,
the interrupt code would then read the state of all the 5 inputs.

https://en.wikipedia.org/wiki/Wired_logic_connection

Re: RC INTERUPT for MIAC (Arduino)

Posted: Wed Mar 15, 2017 11:46 am
by Monie Jacobsen
Hi Leigh,
Thanks for fine documented information.
Will the project forward