Program Example For 8-Bit Serial Input - Fujitsu F2MC-8L F202RA Hardware Manual

F2mc-8l 8-bit microcontroller
Hide thumbs Also See for F2MC-8L F202RA:
Table of Contents

Advertisement

;--------------------Interrupt processing routine----------------------------------------------------------
WARI
; -------------------------------------------------------------------------------------------------------------------

Program Example for 8-bit Serial Input

● Processing specifications
The 8-bit serial input program inputs 8-bit serial data from the SI pin of the 8-bit serial I/O. When serial
I/O transfer terminates, an interrupt occurs.
The program reads transfer data with the interrupt processing routine and inputs it continuously.
The program uses the external shift clock to be input from the SCK pin.
● Coding example
DDR3
SMR
SDR
SSEL
SIOF
SST
ILR4
INT_V
IRQC
INT_V
;--------------------Main program---------------------------------------------------------------------------
CLRB
SIOF
PUSHW
A
XCHW
A,T
PUSHW
A
MOV
SDR,#55H
SETB
SST
:
User processing
:
POPW
A
XCHW
A,T
POPW
A
RETI
ENDS
END
EQU
000DH
EQU
0039H
EQU
003AH
EQU
003BH
EQU
SMR:7
EQU
SMR:0
EQU
007EH
DSEG
ABS
ORG
0FFE2H
DW
WARI
ENDS
CSEG
:
MOV
DDR3,#00000000B ; Sets the P30/SCK and P32/SI pins to input.
CLRI
CLRB
SST
MOV
ILR4,#11111101B ; Sets the interrupt level to 1.
CHAPTER 14 8-BIT SERIAL I/O
; Clears the interrupt request flag.
; Saves A and T.
; Resets transfer data (55
; Starts serial I/O transfer.
; Returns A and T.
; Address of data direction register 3
; Address of serial mode register
; Address of serial data register
; Address of serial/UART selection register
; Defines the interrupt request flag bit.
; Defines the serial I/O transfer start bit.
; Address of interrupt request setting register 4
; [DATA SEGMENT]
; Sets an interrupt vector.
; [CODE SEGMENT]
; The stack pointer (SP), etc., is already initialized.
; Disables interrupts.
; Stops serial I/O transfer.
).
H
337

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-8l mb89202Mb89202/f202ra series

Table of Contents