1

If I am correct, the first two pins (RX/TX) are connected to the USB, and I cannot use the serial monitor and the first RX/TX serial ports at the same time.

But, what about the other 3 auxiliary serial ports? Are they separated? Do each one of them has it's own buffer?

For example: Is it possible to add, let's say, four Bluetooth modules(Let's say HC-05) and use each of them for a different purpose?

0

3 Answers 3

1

Just to complement JRobert's answer: yes, the four serial ports are independent. They can be activated independently, they can be set to different baud rates if needed, and they do have separate buffers.

2

You can indeed use a serial monitor on your PC on the Mega's first serial port, in fact you will have to if you are connecting to one on the PC via USB port.. And just as with the Uno, you can connect a TTL serial device (like RS-232 serial, but using logic levels of 0 and +5v instead of [-3v - -25v] and [+3v - +25v] (which most PCs implemented as -12v and +12v).

If you need to connect to a true RS-232 device, you'll need to convert the TTL logic levels to something within the RS-232 spec; -5v and +5v would probably be the easiest.

0

Serial1, Serial2 and Serial3 are all independent, at 0/5V levels. You can each one to a bluetooth module, or whatever HC-05 is. Or FTDI Basic modules if you want more USB ports. Etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.