Tips for interaction between super terminals and embedded development boards in Windows XP
Embedded Development Exchange Group 280352802, welcome to join!
I. Introduction
A Super Terminal is a universal serial interaction software provided by the Windows operating system. You can use this tool to configure vro and vswitches. Connect to another computer, Telnet site, announcement board system (BBS), online service, and host by using a modem, a zero-modulation cable, or an Ethernet connection. We can use it to debug the circuit. The embedded development board basically has a serial port, and can interact with the serial port of the embedded system through the Super Terminal, so that the Super Terminal becomes the "display" of the embedded system ".
- Use: Start → program → attachment → communication → Super Terminal (you can create or use an existing connection to configure the device );
- Start command: Hypertrm.exe.
Ii. Principles of super Terminals
The principle of the Super Terminal is not complex. It sends user input to the serial port at any time (when the TCP protocol is used, it is sent to the network port. Here, it only describes the serial port), but does not display the input. It displays characters received from the serial port. Therefore, the corresponding program of the embedded system should complete the task:
- Send the startup information and process information to the host running the Super Terminal;
- Return the received characters to the host (that is, ECHO) and remotely manage the server.
Iii. Common Super Terminal Operations
Super Terminal applications are relatively simple, similar to general serial port software.
1. Send 0x0c (12): clear screen;
2. Send 0x08 (8): remove the cursor (note that this does not delete the character );
3. Send 0x09 (9); move the cursor to the right of a tab (equivalent to the tab key );
4. Send 0x0d (13); move the cursor to the beginning of the line;
5. Send 0x0a (10) or 0x0b (11); move the cursor to the next row in the same column;
6. Send 0x0d, 0x0a, and line feed functions (the question of carriage return and line feed will be explained later ).
Iv. FAQs and Solutions
1. When the Super Terminal is maximized, the actual screen remains unchanged.
Cause: The screen size of the "Super Terminal" terminal is determined by the font size used. It is automatically displayed as 24 lines, with 80 or 132 characters each. The font is the selected font.
Solution: On the "View" menu of the Super Terminal, select "font ". If you want a large terminal screen, select a large font. If you want a small terminal screen, select a small font.
2. The entered information is not displayed on the Super Terminal.
Cause: The information displayed on the terminal screen is sent from a remote computer, rather than the information already entered on the local computer. To view the entered information, the remote computer must provide feedback on the input information. This may cause time lag between the input information and the display information on the terminal screen.
Solution: Make sure that you are connected to the remote computer correctly, and the remote computer can feedback the user input information (that is, the remote computer or embedded development board sends the received information to the local computer ).
3. ANSI characters cannot be correctly displayed.
Cause: No terminal font is used.
Solution: On the "View" menu of the Super Terminal, select "font ". Click Terminal and select OK ".
4. After connecting to a remote computer, the terminal screen displays meaningless information.
Cause: The correct terminal simulation type is not selected.
Solution: On the "file" menu of the Super Terminal, select "properties ". Select the "Settings" tab. In the "simulation" drop-down box, select the terminal type of the remote computer. If the remote computer type is not listed in the drop-down list, this type is not supported by the Super Terminal.
5. The characters cannot be deleted from the terminal.
Cause: The connected remote computer controls the characters displayed on the terminal screen. The remote computer expects the cursor to locate a specific position on the screen based on the data that has been sent to the screen. If you change the screen locally, the interaction between you and the remote computer may be interrupted in a way that is unpredictable or controlled by the host. Therefore, the Super Terminal cannot delete characters from the screen.
Solution: No. In fact, you can send the \ B (unspace) Escape Character and space to the remote computer.
6. Press Ctrl + V to paste the data on the terminal screen.
Cause: If you set the terminal key in the connection property, press Ctrl + V to send an escape sequence to the simulator. Many hosts use Ctrl + V to navigate their systems.
Solution: You can change this setting to "Windows key", and then Ctrl + V will work normally. To change the value, click "properties" in the "file" menu of the Super Terminal ". Click the "Settings" tab, and then click the "Windows key" radio button. When you use the "Windows key" Settings, all function keys, arrow keys, and control keys are executed locally. The recommended option is: Use the terminal key to set, and then use the menu to paste
V. Differences between carriage returns and line breaks
First, we will introduce the origins and differences between carriage return and line feed. Before the computer appeared, there was a kind of device called teletype model 33, which can contain 10 characters per second. But there is a problem, that is, when a line breaks a line, it takes 0.2 seconds, just two characters. If a new character is passed in the 0.2 s, the character will be lost. As a result, the developers thought of a way to solve this problem, that is, adding two end characters after each line. One is "enter", which tells the typewriter to position the print head on the left boundary, and the other is "line feed", which tells the typewriter to move the paper down one line. This is the source of "line feed" and "Carriage Return". They can also be seen in their English names. Later, computers were invented, and these two concepts were invented on computers. At that time, memory was very expensive. Some scientists thought it would be too waste to add two characters at the end of each line. Just add one character. As a result, there were differences:
- In Unix systems, each line ends with only "<line feed>", that is, "\ n ";
- In Windows, each line ends with "<press enter> <line feed>", that is, "\ r \ n ";
- In MAC systems, each line ends with "<press enter>", that is, "\ r ".
One direct consequence is that if a file in UNIX/MAC is opened in windows, all the text will become a line. If a file in Windows is opened in UNIX/MAC, A ^ m symbol may be added at the end of each line. Some common escape characters include: