Arduino and Windows HyperTerminal

Arduino is a very easy-to-use microcontroller platform.

The only way that the Arduino Duemilanove board talk to the PC is though the USB connection. When the driver is installed on the PC side, the board can be accessed at a serial port, for example COM4, as shown in Device Manager:

image

One can design any protocol to communicate with Arduino over the serial port. It is generally preferred to use text based messages (ASCII characters), because all the messages can easily be checked. This also allows interactive communication with the board by using a terminal on PC, for example, HyperTerminal coming with Windows (All Programs | Accessories | Communications | HyperTerminal).

Each command that is sent to Arduino is a text string with an ending CR(Carriage Return, 0x0d), so is any reply from the board. Actually PString can be used to format the reply (or an active notification from board) easily. Messenger can be used to parse a command.

Once the code for Arduino is uploaded, now HyperTerminal can be configured to talk to it. That saves a lot of time in writing code to test the board about the protocol and communications. There is an article at Arduino Playground about HyperTerminal set up. For my own records (and in English), below was what I did in HyperTerminal:

File | New Connection:

image

Choose the right COM port:

image

Set the port settings: (Bits per second must match that of the Arduino code, I can get 28800 at maximum by using custom PC side code.)

image

File | Properties, then choose Settings tab, the default settings do not need changes:

image

Click ASCII Setup…, and change to:

image

This makes what one types to show back, and the received text does not overwrite existing characters on screen.

File | Save to save the settings to a .ht file, and next time it can be simply load to connect to the Arduino board.

P.S.: avr-libc FAQ answers a lot of questions, including extent of C++ support.

About these ads

One Trackback to “Arduino and Windows HyperTerminal”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 35 other followers

%d bloggers like this: