Pc Serial Port Chips - Brainboxes RS422 Manual

Hide thumbs Also See for RS422:
Table of Contents

Advertisement

AT & OPTO DUAL RS422/485
transmit routine has several lines to constantly poll the DR, Data
Ready, bit of the LSR, that indicates whether an incoming byte has
been received and is in the RBR.
5070 HSIN = 0: REM NO Input Handshake see line 6036
6000 REM SEND A$ TO THE SERIAL PORT IF HSIN IS TRUE
6010 A = LEN(A$): REM NUMBER OF BYTES TO SEND
6012 IF ((INP(S + 5) AND 1) = 1) THEN PRINT
6015 :
6020 FOR X = 1 TO A
6030 OP = ASC(MID$(A$, X, 1))
6035 IF ((INP(S + 5) AND 1) = 1) THEN PRINT
6036 IF ((INP(S + 6) AND HSIN) <> HSIN) THEN 6035:
6037 REM And Wait Till Other Device is Ready To
6040 OUT S, OP:
6050 IF ((INP(S + 5) AND 32) <> 32) THEN 6050:
6055
6056 :
6057
REM READ ANY INPUT DATA HERE AS WELL JUST TO
6058 IF ((INP(S + 5) AND 1) = 1) THEN PRINT
6060 NEXT
6070 :
6100 PRINT A$; : REM COPY TO SCREEN
6200 GOSUB 8000
6400 RETURN

PC Serial Port Chips.

The original IBM PC had a serial port based upon the Intel
8250
Asynchronous
occupies 7 I/O locations in the PC, all serial port communications
parameters are programmed by setting bits in the 8250 registers.
The introduction of the IBM AT saw the use of an
enhanced 8250 called the NS16450 ACE. This chip has faster
access time to allow the 4.77Mhz PC bus be upgraded to the 8
Serial Utilities and Programming
REM Test Handshake In line
REM SEND DATA TO TXD REG
REM WAIT TILL HOLD REG EMPTY
REM BEFORE SENDING NEXT BYTE
PREVENT OVERFLOW ERRORS
Communications
CHR$(INP(S));
CHR$(INP(S));
Receive
CHR$(INP(S));
Element.
The
Chapter 5 Page 67
8250

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rs485

Table of Contents