Arduino Mega 2560 Proteus Schematic



How to connect a serial port Arduino Mega 2560 R3 to an Arduino UNO R3 compatible and to an Arduino Leonardo clone.

Arduino Mega 2560 Library For Proteus The Engineering Projects. Arduino Mega 2560 Design Schematic Layout With Eagle Do Magic With Proteus Avr. Arduino Mega 2560 Library For Proteus The Engineering Projects Simulating Arduino Mega2560 In Proteus Dms. Design Smart And Precise Pcb Layout And Schematic For You By Arduino Pro Mini Designing In Proteus Youtube Pcb Designing In Proteus Ares Arduino Mega 2560 Pcb Search Easyeda Arduino Dmx 512 Tester Controller Arduino Project Hub. 200+ Arduino Projects: Whether you are just beginning or have extensive experience with Arduino, there is something here for everyone.In the Electronics Lab, you can prototype and design before you build a circuit in real life. Icsp +5v gnd +5v gnd gnd +5v gnd gnd 47u 47u gnd gnd g n d gnd green g n d +5v m7 gnd mc33269d-5.0 mc33269st-5.0t3 100n gnd 100n 100n +3v3 +5v +5v atmega1280-16au 100n 100n. Mega 2560 Schematic Arduino arduino mega 2560 reference design reterence designs are pro vided 'as is' and 'wi th all faults disclaims all other warranties, express or implied, regarding products, including but not limited to, any implied warranties of merchantability or fitness fora particular purpose Arduino - Home Arduino may make changes to.

  • 13,198 views
  • 0 comments
  • 1 respect

Components and supplies

Proteus
Arduino Mega 2560
×1
Adafruit Metro 328
×1
Arduino Leonardo With Headers
×1
Arduino UNO
×1

Apps and online services

About this project

This tutorial we are covering Serial Port Basics on the Arduino Mega 2560 R3.

If you ever wonder how to use the other Serial ports on the Arduino Mega 2560 R3, but don't know where to start? This short tutorial we'll go over the basics, we'll connect to an Adafruit Metro 328 = its an Arduino compatible; works just like an Arduino UNO R3, and we will connect to an Arduino Leonardo clone...

The connections will be UART to UART, SoftwareSerial to SoftwareSerial, UART to SoftwareSerial, and ALL 3 connected together!! :)

Before you make the physical wire connections.... LOAD the code to your Arduinos first!

Please follow this step because your Arduinos use the 'DEFAULT' SerialPort to upload your code from the Computer, once you make the physical wire connections the 'Default' SerialPort will be used on the Arduino UNO (Adafruit Metro 328) to communicate with the Arduino Mega 2560 R3's SerialPort #1 which is pin19 RX1 and pin18 TX1 on the Mega. This will not allow the Arduino UNO(Adafruit Metro 328) to communicate with the outside world; AKA your computer. The Leonardo will use the SoftwareSerial example but if using the UART; same will apply as the Arduino UNO's....

MEGA to Adafruit 328(Arduino UNO) UART to UART connection.

  • Upload the the codes to Arduino Mega and Arduino UNO(Adafruit 328)
  • Connect one end of a wire to Mega's pin19 RX1 and the other end to Arduino UNO's(Adafruit 328) pin1 TX...
  • Connect one end of a wire to Mega's pin18 TX1 and the other end to Arduino UNO's(Adafruit 328) pin0 RX
  • Connect the ground pin on the Mega to the ground pin on the Arduino UNO(Adafruit 328).
  • Connect Arduino UNO to a Stable/Reliable power source.
  • Connect Arduino Mega to the Computer from the USB cable.
  • On the Arduino Mega UART1 program window of the Arduino IDE, make sure your COM is selected to the Arduino Mega before opening the Serial Console, Open the Serial Console set to 9600 baud COM Speed.
  • On the Top window in the text box enter the letter x … not the capital X … the LED on the Arduino UNO(Adafruit 328) goes ON.
  • On the Top window in the text box enter the letter a … not the capital A … the LED on the Arduino UNO(Adafruit 328) goes OFF.

Arduino 2560 Schematic

What we are doing in this code is calling on the Arduino Mega's default UART Serial port by calling Serial.begin at a 9600 baud speed rate. This is going to listen to the Computer for instructions through the USB cable. We are also calling upon the 2nd UART Serial port by calling Serial1.being at a 9600 baud rate. This is going to communicate with the Arduino UNO(Adafruit Metro 328).

What happens.... when you type the letter x or a on the text window on the Serial Console it sends it to the Arduino Mega, then the Arduino Mega sends it to the Arduino UNO(Adafruit Metro 328) through the 2nd UART Serial port with the Serial1.write(Serial.read()); command.

In this code we are using the Arduino UNO (Adafruit Metro 328) default Serial UART to communicate with the Mega, The Arduino waits for the Serial UART to receive a message, if the data is a refence what is in the code, in this case is a letter x or a the code will turn ON or OFF the LED on the Arduino UNO (Adafruit Metro 328).

