Output Data to Port
OUT
7-133
Assembly Language Instructions
Cycles
Cycles for a Single OUT Instruction
Program
Operand
ROM
DARAM
SARAM
External
Source: DARAM
3+io
dst
3+io
dst
3+io
dst
5+io
dst
+2p
code
Source: SARAM
3+io
dst
3+io
dst
3+io
dst
4+io
dst
†
5+io
dst
+2p
code
Source: External
3+d
src
+io
dst
3+d
src
+io
dst
3+d
src
+io
dst
6+d
src
+io
dst
+2p
code
† If the operand and the code are in the same SARAM block
Cycles for a Repeat (RPT) Execution of an OUT Instruction
Program
Operand
ROM
DARAM
SARAM
External
Destination: DARAM
3n+nio
dst
3n+nio
dst
3n+nio
dst
3n+3+nio
dst
+2p
code
Destination: SARAM
3n+nio
dst
3n+nio
dst
3n+nio
dst
3n+1+nio
dst
†
3n+3+nio
dst
+2p
code
Destination: External
5n–2+nd
src
+
nio
dst
5n–2+nd
src
+nio
dst
5n–2+nd
src
+nio
dst
5n+1+nd
src
+nio
dst
+
2p
code
† If the operand and the code are in the same SARAM block
Example 1
OUT
DAT0,100h
;(DP = 4) Write data word stored in
;data memory location 200h to
;peripheral at I/O port address
;100h.
Example 2
OUT
*,100h
;Write data word referenced by
;current auxiliary register to
;peripheral at I/O port address
;100h.