로그인 l 회원가입 l 마이페이지 l 장바구니
회사소개|상품리스트|고객지원|커뮤니티

Reference

Experiment to look at serial data communications

0점 영일교육시스템 2015-12-10 추천: 추천 조회수: 502

Introduction

This experiment demonstrates how a serial data communication protocol can be Education data loggersuccessfully monitored. Serial data communications represents the fundamental method by which information is transported in our modern world.

Convergence between communications and computers has caused all forms of information to be digitized for easy transport in serial format. Unlike analog waveforms such as sine waves and square waves that are periodic in nature, serial data comm waveforms are generally aperiodic. Using a modern digital instrument such as the PicoScope 2205 makes capture and viewing of serial data easy.

This experiment demonstrates:

  • What serial data looks like.
  • Monitoring this data using the PicoScope 2205 PC oscilloscope.

This experiment is suitable for:

  • First introductory data communications course for college/university.
  • Electronics experimenter such as an amateur radio operator.

Equipment required

  • PicoScope 2205 oscilloscope, scope probe.
  • PC with serial port.
  • Terminal program such as Hyperterminal for Win95/98, Terminal for Win3.1 or Telix for Linux.

Safety

Always keep in mind that the ground of the 2205 is common to the ground of the PC and thus common to AC ground.

Experiment setup

The experiment set up is shown in Figure 1. Serial data is accessed from the serial port on a standard PC. The serial port is generally either a DB9 connector or DB25 connector. Figure 2 shows a picture of a standard PC DB9 type serial port. An appropriate serial cable consisting of female/male DB9 connectors is connected to this port.

The ADC-200/20 CH A input is connected to the Transmit Data and Ground connections on the serial port via the serial cable. Note that you can use the same PC that the ADC-200/20 is connected to for the serial transmission or you can use a standalone PC. Figure 1 shows separate PCs for convenience.

Showing the connection between the serial port and the PS2205

Figure 1 Experimental Setup

A DB male connector used for serial communication

Figure 2: photo of PC Serial Port DB Male Connector

Experiment procedure

1. Terminal Software Setup

One of the simplest serial data comm protocols is sending ASCII characters via a PC terminal program. Several popular terminal programs exist, depending on the PC operating system  (Win95/98, Win3.1, Linux, DOS, etc). Let’s examine Hyperterminal that commonly comes as part of the Win95/98 operating system.

To access Hyperterminal, follow the Start Button:
Start/Programs/Accessories/Communications/HyperTerminal/Hypertrm.exe

Once you have located the Hyperterminal directory, find the Hypertrm program and double click it. The program screen is shown below in Figure 3.

The hyperterminal screen

Figure 3: Hyperterminal screen

Now you must setup the terminal parameters. Under File, locate New Connection. Give the connection the name Picotech and click ‘OK’. The Connect To box appears. Select the Connect using parameter to Direct to Com1 (assuming that serial port used is Com1. Check with your PC manual for settings for serial port). Click ‘OK’. Next the Port Settings box appears.

Accept the parameters as listed below:

  • Bits per sec = 2400
  • Data bits = 7
  • Parity = none
  • Stop bits = 1
  • Flow control = hardware

Finally under File, go to the Properties parameter and select the Settings tab. Go to ASCII Setup and check off the box Echo typed characters locally. Save all settings under Picotech.htm. The terminal program is now set up. The proper settings are shown below in Figure 4.

The hyperterminal and COM port configuration

Figure 4: Hyperterminal terminal properties set up

2. PicoScope 2205 oscilloscope Setup

Once the terminal program is configured, we are ready to send serial data. The terminal program will send data via the serial port in RS-232 format. Figure 9 shows the pinouts of the DB9 and DB25 type RS-232 connectors commonly found on serial ports.

Connect the 2205 oscilloscope probe with the center conductor connected to the Transmit Data Terminal #3 and the ground conductor to Ground Terminal #5. Note this setting is for a DB9 connector. Adjust accordingly for a DB25.

In order to capture the one-time asynchronous signal, the scope must be set for one-time trigger.

Set the instrument as follows:

  • TxData to Input A, +/- 20V, DC, Probe x 1, Input B off
  • Time base = 500 μsec/div
  • Trigger = single, Input A, rising, 1000 mV, -10% delay

Note that the scope is set to trigger with a rising voltage > 1 volt on input A.

3. Sending Serial Asynchronous Data and Capturing Results

With the Terminal PC we are now ready to send and capture ASCII data. Try sending an ASCII 'G' first. To do this, first set Caps Lock on the keyboard to on. Then simply press 'G'. Ensure that the correct character is sent out, as it will echo on the Hyperterminal display. If you are using the same PC for both Terminal and the 2205 display, you will have to size both windows so that they are visible.

Now in order to capture and display the result on the scope, hit the 'run' button. The scope will now trigger with any voltage rising on input A >1 volt. Press the 'G' again. You should see a display similar to Figure 5 below. Note the cursors have been set to measure the duration of the start bit.

Try another character, say the numeral '8'. The display for '8' is shown in Figure 6. Note to clear the display press Stop, then run again.

2205 screen shot for the ASCII character code 'G'

Figure 5: ASCII ‘G’ as displayed on PS2205

2205 screen shot for the ASCII character code '8'

Figure 6: ASCII ‘8’ as displayed on ~PS200/20

Further Questions

  1. Does the waveform shown in Figure 6 match what should be seen for ASCII '8'?
  2. How wide would a bit be if the data speed were changed to 4800 bit/sec?

첨부파일:

비밀번호: 삭제하려면 비밀번호를 입력하세요.

댓글 수정

비밀번호

/ byte