Pages: [1]   Go Down
Author Topic: Interrupts on Arduino Mega  (Read 579 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Game hobby project: Tower22

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


"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.  smiley-wink

"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

Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Allright, nothing to worry then smiley
Logged

Game hobby project: Tower22

Pages: [1]   Go Up
Jump to: