Startup screen                                            Displaying NMEA output

 

If you ever experiment with microcontrollers, you know you need a way to get status information from your microcontroller and you don't want to use a lot of precious pins to do that.

 

Serial devices are by far the easiest way to do this since most microcontrollers (at least AVRs) have a serial device built-in. Simple code is minimal and you only need to sacrifice 1 pin to be able to send output.

 

The problem with a plain serial port is that you need a terminal device, usually a computer, but the computer isn't always conveniently located near the work bench. LCD displays are very nice but require quite a few pins and added code. Some people buy or build a serializer board for their LCD display, including its own microcontroller to provide an effective display device.

 

A device that frequently is located on your workbench, but mostly doing nothing, is an oscilloscope. What if you could use that oscilloscope as a display device for your microcontroller projects?

 

Enter the Dutchtronix AVR Oscilloscope Terminal:

bullet

13 lines, 20 characters per line

bullet

Displays full ASCII character set including upper and lower case

bullet

Automatic superfast scrolling

bullet

Flashing cursor

bullet

Delayed CR/LF control

bullet

Current time is displayed and updated at the bottom of the screen

bullet

Multiple Baud Rate support.

bullet

Incorporated in the Sparkfun Oscilloscope Clock

This terminal is an application built in the Sparkfun Oscilloscope Clock. You can use a standard serial cable  to connect the Sparkfun Clock to a computer running a terminal program. This way, you can try out the Dutchtronix Terminal for example by using your terminal program to send a large text file to the Dutchtronix terminal. You'll notice the incredible scrolling speed, without losing data (up to about 38,400 bps.)

 

Connecting the Dutchtronix Terminal to a device that sends out text over its serial port is much more useful, but it can also be frustrating to get going because of 2 issues:

 

bullet

Serial Communication can electrically be done in at least 2 ways:
bullet

using TTL levels (5V for a 1, 0V for a 0)

bullet

using the RS-232 convention (-12V for a 1, +12V for a 0)

bullet

The serial connectors on the Sparkfun Clock expect RS-232 levels. However direct access to the AVR Serial Port, which operates at TTL levels, is available on the USB converter cable header pins. Select the electrical connection appropriate for the device sending the information over the serial line

bullet

Serial communications is based on a TX line and an RX line. You need to make sure that the TX line of the sending device is connected to the RX line on the Sparkfun Clock (pin 3 of the DB9 connector). The serial cable used to communicate with a standard PC will probably not work! Making a custom serial cable is by far the easiest solution; that way you can switch cables to talk to a PC or to a microcontroller circuit. An alternative is to connect a "NULL MODEM" cable to your existing cable to switch the RX and TX lines. Make sure you pay attention to the DB-9 connectors used on your cabling: there are male ones and female ones.

 

Once you have conquered these 2 issues, you're in business. Good luck and enjoy!

 

Operating Instructions:

 

Select the on-screen menu in the Sparkfun Oscilloscope Clock (S1 short push), advance to the "App" field using S2 short pushes, then cycle to the "Term" application using short pushes on S1 and select this option (S2 short push).

The Dutchtronix Terminal starts up at the current baud rate of the Sparkfun Clock (19,200 baud by default). You can change the baud rate in the on-screen menu (S1 short push). The Dutchtronix Terminal will display every incoming character within the full 7-bit ASCII range. The following non-displayable characters are interpreted: BS (08), HT (09), LF (10), CR (13). Other non-displayable characters like ETX (decimal 3) are displayed using the ^ character, in this case "^C". Look here for an overview of the ASCII character set.

 

The Dutchtronix Terminal will display a blinking cursor at the current position about 1 second after receiving the last incoming character. This delay prevents a lot of useless setup when a burst of character is being received.

 

The Dutchtronix Terminal uses a delayed Linefeed mechanism to process control characters. The reason for this is that you don't want to advance to the next empty line (and possibly scroll the display) until an actual character is ready for that next line. A Linefeed (LF) character advanced to a new line but only when a character for that new line is received. Normally, the blinking cursor indicates the location where the next incoming character will be displayed. However, if a LF is pending, the cursor will be on the last character of the current line (or when the line is full since this implies a LF).

The CR character followed by a printable char is interpreted as a Carriage Return, meaning the cursor goes back to the beginning of the line (without blanking the line), so that you can potentially update the same line with status information by repeatedly sending a status line, followed by a CR. A CR character followed by an LF character is treated as just an LF character. Where two or more CR characters in a row are received, all but the first one are interpreted as LF characters. To advance to the next line, please use an LF character, or 2 CR characters.

When using a terminal program like HyperTerminal or Bray's Terminal to send lines of text to the Dutchtronix Terminal, please select the option to include a LF with the CR character; both programs provide this option.

 

To change the time, select the clock application from the on-screen menu and use the regular procedure to change the time.

 

About Display Quality

 

Using a microcontroller to drive an Oscilloscope as a display device is somewhat of a compromise. The oscilloscope beam needs to move all the time to provide an even picture. When the AVR gets very busy, for example when it is receiving a massive amount of text, you will notice a bright spot at the lower right corner of the time display. Even though the Serial Port is completely interrupt drive, the AVR needs to process the buffered characters in between screen refreshes and cannot move the beam while doing that. When the screen is empty, the clock display line becomes quite bright, because the AVR does nothing but display the clock line. In other words, the refresh rate is going up. The intensity control provided on the Sparkfun  Oscilloscope Clock board is quite effective at suppressing the bright dot.

 

Back to Sparkfun Oscilloscope Clock