Arduino Mega to Arduino Leonardo …. SoftSerial to SoftSerial connection.

  • Load code to Arduinos
  • One end of one wire goes to pin9 of Mega, the other side of wire goes to pin8 of Arduino Leonardo.
  • One end of one wire goes to pin9 of Mega, the other side of wire goes to pin9 of Arduino Leonardo.
  • One end of one wire goes to Ground pin of Mega, the other side of the wire goes to the Ground pin of Arduino Leonardo.
  • Connect a reliable power supply to your Leonardo
  • Connect the computer USB cable to your Mega
  • On the Arduino Mega SoftSerial window in the Arduino IDE, make sure your comm port is set for the Arduino Mega.
  • Open your Serial Console, set it to 9600 baud speed rate if its not there yet, type the letter a on the text box on the top, the light on the Leonardo should go ON, type x on the text box and the light on the Leonardo should go OFF.

In this code we use software serial instead of the hardware UART serial, to communicate with the Leonardo, Pin8 will be RX and pin9 will be TX. Hardware Serial UART is used to communicate with the computer. The same process hapens here; type something in the serial console text window and the computer sends it to the Mega, then the Mega sends it to the Leonardo.

Here we use software serial instead of the hardware serial; pin8 is RX, pin9 is TX, and the same thing happens as the other example; if the letter a is received the LED on the Leonardo is turned ON if the letter x is received the LED is turned OFF.

Arduino Mega Hardware UART to Arduino Leonardo Software Serial

  • Keep the same program on the Arduino Leonardo
  • Load Arduino Mega UART3 code on the Mega
  • connect pin14 TX3 on the Mega to pin8 RX on the Leonardo
  • connect pin15 RX3 on the Mega to pin9 TX on the Leonardo
  • connect the Leonardo to a reliable power source
  • connect the Mega to the computer USB cable
  • On the Arduino Mega UART3 code in the Arduino IDE make sure your using the Mega port, Open the serial console when you type a the LED turns ON the Leonardo, when you type an x the LED on the Leonardo turns OFF.

In this code we use UART3 on the Mega to communicate with the Leonardo. Same thing happens as the other example we only used UART #3 on the Mega. The code on the Leonardo remains the same as the previous example.

This is the LAST Example!!!

We will connect ALL 3 together!!!

You may be wondering why would you want to do that?!??!

Because you may find yourself in a situation where your using your default hardware UART for a device and then you need another UART connection; this is where you use the software serial on the same board!!!... you may say.... well I will just use a Mega... Well, … my little programmer, not ALL shields or sensors are compatible with the Mega; that's why were are going to connect the Arduino UNO (Adafruit Metro 328) as an In-between microcontroller just for this reason.... You'll thank me later when the issue arrives..

  • To save time and energy, the Mega keeps the same program and the Leonardo keeps the same program from the last example.
  • We just need to upload the new program to the Arduino UNO (Adafruit Metro 328)
  • Upload Arduino UNO UART___SoftSerial code to the Arduino UNO(Adafruti Metro 328)
  • connect pin9 TX on the Leonardo to pin8 RX on the Arduino UNO(Adafruit Metro 328) this is for Software Serial
  • connect pin8 RX on the Leonardo to pin9 TX on the Arduino UNO(Adafruti Metro 328) this is for Software Serial
  • connect pin14 TX3 on the Mega to pin0 RX on the Arduino UNO(Adafruit Metro 328) this is for Hardware Serial UART
  • connect pin15 RX3 on the Mega to pin1 TX on the Arduino UNO (Adafruit Metro 328)
  • connect ALL 3 Micros ground pins together
  • connect Leonardo and UNO (Adafruit Metro 328) to a reliable power source
  • connect Mega to computers USB cable
  • On the Arduino Mega UART3 code IDE make sure your Mega comm port is selected.
  • Open the Serial Monitor use 9600 baud speed, when you type the letter v on the text window the LED on the UNO (Adafruit Metro 328) goes ON. Whe you type the letter b the LED goes OFF.
  • When you type the letter a on the text window the computer sends it to the Mega then the Mega sends it to the UNO (Adafruti Metro 328) then the UNO (Adafruit Mero 328) sends it to the Leonardo to turn ON the LED on the Leonardo. Type the letter x and the LED on the Leonardo goes OFF

Here you can see how softSerial is declared and used, when the letter x is recieved, softSerial will send a letter x to the Leonardo, same for the letter a.

Code

Arduino UNO (Adafruit Metro 328) SLAVE UARTArduino

Arduino Mega 2560 Tutorials

Schematics

uploads2ftmp2f0d50ef77-6185-4601-942d-4247ff8283162fproject_2_arduinos_uart_to_uart_Fz1loFMYvo.fzz
How to connect Arduino Mega to Arduino Leonardo... Fritzing file..
uploads2ftmp2ff24e9ff1-b8a2-4e5d-bf6e-3145c47c040b2fproject_2_arduinos_softwareserial_to_softwareserial_fAMQ55FFEd.fzz
uploads2ftmp2f6ad8f826-fb59-49dd-a156-a81436d9f7162fproject_all_3_XamcrhTrwn.fzz

Author

Alex Fraga
  • 1 project
  • 0 followers

Published on

September 16, 2019
Write a comment
Arduino

Members who respect this project

See similar projects
you might like

Table of contents

Arduino Mega 2560 Proteus Schematic Download

Write a comment