home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
diagnostic
/
rs232stat_1
/
!Rs232stat
/
!Help
< prev
next >
Wrap
Text File
|
1994-04-12
|
6KB
|
151 lines
!RS232Stat Version 1.00 - Released April 14, 1994
=======================
A program to monitor the serial port status.
It proved invaluable to me when I was first getting a modem going on
my Arc - maybe it will to you.
The display is derived from various OS_SerialOp and OS_Byte calls
and is updated ONLY on null events when the window is open. Any changes
you make to the various parameters will update the window on the next
null event. The display is never changed DIRECTLY as a result of a
mouse click. Hence when you see a change in status after you have clicked
on something, you can be sure it's the device driver which has acted upon
it.
The 'option' icons can be used to change the current settings. Click with
select to toggle the current setting.
The 'radio' buttons are read-only; they reflect the state of various signals
received by the computer from the modem.
Line Parameters
===============
The RX speed and the TX speed can, in theory, be set independantly to
different values. In practise however the hardware is only capable of
one pair of unequal TX and RX speeds - transmit at 75 baud and receive
at 1200 baud. The newer machines cannot even do that.
If you change the RX speed, both the RX and TX speeds are configured
using OS_SerialOp 5/6. If you change the TX speed, TX only is configured
using OS_SerialOp 6. Normally a change to either will result in the
driver changing both.
The Data Format display is derived from OS_SerialOp 1. The menu to configure
it is at present based on the much more restricted OS_Byte 156. In the future
I want to expand this to include all possible options allowed by OS_SerialOp 1.
Buffers
=======
The Input buffer count is the number of bytes received which have not yet
been read by a program.
The Output buffer count is the number of bytes for which there is room for
a program to write.
The Threshold value indicates the minimum number of bytes in the input buffer
before the driver takes action to stop the flow towards the computer (see
Hardware and Software Flow Control). This value can be changed by clicking
in the icon. Enter the new value and press Return. While the caret is in
this icon, the field will not be updated on null events.
Control
=======
DTR is the signal the computer uses to tell the modem that it is powered on
and ready for use. Some modems don't work if DTR is off; none that I know
of will auto-answer in this state. I always ensure DTR is off when I'm not
using the modem. This has the side-effect of giving the modem a good reset
when DTR is dropped (see modem command AT&D3).
DCD is the signal the modem uses to indicate to the computer that there is
a carrier, i.e. the data connection is established. The Arc can be told
to ignore DCD (the normal situation) or to respect it and disable the
serial port unless DCD is on. Modems can usually be configured to use
DCD normally (AT&C1) or to force DCD on (AT&C0).
DSR is the signal the modem uses to tell the computer that it is powered on
and ready for use, i.e. the reverse of DTR. The Arc can be told to ignore
DSR or to respect it and disable the serial port unless DSR is on. If DSR
is to be used and it is off, serial port output is still enabled but input
characters are ignored. Modems can often be configured to do different
things with DSR.
The RI (Ring Indicator) icon will pulse on and off when the modem recognizes
that the phone is ringing. Otherwise it will be Off.
Software Flow Control aka Xon/Xoff
==================================
This is mostly used for end-to-end flow control, so the Arc can tell the
host to stop or resume transmission and vice versa. Terminal connections
usually work this way, but it may cause problems during file transfers.
The host program will probably reconfigure its port to disable Xon/Xoff
during file transfers, but most Arc programs do not!
TX Unblocked means that the Arc thinks it is free to send, i.e. it has
not received an Xoff (DC3) since the last Xon (DC1).
RX Unblocked means that the Arc has told the other end to stop sending
by transmitting an Xoff.
Hardware Flow Control
=====================
This is normally used for the local connection between computer and modem.
It is necessary because of the interspeeder which modern modems use, so that
the speed with which the computer talks to the modem is not necessarily the
same speed at which the modem transmits and receives over the telephone line.
RTS is the signal with which the computer indicates to the modem whether it
has room in its buffer to receive more characters. Normally it is under the
control of the flow control business, but if you are only using software
flow control you may need to force RTS on to get the modem to cooperate.
CTS is the opposite; the modem uses CTS to tell the computer it can send.
The Arc can respect or ignore this signal.
Suggested settings to get going
===============================
If you can't seem to persuade your Arc to talk to your modem or vice versa,
try:
Speed: as appropriate
Data Format: 8N1
'DTR State' On
'Use DCD' Off
'Use DSR' Off
'Use CTS' Off
Once that works, the following should prove serviceable for most purposes:
'Use DCD' Off
'Use DSR' On
H/W Flow Control Enabled
'Force RTS On' Off
'Use CTS' On
Software Flow Control Enabled (disable during file transfers and when
using SLIP!)
Futures
=======
* add better configuration facilities for the Data Format.
* add facility to save and restore settings, and to reset them to
defaults
Contacting me
=============
If you have any comments to make about this program or this text, I can be
contacted via e-mail: colin@integrity.nl.
Alternatively:
Colin Smale
Spechtenkamp 87
3607 KE MAARSSEN
Netherlands
Tel: +31-3465-69038
Fax: same number, phone first!
Legaleze
========
I hereby place this program in the public domain. Do what you want
with it, except sell it. Source code on request with a reasonable
reason for wanting it. Written in C (V3!) using risc_oslib. No guarantees
whatsoever.