Back to Blog
Arduino mega serial port interrupt7/4/2023 ![]() ![]() The long list of: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69Īre pin change interrupts which are what are required for NewSoftSerial (called SoftSerial in Arduino 1.0 and above). Pin change interrupts trigger as long as any change occurs. External interrupts are more complex and can be configured to trigger on rising and/or falling edges. With respect to the contradictory pins there are two types of interrupt pin on the ATmega2560 - external interrupts (INT7 - INT0) and pin change interrupts (PCINT23 - PCINT0). This limits the pins that it can work on though to ones that have pin change interrupts. This uses interrupts and timers, and is far more efficient. In Arduino version 1 and above, SoftSerial was replaced with NewSoftSerial. I would strongly recommend avoiding this. It just uses millis(), digitalRead/Write and blocks when sending or receiving. In Arduino version 0023 and below, SoftSerial was a very basic library written by David Mellis. The reason behind the discrepancy in documentation is that the documentation refers to two different versions of the software and it is out of date.
0 Comments
Read More
Leave a Reply. |