Panasonic FP-XH Series User Manual page 92

Hide thumbs Also See for FP-XH Series:
Table of Contents

Advertisement

8.1 Communication Instruction
Outline of operation
Data is sent or received with an external device connected to the COM port. F159 (MTRN)
instruction has the following three functions.
Item
Send
Receive
Operation mode
switching
System register settings
● Using the system register, it is required to set to "general-purpose communication mode" in
COM port.
● Using the system register, it is required to align the baud rate and transmission format with
an external device.
● To secure an area for storing receive data in the data register (DT), it is required to specify
"Receive buffer starting number in general-purpose communication" and "Receive buffer
capacity in general-purpose communication" using the system register.
Related flag / system register No.
Communication error
flag
Operation mode flag
Reception done flag
Transmission done
flag
Receive buffer
starting number
Receive buffer
capacity
Creation of send data table [S]
● Send data is stored as follows in a given memory area (e.g. data register DT). The number of
send data bytes [n] is automatically added to the starting word. Send data should be stored
in [S+1] and later.
8-16
Description
In the data register starting with [S], data to be sent to an external device is set as a table in
advance. By executing the [F159 MTRN] instruction, data of [n] bytes is sent from the COM
port to an external device.
Data sent to COM port is stored in the receive buffer (data register DT) specified by the
system register. Once the reception is done, the "reception done flag" turns on, and disables
further reception. When the [F159 MTRN] instruction is executed, the "reception done flag"
turns OFF, and enables reception. The F159 (MTRN) instruction is used to turn OFF the
reception done flag for general-purpose communication (i.e. to enable reception).
Operation mode of COM port can be switched between "general-purpose communication
mode" and "computer link mode".
Operation
0: Normal
1: Error
0: Other than general-purpose
communication
1: General-purpose
communication
0: Reception enabled
1: Reception disabled (reception
done)
0: Transmission in progress
1: Transmission done
(transmission enabled)
Specify the DT range to be used
as a receive buffer, using the
system register.
COM0
COM1
R9130
R9138
R9131
R9139
R9132
R913A
R9133
R913B
No.420
No.416
No.421
No.417
COM2
COM3
R9140
R9148
R9141
R9149
R9142
R914A
R9143
R914B
No.418
No.422
No.419
No.423
WUME-FPXHCOMG-02

Advertisement

Table of Contents
loading

Table of Contents