Send Out One Character (Transmit); Send Out One Block Data (Transmit - The Data More Than Two Characters); Receive Data; Basic Language Example - FabiaTech FX5634 Fanless Series User Manual

Table of Contents

Advertisement

FabiaTech Corporation

Send out one character (Transmit)

Step 1:
Enable TXC signal, and the bit 1 of the address of offset+4 just sets "1".
Step 2:
Send out the data. (Write this character to the offset+0 of the current
COM port address)
Step 3:
Wait for the buffer's data empty. Check transmitter holding register
(THRE, bit 5 of the address of offset+5), and transmitter shift register
(TSRE, bit 6 of the address of offset+5) are all sets must be "0".
Step 4:
Disabled TXC signal, and the bit 1 of the address of offset+4 sets "0"
Send out one block data (Transmit – the data more than two characters)
Step 1:
Enable TXC signal, and the bit 1 of the address of offset+4 just sets "1".
Step 2:
Send out the data. (Write all data to the offset+0 of the current COM
port address)
Step 3:
Wait for the buffer's data empty. Check transmitter holding register
(THRE, bit 5 of the address of offset+5), and transmitter shift register
(TSRE, bit 6 of the address of offset+5) are all sets must be "0".
Step 4:
Disabled TXC signal, and the bit 1 of the address of offset+4 sets "0"

Receive data

The RS-485's operation of receiving data is in the same of the RS-232's.

Basic Language Example

a. Initial 86C450 UART
10
OPEN "COM2:9600,m,8,1"AS #1 LEN=1
20
REM Reset RTS
30
OUT &H2FC, (INP(%H2FC) AND &HFD)
62

Advertisement

Table of Contents
loading

Table of Contents