A question about Pin Change ISR.


i have project control heater , pump swimming pool. have had pcb fabricated , hardware works expected. code have far works also. i'm trying encapsulate parts of code related hardware devices libraries future use. i'm using ds3232 rtc time heater , pump on , off times , blackberry microtrackballer breakout board (from sparkfun) menu navigation. have library rtc , trackballer done , working [separately].

the thing trackballer uses pcint0 , rtc uses pcint0, pins 53 , 52 respectively (on mega). in original code isr global , written check pin had changed , handle accordingly. since rtc uses 1 interrupt , trackballer uses 5 interrupts (1 each direction , 1 button press) have put isrs in new trackball library. know far simpler put rtc on it's own pcint. however, i've fab'd pcb. original code it's not problem. it's problem trackball library if want use interrupt pins share same pin change interrupt. so, question is:

is possible conditionally substitute pin change isr in trackball library. or better yet, insert (when needed) code check additional pin(s) used other hardware?

i don't understand why rtc needs interrupt. it's not if heater needs controlled microsecond accuracy. suspect polling @ 10 second intervals fine.

...r


Arduino Forum > Using Arduino > Programming Questions > A question about Pin Change ISR.


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support