Different Upload Port Than Serial Monitor Arduino

Contributors: Joel_E_B, jimblom, maettu_this

Favorited Favorite 39

Serial Last Overview

COM ports. Baud rate. Period control. Tx. Rx. These are all words that get thrown around a lot when working with electronics, peculiarly microcontrollers. For someone who isn't familiar with these terms and the context in which they are used, they can be confusing at times. This tutorial is here to assistance y'all understand what these terms mean and how they grade the larger picture that is serial communication over a final.

In short, serial terminal programs make working with microcontrollers that much simpler. They allow you lot to run into data sent to and from your microcontroller, and that data tin can be used for a number of reasons including troubleshooting/debugging, advice testing, calibrating sensors, configuring modules, and data monitoring. Once you have learned the ins and outs of a terminal application, information technology can be a very powerful tool in your electronics and programming arsenal.

Covered in this Tutorial

There are lots of unlike terminal programs out there, and they all have their pros and cons. In this tutorial we will hash out what a terminal is, which terminal programs are best suited for sure situations and operating systems, and how to configure and use each program.

Suggested Reading

You should exist familiar with these topics earlier diving into this tutorial. If you lot demand a refresher, feel costless to popular on over to these links. We'll be correct here waiting.

  • Series Advice
  • Analog vs Digital
  • Binary
  • Hexadecimal
  • ASCII
  • Installing FTDI Drivers
  • RS-232 vs TTL Serial Communication
  • Logic Levels
  • Connector Basics especially the USB section

What is a Terminal?

Terminal emulators go by many names, and, due to the varied use of the word terminal, at that place tin often be some confusion about what someone means when they say terminal. Allow's articulate that up.

Brief History

To understand the use of the word last, we must visit the not so distant past. Back when computers where big, bulky, and took upwardly entire rooms, there were just a handful of ways to interface with them. Punch cards and paper tape reels where 1 such interface, just there was as well what was known as a terminal that was used for inbound and retrieving information. These terminals came in many form factors, just they shortly began to resemble what would become their personal reckoner descendants. Many consisted of a keyboard and a screen. Terminals that could brandish text only were referred to every bit text terminals, and after came graphical terminals. When discussing final emulators, it'due south these last of days past that are beingness referenced.

alt text

An OG last

Modern Terminals

Today, terminal programs are "emulating" the experience that was working on 1 of these terminals. They are known as emulators, applications, programs, terms, TTYs, and then on. For the purposes of this tutorial, merely the word final will be used. Many terminals use to emulate specific types of computer terminals, just today, most terminals are more generic in their interface.

When working on a modernistic operating arrangement, the discussion terminal window will often exist used to depict working inside one of these applications. And, oft, when reading other tutorials and hookup guides, yous will be requested to open a concluding window. Just know that means to open whichever one of these terminals programs strikes your fancy.

It is also worth noting that many terminal programs are capable of much more than just series communication. Many have network advice capabilities such as telnet and SSH. Yet, this tutorial will not cover these features.

Terminal vs Command Line

A terminal is not a control prompt, though the 2 are somewhat similar. In Mac Bone, the command prompt is even chosen Last. Hence the confusion when using that word. Regardless, you can perform some of the same tasks in a command prompt that y'all could also perform inside a terminal window, only it doesn't work the other way around; you cannot issue command line statements within a terminal window. We will go over how to create a serial terminal connection within a command line interface later in this tutorial. For now, merely know how to distinguish betwixt the two.

Basic Terminology

Here are some terms yous should be familiar with when working within a serial terminal window. Many of these terms are covered in a lot more than particular in our Serial Communication tutorial. Information technology highly recommended that you read that page as well to get the total picture.

ASCII - Short for the American Standard Code for Information Interchange'southward character encoding scheme, ASCII encodes special characters from our keyboards and converts them to 7-flake binary integers that can be recognized past a number of programs and devices. ASCII charts are very helpful when working with series terminals.

Baud Rate - In short, baud rate is how fast your data is being transmitted and received. 9600 is the standard rate, but other speeds are typical amongst sure devices. Just remember that all the links in your chain of advice have to exist "speaking" at the same speed, otherwise information will be misinterpreted on one terminate or the other.

Transmit (TX) - Also known as Data Out or TXO. The TX line on any device is there to transmit data. This should be hooked up to the RX line of the device with which you would like to communicate.

Receive (RX) - Likewise known as Data In or RXI. The RX line on any device is there to receive data. This should be hooked upwardly to the TX line of the device with which you lot would like to communicate.

COM Port (Serial Port) - Each device you connect to your estimator volition exist assigned a specific port number. This helps to place each device continued. Once a device has a port assigned to it, that port will exist used every time that device is plugged into the computer.

