TA600032-EN0/0
- 40 -
5.2.2.3.5
Port data writing
"Write-in data" can be output to a "Port data memory" by specifying the "Memory address".
The "Write-in data" can be output only to the Input ports of "Own device" and "Virtual local LSI" set to "Input"
by "RADD.PMD".
MOSI
Control
Command
(0100 ss00)
Memory
Address
Write-in
Data
(7:0)
The "ss" bit is the "Slave number" (SN) bit of a "Control command".
"Memory addresses" are from "0" to "255".
When the
"Write-in data" is 2 bytes or more, the "Write-in data" is output while incrementing the "Memory address".
When the "Memory address" is incremented from "255", it becomes "0".
The "Write-in data" can be output up to 32 bytes in 1-byte units.
For example, when outputting "Write-in data" from "Port number 0" (P0) to "Port number 3" (P3) in "Device number 0" (DN0),
output the following data:
MOSI
0100 0000
0000 0000
DN0.P0
DN0.P1
DN0.P2
DN0.P3
This is the data when the "ss" bit is "00".
For details on "Port data memory", see "5.2.6 Port data memory".
"Port data memory" is written at the following timing.
1. Immediately after the rising edge of the "SS" signal when "MSTS.SBSY = 0" (not connected to "Motionnet
®
").
2. Immediately after receiving a "Request frame" addressed to other than "Own device" (excluding "Break communication")
when "MSTS.SBSY = 1" (connected to "Motionnet
®
").
3. Immediately after receiving a "Request frame" of "Broadcast communication" addressed to "Own device" when
"MSTS.SBSY = 1".
4. Immediately after sending a "Response frame" from "Own device" when "MSTS.SBSY = 1".
However, immediately after sending the "Response frame" from the last "Device number" of the "Virtual local LSI" when
the "Own device" has "Virtual local LSI".
5. Immediately after the "Motionnet
®
" communication timeout occurs when "MSTS.SBSY = 1".
When the "Write-in data" exceeds 32 bytes, a "Port data write error" (MSTS.IWER) interrupt occurs and all "Write-in data" are
ignored.
For details on "Port data write error", see "6.8.2.2 Port data write error".
"Request frame" processing has priority over "Control command" processing.
"MSTS.WRED = 1" is set when processing of the "Port data writing" control command is interrupted.
"MSTS.WRED = 1" is set when processing of the "Port data writing" control command is interrupted.
When the processing of the "Request frame" is completed, the processing of the "Port data writing" control command is resumed.
When the processing of the "Port data writing" control command is completed, "MSTS.WRED = 0" is set.
The "Local CPU" must wait for the next "Control command" output until "MSTS.WRED = 0" is set.
For details, see "6.8.2.3 Port data write processing error".