Go Down

Topic: Interrupts on Arduino Mega (Read 668 times) previous topic - next topic

RickN

Hi,

A simple question about the Arduino Mega. I ndded 6 external interrupts, generated by pulses. Luckily my board has 6 interrupts placed on digital pins
2,3,18,19,20,21

If I look at my board I see that 2&3 are placed under the analog input section. 18=TX1, 19=RX1, 20=SDA, 21=SCL

I guess I can still place my sensors at these pins, even though they are marked other functionality? However, when using TX1 and RX1, does that mean I loose one of the serial communication lines? I need one serial line for sending and receiving. There are several other pins, but maybe I miss some features since they are not generating interrupts?
Game hobby project: Tower22

retrolefty


"I guess I can still place my sensors at these pins, even though they are marked other functionality? "

Yes you can, but of course can't use multiple functions at the same time for the same pin.  ;)

"However, when using TX1 and RX1, does that mean I loose one of the serial communication lines? "

Yes, can't use Serial1, but that still leaves three other hardware serial ports using pins 0 & 1, 14 & 15, and 16 & 17. And of course there is a software serial library routine available that allows one to utilize serial communications on any free pair of digital pins.

Lefty


RickN

Allright, nothing to worry then :)
Game hobby project: Tower22

Go Up