Your device volition testify up on your computer equally either COM# (if you lot're on a Windows machine) or /dev/tty.usbserial-######## (if you're on a Mac/Linux computer), where the #'due south are unique numbers or alphabetic characters.

TTY - TTY stands for teletypewriter or teletype. Much like terminal is synonymous with the terminals of quondam, so besides is teletype. These were the electromechanical typewriters used to enter information to the terminal and, thus, to the mainframe. When working with terminals on Mac and Linux, you will often see tty used to correspond a communication port rather than 'COM port'.

Data, Stop, and Parity Bits - Each packet of data sent to and from the concluding has a specific format. These formats tin vary, and the settings of your terminal tin be adjusted appropriately to work with different packet configurations. 1 of the most common configurations yous'll come across is viii-North-ane, which translates to 8 information bits, no parity bit, and one cease bit.

Menses Control - Menstruation control is controlling the rate at which data is sent between devices to ensure that the sender is non sending information faster than the receiver can receive the information. In virtually applications used throughout these tutorials, y'all will non need to use flow control. The flow control may also exist present in the shorthand annotation: 8-N-one-None, which stands for no period control.

Wagon Return & Line Feed - Wagon return and line feed are the ASCII characters sent when y'all press the enter cardinal on your keyboard. These terms have roots from the days of typewriters. Wagon render meant the carriage holding the paper would render to the starting point of that particular line. Line feed (aka new line) meant the carriage should move to the next line to prevent typing over the previous line.

When typing on a modern keyboard, these terms still apply. Every time yous printing enter (or return) you are telling your cursor to move down to the next line and move to the beginning of that new line.

Consulting our handy-dandy ASCII tabular array, we tin see that the character for line feed is 10 (0x0A in hex) and wagon return is 13 (0x0D in hex). The importance of these two characters cannot exist stressed enough. When working in a terminal window you'll oftentimes demand to be aware of which of these two characters, if not both, are being used to emulate the enter key. Some devices merely need one grapheme or the other to know that a command has been sent. More importantly, when working with microcontrollers, exist aware of how you are sending information. If a string of 5 characters needs to be sent to the micro, you may need a string that can actually hold 7 characters on account of the ten and 13 sent afterwards every command.

Local Echo - Local echo is a setting that can exist changed in either the serial terminal or the device to which you are talking, and sometimes both. This setting simply tells the terminal to print everything you blazon. The do good from this is being able to see if yous are in fact typing the correct commands should you encounter errors. Exist aware, though, that sometimes local repeat can come back to bite you. Some devices volition interpret local repeat equally double blazon. For example, if you lot type hullo with local echo on, the receiving device might run into hheelllloo, which is likely not the correct command. Most devices tin handle commands with or without local repeat. But be aware that this can exist an issue.

Series Port Profile (SPP) - The Series Port Profile is a Bluetooth profile that allows for serial communication betwixt a Bluetooth device and a host/slave device. With this profile enabled, you lot tin can connect to a Bluetooth module through a serial terminal. This tin can be used for configuration purposes or for communication purposes. While not exactly pertinent to this tutorial, information technology's still good to know nigh this profile if y'all desire to use Bluetooth in a project.

Connecting to Your Device

Now that you know what a terminal is and the lingo that comes with the territory, it'due south fourth dimension to hook up a device and communicate with it. This page volition show you how to connect a device, how to find which port it has been assigned, and how to communicate over that port.

What You'll Need

For this case you'll need

  • An FTDI Basic - 5V or 3.3V will work fine. You lot can also use an FTDI Cable if that'south all y'all have.
  • A USB Mini-B Cablevision - (Not necessary if you lot have an FTDI Cable.)
  • A jumper wire - About FTDI products have female headers, so a male-to-male person jumper cable should suffice. Or, you lot could just utilize a piece of wire that is stripped on both ends.

Discovering Your Device

Once yous have all your supplies set, attach the FTDI Basic to the USB cable, and attach the cablevision to your computer. If this is the first time you've plugged in a device of this nature into your computer, yous may need to install the drivers. If this is the case, visit our FTDI Driver Installation Guide. If the drivers are all up to date, behave on.

Depending on which operating system you're using, there are a few unlike means to find which port your device has been assigned.

Device Manger (Windows)

No affair which version of Windows you have, y'all have a program called Device Manager. To open device manger, open the offset carte, and type

            devmgmt.msc                      

into the search bar. Press enter, and information technology'll open up right up. Or, you can right-click on MyComputer, select Properties, and open the Device Manger from there (Windows seven). If you intend on using your estimator to communicate with several serial devices, it may be worth creating a desktop shortcut to Device Manger.

