Fujitsu F2MC-16L User Manual page 36

Hide thumbs Also See for F2MC-16L:
Table of Contents

Advertisement

CHAPTER 3 Overview of the Standard I/O Library
delay:
delay01:
;-----------------------------------------------------------------------
;
;
;
;
;
;
;
;
;-----------------------------------------------------------------------
chrout:
;-----------------------------------------------------------------------
;
;
;
;
;
;
;
;
;
;-----------------------------------------------------------------------
chrinp:
chrinp_nod:
Note:
Figure 3.3 Example of Creating a Standard I/O Driver (Continued)
24
mov
call
mov
call
mov
call
mov
call
mov
call
mov
call
retp
EVEN
mv
decw
a
bnz
ret
ALIGN 2
chrout (output 8bit data )
*PARAMETER*
R0
*RETURN*
None
*ERROR CODE*
None
.export chrout
bbc
mov
mov
retp
ALIGN 2
chrinp (input 8bit data )
*PARAMETER*
None
*RETURN*
AL
*ERROR CODE*
None
.export
bbc
mov
retp
movw
a,#h'ffff
retp
ALIGN 2
.end
The above example is for a suppert board for the F²MC-16LX. When using different
target board, create a program to match the requirements of the I/O resource being
used.
i:RS_CTRL, #0
delay
i:RS_CTRL, #RCLR
delay
i:RS_CTRL1, #RMODE1; mode (MB89731 original)
delay
i:RS_BOUD, #RBOUD; baud rate
delay
i:RS_CTRL, #RMODE; mode (8251 compatible)
delay
i:RS_CTRL, #RCOMM; commond
delay
a,#UsartAccessDelayTime
delay01
output data
*
i:RS_CTRL:TXRDY,chrout;
a,r0
i:RS_DATA,a
h'0000 - h'00FF : input data
h'FFFF
chrinp
i:RS_CTRL:RXRDY,chrinp_nod; Wait receive ready
a,i:RS_DATA
Wait transmit ready
; Write data
: no data
; Read data

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16xlF2mc-16F2mc-16hF2mc-16f

Table of Contents