This is only a preview of the October 1990 issue of Silicon Chip. You can view 62 of the 120 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Dimming Controls For The Discolight":
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
COMPUTER BITS
By JENNIFER BONNITCHA
Now what's gone bung?!!
Just when you thought it was safe to go back to
your computer, another problem arises! This time
the *#&% printer doesn't want to co-operate. But
before going overboard about printers, let's take a
little time to examine the communication ports and
therefore the two major kinds of printer
connections - parallel and serial.
The basic communications ports
in any PC system are the parallel
and serial ports. The parallel port
is used primarily for printers and
operates as a one-way communications port. The serial port allows
bidirectional communication with
any system using devices such as
modems, mice, scanners, digitisers
and of course serial printers. Serial
devices are capable of sending and
receiving information from the PC
while the parallel device can only
receive information and so usually
does not have too much say at all in
what goes on.
Synchronous &
as~nchronous
The asynchronous serial interface is the primary means of
system-to-system communications.
In this type of transmission, cha racters are "marked" with start and
stop bits. The PC with its Asyn-
chronous Adapter uses a binary O
(zero) for the start and stop bits.
The word asynchronous means that
no clocking signal or synchronisation is present. Characters can be
sent with any arbitrary time spacing, so the intervals between the
characters may be completely
irregular.
A standard start and stop signal
frames each individual character.
The start bit is a single O bit which
precedes each character. It's job is
to tell the receiving system that the
next 8 bits make up a byte of data.
One or 2 stop bits follow the
character to signal that the
character has been sent.
At the other end, characters are
recognised by the start and stop
signals rather than by the timing of
their arrival. The asynchronous interface is character oriented and
has approximately 20% overhead
for the extra information needed to
STOP BIT
l
J
START BIT
f _____o_A_r_,,~.._s_,r_s_ _ _
ARITj B(IT
0 0
1
0 0 0 0 0
11
0
Fig.1: basic format of an asynchronous data transmission, in this
case for the letter "A". A start bit is transmitted first, then the
data, parity & stop bits.
identify each character.
In contrast, synchronous transmission refers to a communication
mode in which each character or
sequence of bits is sent down the
line in a strictly-timed rhythm.
Thus, both the sending and receiving devices must be "in tune" for
the information to be received in an
intelligible manner.
The use of a timing marker at
each end means the receiving
device can "know" where each
ASCII character begins and ends
and therefore precisely which
character has been sent. Though
advantageous at high speed,
sophisticated timing circuitry is required at both ends of the transmission. High speed synchronous
transmissions also require high
cost devices to control the data
flow.
Parity checking
During data transmission, an extra bit of information is usually added to each ASCII character for error checking purposes. This parity
bit is usually set at the transmitting
end by the program handling communications. Parity may be high,
low or no parity and is computed by
adding up the number of "1" bits in
the data field. The result of this addition is the parity checksum. Parity checking is the most basic
method or error detection and most
data communications systems use
even parity for data exchange.
Data checking takes place at the
receiving device where the communications software does a checksum on each incoming character
and compares its calculation of
parity with that sent by the
transmitting computer. If any of the
bits has been reversed (eg, by noise
OCT0BER1990
87
COMPUTER BITS -
CTD
on a telephone line, radio frequency
interference etc], then the receiving
side of the system should be able to
detect and report the error.
Parity checking is the easiest
method of error detection since it
relies on the statistical fact that
having two bits in a character
change during transmission is a
very rare occurrence. If two bits
should change then parity checking
won't detect the error.
Serial vs parallel
Serial transmission means that
data is sent over one wire with each
bit lining up in a series as they are
sent in order. Thus, to move one
byte you must send eight signals,
one after another.
A serial transmission is slower
than a parallel transmission, but
the speed of the printer is so much
slower than the transmission speed
that the serial interface mode
generally won't limit printing
speed. This type of communication
is used over the telephone system
because it provides one wire for
data in each direction. The control
program for the serial port is in the
ROM BIOS on the computer's
motherboard.
Serial ports may connect a wide
variety of devices such as modems,
plotters, printers, other computers,
barcode readers, fax cards, scales
and so on. Anything which requires
a 2-way connection to the PC uses
the "industry-standard" Reference
Standard number 232 revision c
(RS-232c] serial port. This device
enables data transfer between
otherwise incompatible devices.
However, the most common connections to the serial port are modems
and printers.
Generally, the PC BIOS and
operating system handles only two
serial communications links: COMl
and COM2. You need to ensure that
two serial ports within one system
do not conflict. Every board supplied is automatically set up as
COMl so you need to reconfigure
any additional ports (usually by setting DIP switches) for COM2 before
88
SILICON CHIP
use. But two ports are barely
enough nowadays. With the advent
of the PS/2, the use of more than
two serial ports became more of a
reality.
Most pieces of hardware in your
computer communicate with the
Central Processing Unit [CPU] via
signals called interrupts. The signal
literally interrupts the CPU and
tells it which device requires
attention.
As the following table shows, the
"industry standard" 1/0 addresses
of the four serial ports are all unique. However, the interrupts
overlap.
TABLE 1
Port
COM1
COM2
COM3
COM4
1/0 Address
3F8
2F8
3E8
2E8
hex
hex
hex
hex
Interrupt
4
3
4
3
Using two interrupts for the same
port seems like suicide, however
you could use one port from each
pair (COMl or COM3; COM2 or
COM4) while using the other port in
the pair without interrupts. The key
to success is the use of "interruptdriven" [eg, communications and
mouse software] and "noninterrupt-driven" applications. You
could use a modem program on
COMl and a serial printer assigned
to COM3 using the DOS Mode command. Even though each uses the
same interrupt, COM3 will never
try to use its driver circuit to control the shared interrupt line.
The parallel port has eight lines
for sending all the bits for one byte
of data simultaneously across eight
wires to the receiving device. This
interface is fast but with eight
wires required to send the information, the cost of cables starts to increase and so this method of communication is usually reserved for
the short distance to printers.
The only real problem with
parallel ports is the cable distance
limitation due to the lack of signal
error checking. One byte of infor-
mation is sent in one transmission
since one bit can be sent over each
of the eight wires.
Parallel ports are unidirectional.
Data travels in only one direction
from the computer to the port and
then to the parallel device. The
newer PS/2 computers have a
bidirectional parallel port however,
so data can travel to or from the
port.
Problems with serial and parallel
ports can often be detected using
diagnostics software and a wrap
plug for each type of port.
To test any serial or parallel port
cards, run your computer's advanced diagnostics communications
adapter tests. Typical error codes
displayed are shown in Table 1.
For serial ports only, check for a
voltage reading of - 10.BV to
- 12.9V DC between pins 4 and 8
[ground] and the system board
power connector. If the voltage
measurement isn't within the range
specified, the power supply may be
defective.
Many problems stem from using
the wrong serial port card in a
system. The main difference in
serial ports is in the Universal
Asynchronous Receiver Transmitter [UART] chip which is the
primary port circuit. The system
ROM BIOS is designed specifically
to support certain chips and so
some chips can only be used in certain systems.
If you use a port with the wrong
UART, problems such as port hanging, incompatibilities with software, lost characters or total function failure are not uncommon.
Printer problems
And so finally to printer problems which can manifest themselves in a myriad of ways. Starting
with the most obvious problems,
check:
• printer power on and power
cord securely connected to both the
printer and power outlet;
• printer is "on-line" or "selected";
• printer is not out of paper;
• the printer cable is securely
connected at both the computer and
printer. Check again for security,
even if you think all is OK;
• the DOS Mode statement has
from tractor feed to cut sheet feed,
etc.
Paper smudge on a dot matrix
printer usually means the paper
thickness control is set incorrectly.
If the print head is too close to the
paper, smudges occur as the
printer moves across the paper this typically happens when a new
ribbon is installed or a thicker than
usual paper is used for printing.
Change the thickness control as
required.
COMMON ERROR CODES
9xx
901
10xx
1001
11 XX
1101
12xx
1201
Parallel printer adapter errors
Parallel printer adapter test failure
Alternate parallel printer adapter errors
Alternate parallel printer adapter test failure
Asynchronous communications adapter errors
Asynchronous communications adapter test failure
Alternate asynchronous communications adapter errors
Alternate asynchronous communications adapter test failure
been set correctly for a serial
printer - much of today's software
will set the communications parameters automatically, but check
just in case.
Next, you could try a little more
problem determination:
• Perform a Power On Self Test
(for most printers, turn the power
off and then, while holding down
the Line Feed (LF) or similar button,
turn the power back on). A sample
pattern should now print. If not,
check your printer manual for further information.
• If the printer test functions correctly, try a "screen dump" of any
information [other than graphic images) from your computer. Press
Print Screen or Shift PrtSc to send
the information to the printer.
If you get no response, try
something simple [swap printer
cables, for example).
If the print screen works correctly but you still get "junk" reports,
check the software configuration.
Is the program set up correctly for
your printer type [serial or parallel)
and model [not just manufacturer)
of printer?
For laser printers, is there an
operator message to indicate the
need for toner or a new OPC drum?
For dot matrix printers (especially
those using film type ribbons), is the
ribbon exhausted?
BIT PULSES
_ _ _ _ _ _A _ _ _ _ _ __
(
1
0
0
Q
Q
Q
'
For programmable printers
[typically dot matrix and laser),
check the system settings. It is
possible that someone may have
changed the inbuilt settings and
thus altered the mode of operation
- eg, changed the printer program
BIT PULSES
_ _ _ _ _ _A...__ _ _ _ __
(1 0
0
0
0
0
'
1
TO PRINTER
Parallel Transmission
Fig.2: in parallel transmission,
the data bits are all sent to the
port simultaneously via separate
lines. The data travels in one
direction only, from the computer
to the device.
Missing characters
Characters "missing" or not fully
printed on dot matrix printers
usually indicate that the ribbon is
not correctly seated or a pin in the
print head may be broken. Check
ribbon operation before panicking
further.
Inkjet and thermal wax printers
can suffer from clogged jets and insufficient temperature of the print
head, thus causing problems with
the dye or wax mixing.
The appearance of vertical
streaks on laser printouts is a sign
that the corona wires need cleaning. Refer to your printer manual
for more details.
While most printer problems are
operator-related [sorry team, but
that's the truth, the whole truth and
nothing but the almost truth), there
are times when a call to a technician is the only answer. Use common sense and you should be able
to avoid any unnecessary expense.
And always remember to try the
simple things first. Go for the least
expensive items [like printer cables)
and work your way upwards in
cost. By their very nature, it is often
the simple, low cost items which fail
first.
Next month, we'll talk about
cables and give some tips on
avoiding cable mixups.
~
Serial Transmission
1 ----c?:__ _ _-Jl_,..lQ)=====:j)
) TO PHONE
'-'---------
LINES
Fig.3: in serial transmission, the data is sent one bit at a time over one line (ie, each bit is sent in sequence};
Serial transmission is the method used for sending data over the telephone system. Because there are two lines,
data may be sent in either direction.
OCT0BER1990
89
|