54
Software
Installation
|
Step
3:
Waiting
for
data
empty
Step
4:
Disabled
TXC
Note
11:
Please
refer
to
the
section
of
the
“Serial
Ports”
in
the
Chapter
6
“Technical
Reference”
for
the
detail
description
of
the
COM
ports
register.
5
6
1
Initialize
COM
port
Step
1:
Initialize
COM
port
in
the
receiver
interrupt
mode,
and
/or
transmitter
interrupt
mode.
(All
of
the
communication
protocol
buses
of
the
RS
‐
485
are
in
the
same.)
Step
2:
Disabled
TXC
(transmitter
control),
the
bit
0
of
the
address
of
4
just
sets
“0”.
Note
12:
Control
the
JetBox
system
“DTR”
signal
to
the
RS
‐
485
TXC
communication.
5
6
1
Send
out
one
character
(Transmit)
Step
1:
Enabled
TXC
signal,
and
the
bit
0
of
the
address
of
4
just
sets
“1”.
Step
2:
Send
out
the
data.
(Write
this
character
to
the
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
5),
and
transmitter
shift
register
(TSRE,
bit
6
of
the
address
of
5)
are
all
sets
must
be
“0”.