Once yous've got Device Manger open up, expand the Ports tab. Hither is where the information we need lives.

alt text

In this epitome, we have only a few COM Ports showing upwardly. The first matter to know is that COM1 is ALWAYS reserved for the truthful Serial Port, not USB. You know those grey, beefy cables, which have a DB9 connectedness on each cease. Yeah, that serial port. Many computers (peculiarly laptops) no longer have serial ports, and they are becoming obsolete in exchange for more than USB ports. Nevertheless, the Os still reserves COM1 for that port for people who still have an true serial port on their computer.

Another port that is likely to show upwards on most computers is LPT1. This is reserved for the parallel port. Parallel ports and cables are becoming even more obsolete than serial cables, but, again, many computers nevertheless have these ports (they're frequently used to connect to printers) and take to arrange for that in the Os.

With those out of the way, we can focus on the ports that we exercise need to use. Now with your FTDI plugged in, you should see a new COM port get added to the list.

alt text

Typically, your computer will enumerate your devices. For instance, if this is the commencement serial communication device you've plugged into your computer, it should enumerate as COM2. On my reckoner this is the not the start device I've plugged in, just rather the eighth, so it has enumerated as COM9 (don't forget about COM1).

What'southward important to know is that once a device has been associated with your estimator and has had a port assigned to it, the computer will remember that device every time it's attached. And so, if y'all accept an Arduino lath that has been assigned COM4 for example, it is not necessary to open Device Manger and bank check which COM port information technology is on every time, because that device will now always be on COM4. This can exist good and bad. Most people volition never plug more than than a couple dozen serial devices into their computers. Even so, some people will plug in lots of devices, and your calculator tin can only assign and so many ports (256 if I remember correctly). Thus, it may be necessary to delete some COM ports. We will discuss that in the tips and tricks section.

If you exercise have multiple devices and are not sure which device is the i you but plugged in, unplug it, watch for whichever COM port disappears, and then plug it back in. The COM port should reappear letting y'all know that's the device you're looking for.

Ane last thing to mention is that all serial devices, even if they crave different drivers, will show upward equally COM ports in Windows. For example, an Arduino Uno and the FTDI Basic both have different drivers and are technically two different types of devices. Windows doesn't discriminate. It will care for both devices the same, and all you have to worry about is with which COM port information technology'southward associated. Mac OS and Linux treat this slightly differently. Read on to observe out.

Command Line (Mac, Linux)

Similar to Windows, Mac OS and Linux assign a specific port to every device attached to the calculator. Withal, unlike Windows, there is no specific plan y'all tin can open up to view all the devices currently fastened. Have no fear. At that place is still a simple solution to discover you device.

The default command line interface for Mac OS X is Terminal. To open it, become to your Utilities folder. In that location y'all should see the icon for Terminal. I'm going to assume that if you're using Linux, you already know how to open a command line window.

alt text

Once open up, you should meet the typical terminal screen.

alt text

To come across a list of all the bachelor Serial ports on both Mac and Linux, type this command:

            ls /dev/tty.*                      

You should now see a listing of all series ports on your reckoner.

alt text

You'll observe a few Bluetooth ports on there. I have several Bluetooth devices paired with my computer, so you may have more or less devices that bear witness up depending on what devices have been paired with your computer. (Find the SPP portion of these names. That indicates that Bluetooth device can talk to the serial terminal as well.)

The important devices to note are the tty.usbserial and the tty.usbmodem. For this example I accept both an FTDI Basic and an Arduino Uno plugged into my calculator. This is just to show yous the primal difference between the two. As mentioned earlier, some devices are treated differently depending on how they communicate with the computer. The FT232 IC on the FDTI basic is a true serial device, and, thus, information technology shows up as usbserial. The Uno on the other hand, is an HID device and shows up every bit a usbmodem device. The HID (Human Interface Device) profile is used for keyboards, mice, joysticks, etc., and, equally an HID device, the calculator treats it slightly different despite the fact that is tin still send serial data. In either case, these tty.usb______ ports are what we're after when connecting to a serial final.

Echo Test

With that out of the way, it'due south time to actually communicate with the FTDI. The specifics of each terminal program will be discussed in the post-obit sections. This example will be shown in CoolTerm, but be aware that this can be done with any terminal.

Open a final with the correct settings: 9600, eight-N-one-None.

alt text

Make sure local echo is turned off for this exam.

alt text

Take your jumper wire and connect information technology to the TX and RX lines of the FTDI Basic.

alt text

Now type!

alt text

Everything you type should be displayed in the terminal window. It's nothing fancy, but yous are now communicating with the final. Information is being sent from your keyboard, to the computer, through the USB cable to the FTDI, out the FTDI'due south TX pin, into the RX pin, back through the USB cablevision, into the computer, and is finally displayed in the terminal window. Don't believe me? Unplug the jumper and type some more. Awaiting you did turn local echo off, you should not see anything being typed. This is the repeat test.

Extra Credit

If you lot have two FTDI boards or other similar series devices, try hooking up both of them. Connect the TX line of 1 to the RX line of the other and vise versa. Then, open up two serial final windows (yep, you can have multiple concluding windows open at one time), each connected to a unlike device. Make sure they are both gear up to the same baud rate and settings. Then connect, and beginning typing. What you type in one terminal should show upwardly in the opposite terminal and vise versa. Yous've just created a very simplistic chat client!


Now allow's explore the dissimilar final programs.

Arduino Serial Monitor (Windows, Mac, Linux)

The Arduino Integrated Development Environment (IDE) is the software side of the Arduino platform. And, because using a terminal is such a big office of working with Arduinos and other microcontrollers, they decided to included a serial final with the software. Inside the Arduino environment, this is chosen the Serial Monitor.

Making a Connectedness

Series monitor comes with whatsoever and all version of the Arduino IDE. To open it, only click the Serial Monitor icon.

alt text

The icon is located to the correct of the other icons in Arduino 0023 and below.

alt text

The icon is located to the far right in Arduino 1.0 and beyond.

Selecting which port to open in the Serial Monitor is the same every bit selecting a port for uploading Arduino code. Go to Tools -> Series Port, and select the right port.

alt text

One time open up, yous should see something like this:

alt text

Settings

The Serial Monitor has limited settings, only enough to handle near of your serial communication needs. The first setting you tin can alter is the baud rate. Click on the baud rate drib-down menu to select the the correct baud rate.

alt text

You lot can also change the enter key emulation to carriage return, line feed, both, or neither.

alt text

Last, yous can the the terminal to autoscroll or not by checking the box in the lesser left corner.

Pros

  • The Serial Monitor is a great quick and easy fashion to plant a serial connectedness with your Arduino. If you lot're already working in the Arduino IDE, there's really no need to open up a carve up terminal to display data.

Cons

  • The lack of settings leaves much to exist desired in the Serial Monitor, and, for advanced serial communications, information technology may not do the trick.

Hyperterminal (Windows)

HyperTerminal is the defacto terminal program for any Windows OS upwardly to XP -- Windows Vista, 7, and 8 don't include it. If you're on Windows Vista, 7, or 8, and really just accept to take HyperTerminal, a little scouring of the Net should turn up some workarounds. Better alternatives are more easily available however- we'll become to those presently.

If yous're on a pre-Vista machine, and only take HyperTerminal to piece of work with, here are some tips and tricks for using it:

Initiating a Connection

When initially opening up HyperTerminal, it will present you lot with a "Connection Clarification" dialog. Enter whatsoever name you lot delight, and, if you lot really want to get fancy, select your favorite icon. And so hit "OK". (If this window didn't pop upwardly go to File > New Connection to open information technology.)

alt text

None of the settings in this first window have whatsoever effect on the serial communication.

On the adjacent window, ignore the first three text boxes -- we're not working with a dial-up modem here. Practise select your COM port next to the "Connect using" box. And then striking "OK".

alt text

The settings on the next box should expect pretty familiar. Make certain the "Bits per 2d" dropdown is set to the right baud charge per unit. And verify that all of the other settings are correct. Hit "OK" in one case everything looks correct in that location.

alt text

It doesn't look like much, but you now accept an open terminal! Type in the blank white area to send information, and anything that is received by the terminal will show up there also.

alt text

Adjusting Settings

There are some express adjustments we tin can make to the HyperTerminal UI. To notice them, become to File > Properties. Nether the "Settings" tab you lot'll encounter most of the options.

If you want to run into what you lot're typing in the terminal, you can turn on local echo. To flip this switch, hit the "ASCII Setup" button, then check "Echo typed characters locally".

alt text

The other settings are very specific to formatting how characters are sent or received. For near cases they should exist allow be.


Those who accept used HyperTerminal have either come to accept it for what it is, or sought out another -- any other(!) -- concluding program. It's not great for serial communication, but information technology does work. Let'south explore some of the better alternatives!

Tera Term (Windows)

Tera Term is 1 of the more popular Windows terminal programs. It's been around for years, it's open up source, and it'due south elementary to utilize. For Windows users, it'south one of the best options out there.

You can download a copy from here. In one case y'all have Tera Term installed, open it up, and let's poke around.

Making a Connection

You should initially exist presented with a "TeraTerm: New connexion" pop-upward within the program. Hither, you tin select which serial port yous'd like to open upwards. Select the "Serial" radio button. Then select your port from the drib-down menu. (If this window doesn't open up when you outset TeraTerm, you lot can become here by going to ****File > New connectedness..."**.)

alt text

That'll open up up the port. TeraTerm defaults to setting the baud rate at 9600 bps (8-North-1). If yous demand to suit the serial settings, get up to Setup > Serial Port. Yous'll come across a window pop upward with a lot of familiar looking series port settings. Adjust what y'all demand to and hit "OK".

alt text

The championship of your TeraTerm window should modify to something like "COM##:9600baud" -- good sign.

alt text

That'southward virtually all at that place is to information technology. The bare window with the blinking cursor is where data is both sent (past typing information technology in) and received.

TeraTerm Tips and Tricks

Local Echo

It can be weird to type stuff in the window and not see it show up in the final. It's undoubtedly even so flowing through the serial terminal to your device, but it can be difficult to type when you don't have any visual feedback for exactly what you're typing. You can plough on local echo by going to the Setup menu and selecting Terminal.

alt text

Cheque the Local echo box if yous'd similar to turn the characteristic on.

There are other settings to exist fabricated in this window as well. Y'all tin adjust the size of the concluding (the values are in terms of characters per row/cavalcade), or suit how new-lines are displayed (either a railroad vehicle return, line feed, or both).

Clear Buffer and Clear Screen

If you want to clear your final screen you can use either the "Clear buffer" or "Clear screen" commands. Both are located under the Edit card.

Clear screen will practise simply that, blank out the terminal screen, but any information received will yet be preserved in the buffer. Coil up in the window to have some other look at it. Clear buffer deletes the entire buffer of received information -- no more information to coil up to.

Shortcut Keys

Menus are a pain! If you desire to get really fast with TeraTerm, retrieve some of these shortcuts:

  • ALT+N: Connects to a new series port.
  • ALT+I: Disconnects from the current port.
  • ALT+V: Pastes text from clipboard to the serial port (not CTRL+V).
  • ALT+C: Copy selected text into clipboard (not CTRL+C).
  • CTRL+TAB: Switch betwixt two TeraTerm windows.

Real-Term (Windows)

TeraTerm is awesome for simple ASCII-just serial concluding stuff, just what if yous need to send a cord of binary values ranging from 0-255? For that, we like to employ RealTerm. RealTerm is designed specifically for sending binary and other difficult-to-type streams of data.

RealTerm is available to download on their SourceForge page.

Setting Up the Serial Port

When yous open upward RealTerm, you'll be presented with a blank window similar beneath. The peak half is where you lot'll type data to send, and it'll also display data received. The bottom half is split into a number of tabs where nosotros suit all of the settings.

Let's get continued! To begin, navigate to the "Port" tab. On the "Port" dropdown here, select the number of your COM port. Then, brand certain the baud rate and other settings are correct. You can select the baud rate from the dropdown, or type it in manually.

alt text

With all of those settings adjusted, you'll have to click "Open" twice to close and re-open the port (clicking "Modify" doesn't work until after you've established a connection on a COM port).

That'southward all there is to that! Type stuff in the black ether above to send data, and anything received by the terminal will pop up there too.

Sending Sequences of Values

The ability to ship long sequences of binary, hexadecimal, or decimal values is what really sets RealTerm apart from the other final programs we've discussed.

To access this role, head over to the "Send" tab. Then click into either of the two text boxes adjacent to "Send Numbers". This is where you lot enter your number sequence, each value separated by a space. The numbers tin be a decimal value from 0 to 255, or a hexadecimal value, which are prefixed with either a "0x" or a '$'. One time you have your string typed out, striking "Send Numbers" and away they get!

alt text

Why would you need this you ask? Well, allow'southward say yous had a Serial Seven Segment Display hooked up to an FTDI Bones, which is continued to your computer. This is a pretty cool setup -- you can command a 7-segment display by just typing in your concluding. Merely what if you lot wanted to dim the display? You'd need to send ii sequential bytes of value 123 and 0. How would you lot do that with the handful of keys on a keyboard? Consulting an ASCII tabular array to friction match binary values to characters, yous'd have to press DEL for 127 and CTRL+SHIFT+2 (^@) for 0...or just use the "Send" tab in RealTerm!

Adjusting the Brandish

Just as y'all can use RealTerm to send literal binary values, you can too utilise it to brandish them. On the "Display" tab, under the "Display Equally" department are a broad array of terminal brandish choices. You can have data coming in displayed every bit standard ASCII characters, or you can have them evidence up as hex values, or any number of other display types.

alt text

Incoming bytes are displayed as hexadecimal values. Tin you lot decode the secret message?!


RealTerm is preferred for more than avant-garde terminal usage. Nosotros'll use it when we need to send specific bytes, but for more basic terminal applications, TeraTerm is our go-to emulator.

YAT - Yet Some other Terminal (Windows)

YAT is a convenient and feature-rich serial terminal. Information technology features text likewise as binary communication, predefined commands, a multiple-document user interface and lots of extras.

YAT is available to download at SourceForge.

YAT

Appearance

YAT features a multiple-document user interface (MDI) that consists of a unmarried workspace with one or more terminals.

workspace

Workspace

Each terminal can be configured co-ordinate to the device it shall be communicating with. These actress features make a terminal specially easy to use:

  • Text command console
  • File command listing
  • Unlimited number of predefined commands
  • Drop-downwardly of recent commands

Each last has its ain monitor to display outgoing and incoming data. The view can be configured as desired:

  • Time stamp
  • Line number
  • End-of-line sequence
  • Line length
  • Line and bytes transmission charge per unit
  • Chronometer

Most of these features tin can exist enabled and configured, or subconscious for a cleaner and simpler user interface.

Detailed Monitor

Detailed Monitor

Monitor Status

Monitor Status

Terminal Settings

  • Text or binary communication
  • Advice port blazon:
    • Serial Port (COM)
    • TCP/IP Client, Server or AutoSocket
    • UDP/IP Socket
    • USB serial HID
  • Specifc settings depending on port type

Serial COM Port Settings

Series COM Port Settings

TCP and UDP Settings

TCP and UDP Settings

USB Serial HID Settings

USB Series HID Settings

Text Final Settings

  • Total support of any known ASCII and Unicode encoding
  • End-of-line configuration
    • Predefined and free-text sequences
    • Possibility to define dissever EOL for Tx and Rx
  • Send and receive timing options
  • Grapheme substituion
  • Comment exclusion

Text Terminal Settings

Text Terminal Settings

Binary Final Settings

  • Configuration of protocol and line representation
  • Possibility to define separate settings for Tx and Rx

Binary Terminal Settings

Binary Terminal Settings

Avant-garde Settings

  • Various display options
  • Various advanced advice options
  • Specialized advice options for serial ports (COM)

Advanced Settings

Avant-garde Settings

Extras

  • Escapes for bin/oct/dec/hex like \h(4F 4B)
  • Escapes for ASCII controls like <CR><LF> also equally C-style \r\due north
  • Special commands such every bit \!(Delay), \!(LineDelay) and \!(LineRepeat)
  • Versatile monitoring and logging of sent and received data
  • Formatting options for fantabulous readability
  • Powerful keyboard performance including shortcuts for the most important features
  • Versatile shell/PowerShell control line
  • x86 (32-fleck) and x64 (64-scrap) distribution

Predefined Commands

Predefined Commands

Log Settings

Log Settings

Monitor Format

Monitor Format

Change Management and Support

YAT is fully hosted on SourceForge. Feature Requests and Bug Reports can be entered into the according tracker. Both trackers tin exist filtered and sorted, either using the predefined searches or the list view. Support is provided by a few simple helps integrated into the application, some screenshots on the SourceForge page, and the projection's electronic mail if none of the above tin help.

Development

YAT is implemented in C#.NET using Windows.Forms. The source code is implemented in a very modular way. Utilities and I/O sub-systems tin can also be used independent on YAT, east.thou. for whatsoever other .Internet based application that needs serial communication, control line handling or simply a couple of convenient utilities. Testing is done using an NUnit based test suite. Projection documentation is washed in OpenOffice. For more details and contributions to YAT, refer to Help > About.

CoolTerm (Windows, Mac, Linux)

CoolTerm is useful no matter which operating system you're using. However, information technology is especially useful in Mac Bone where there aren't as many terminal options as there are in Windows.

Yous can download the latest version of CoolTerm here.

Making a Connection

Download and open up a CoolTerm window.

To alter the settings, click the Options icon with the lilliputian gear and wrench. You'll be presented with this menu:

alt text

Here, yous can select your port, baud rate, scrap options, and flow control.

At present click on the Final tab on the left.

alt text

Here, you tin can change the enter central emulation (carriage return/line feed), turn local echo off or on, and you lot can switch betwixt line mode and raw mode. Line mode doesn't send information until enter has been pressed. Raw mode sends characters direct to the screen.

In one case all your setting are correct, the Connect and Disconnect buttons will open and close the connection. The settings and condition of your connexion will exist displayed in the bottom left corner.

If yous need to clear the information in the terminal screen, click the Clear Information icon with the large scarlet X on it.

If y'all're getting annoyed with not being able to apply the backspace, plough on 'Handle Backspace Character' under the Final tab under Options.

alt text

Extended Features

One crawly feature of CoolTerm is Hex View. If y'all want to see the actual hex values of the data yous are sending rather than the ASCII values, Hex View is a tremendous help. Click the View Hex icon. The concluding's appearance volition change slightly. Now whatever y'all blazon will show upward as hex and ASCII. The first column is but keeping rails of line numbers. The second column is the hex values, and the last column is the actual ASCII characters yous type.

alt text

Hither I've typed hello and \. Notice the 0D and 0A that announced for carriage render and line feed.

To become back to ACSII fashion, click the View ASCII icon.

You tin also utilize the Ship Cord option to ship entire strings of text. In the connectedness bill of fare, select Send String.

alt text

You should now have a dialog box with which to ship your cord in hex or ASCII mode.

alt text

ZTerm (Mac)

Yous tin can download the latest version of ZTerm hither

ZTerm is another last option for Mac users. Compared to CoolTerm, it seems a lot less user friendly, however, once you find your manner around, it'due south just every bit useful.

Making a Connexion

When you outset open ZTerm, you exist greeted with this prompt:

alt text

Choose the right port, and click OK.

alt text

You should now take a bare concluding window.

*Note: Once you've fabricated a connection, ZTerm will open up the most contempo connection every time you run it. This tin can be annoying if you have multiple connections available. To get around this machine connect, hold downwardly the SHIFT cardinal as you kickoff ZTerm. This will featherbed the auto connect and enquire you to which port you'd like to connect.

Once you lot're connected, you tin change the terminal settings by going to Settings -> Connexion.

alt text

Hither you tin can change the baud rate (data charge per unit); parity, data, and terminate bits; flow control; and plough local echo on or off.

alt text

If y'all demand to modify your port afterward establishing a connection, go to Settings -> Modem Preferences.

alt text

Cull the right port nether the Serial Port dropdown carte du jour.

alt text

Other Features

ZTerm has lots of other uses for network advice, but that is beyond the scope of this tutorial.

I nice feature that can be used is the macros. Go to Macros -> Edit Macros.

alt text

Here you can create macros that transport any strings/commands y'all'd like. Take a command that you're typing constantly? Make a macro for it!

alt text

Command Line (Windows, Mac, Linux)

As mentioned before, you can apply control line interfaces to create series connections. The major limiting factor is the lack of connection options. Most of the programs we've discussed so far have a slew of options that you lot can tweak for your specific connection, whereas the command line method is more of a quick and dirty fashion of connecting to your device in a pinch. Here's how to accomplish this on the three major operating systems.

Terminal and Screen (Mac, Linux)

Mac

Open up Terminal. Run across the Connecting to Your Device section for directions.

Now type ls /dev/tty.* to see all bachelor ports.

You tin now use the screen control to to constitute a simple serial connection.

Type screen <port_name> <baud_rate> to create a connectedness.

alt text

The terminal will go blank with but a cursor. You are at present continued to that port!

To disconnect, type control-a followed by control-\. The screen will and then ask if you are sure you desire to disconnect.

There are other options you tin can control from screen, even so it is recommended that you just use this method if y'all are comfortable with the command line. Type man screen for a total list of options and commands.

Linux

The screen command tin too be used in Linux. At that place are simply a few variations from the Mac instructions.

If you practice not have screen installed, get it with sudo apt-get install screen.

Making a connection is the same every bit Mac.

To disconnect, type command-a then shift-thou.

That's all there is to it.

MS-DOS Prompt (Windows)

The fastest way to get to the command line in Windows is to click on the start carte, blazon cmd into the search field, and press Enter.

alt text

This will open up a blank MS-DOS command line prompt.

alt text

To be able to issue Serial commands, y'all must first enter PowerShell. Type powershell to get into PowerShell command mode.

alt text

To see a list of all the available COM ports, type

            [System.IO.Ports.SerialPort]::getportnames()                      

Yous should now see something like this..

alt text

Now create an example of the port yous desire with this control

            $port= new-Object System.IO.Ports.SerialPort COM#,Baudrate,None,8,one                      

With that, you tin at present connect to and send information to or from that COM port.

            $port.open() $port.WriteLine("some string") $port.ReadLine() $port.Shut()                      

Again, this method of serial advice is merely recommended for advanced command line users.

Tips and Tricks

Changing/Deleting COM Ports (Windows)

In that location may come up a time when you need a device to be on a specific COM port. An example of this is, in older versions of TeraTerm, you could only connect to COM ports 16 and below. Thus, if your device was on COM 17, you'd have to change information technology to connect to it. This problem has been addressed in newer versions of TeraTerm, simply in that location are many other programs out there that only allow a certain number of COM ports.

To get around this, we'll accept to dive into Device Manger.

Open Device Manger, and expand the ports tab.

alt text

Now right-click on the port you desire to alter. Select Properties.

alt text

In Properties, get to Port Settings, and select Advanced.

alt text

Here, y'all'll see a drop down carte with all the available COM ports in it. Some of them will accept (in use) next to them. These are the ports that accept been assigned to a serial device.

alt text

Notice that COM nine doesn't take an (in use) adjacent to it because that is the port we are currently working with.

If we wanted to change COM 9 to COM 3, we simply select COM three in this card, and click OK. The (in apply) next to COM 3 should get away. Whatsoever was continued to COM nine is now associated with COM 3, and whatever was associated with COM three has at present been overwritten.

If you need to articulate out some sometime COM ports, you can follow the steps in a higher place only for numerous COM ports.

Alert: Practise not select COM i when cleaning up sometime ports. This trick is only for if you really demand information technology and shouldn't be performed very often, for sanity's sake.

TTY vs CU (Mac, Linux)

In Unix and Linux environments, each serial communication port has two parts to information technology, a tty.* and a cu.*. When y'all look at your ports in say the Arduino IDE, yous'll see both for one port.

alt text

The difference between the two is that a TTY device is used to call into a device/system, and the CU device (call-up) is used to call out of a device/organisation. Thus, this allows for two-way communication at the same time (full-duplex). This is more than important to know if you lot are doing network communications through a terminal or other plan, just it is nevertheless a question that comes up frequently. Only know that, for the purposes of this tutorial, always utilise the tty selection for series advice.

Cannot Connect to That Port!

You tin can but take i connection to a detail port open at whatever given fourth dimension (just you can have multiple terminal windows connected to different ports open at the same time). Thus, if you lot have an Arduino Serial Monitor window open and endeavor to connect to that same port on a unlike concluding program, it will yell at you and say it could non plant a connection with that port or some such jazz. If you are always having trouble connecting to a port, make sure information technology'south not open somewhere else.

If y'all don't have another connectedness open and however can't connect, make certain all your settings (baud rate, etc.) are correct.

Connected, But Can't Meet Whatsoever Data

If you lot are connected to the correct port just don't encounter any information, there are two possible culprits. Get-go check your baud charge per unit. I know I audio similar a broken record, merely baud charge per unit is the most important setting to match up. Check that baud!

The other culprit could be that the TX and RX lines are reversed. Make certain you lot take TX->RX and RX->TX.

Programming Arduino and Serial Advice

The Arduino has 1 dedicated UART, which is merely the fancy name for the serial TX and RX lines. It is over these two lines that the Arduino gets programmed. Thus, when working with the Arduino (or other microcontrollers) it's all-time to avoid using these lines to communicate with other serial devices, peculiarly if you are developing your lawmaking and need to upload frequently.

What happens is, if you have another device hooked up to the UART, the data from your calculator might not become interpreted correctly by the Arduino leading to code not working the style it's supposed to or non getting uploaded at all.

The aforementioned rule applies to series terminals. If you accept a terminal open up on the same port that y'all are trying to program, information technology won't work. Arduino will throw some errors about non being able to communicate with that port. If this happens, close your connexion, and try again.

One unproblematic way around this is to use the Software Serial Library built into Arduino to create a separate UART for outside series communication. That fashion, your Arduino can communicate on i port while still leaving the default UART open up for programming.

Resources and Going Further

That was a lot of data! At the very to the lowest degree, you should walk away from this knowing what a terminal window is, how to utilise information technology, which terminal program is best suited for you and your operating organisation, and how to navigate that programme'south interface. Again, concluding programs are a very powerful tool when working with serial devices and microcontrollers. At present go collect some data!

If you'd like to know more about different types of communication, visit these tutorials:

  • Series Peripheral Interface
  • IiiC

To encounter some products that require the employ of a series terminal, bank check out these hook-upwardly guides:

  • OpenLog Hookup Guide
  • Bluetooth Mate and BlueSMiRF Hookup
  • RN-52 Sound Bluetooth Hookup

Or check out this blog related post:

Your favorite terminal didn't make the list? Tell us which concluding emulator is your favorite and why in the discussion section.

fraserwitow1943.blogspot.com

Source: https://learn.sparkfun.com/tutorials/terminal-basics/all

0 Response to "Different Upload Port Than Serial Monitor Arduino"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel