Setup Example - Panasonic F77G User Manual

Microcomputer mn101c series
Table of Contents

Advertisement

Chapter 4 I/O Ports
4-11-4

Setup Example

A setup example of the port 6 synchronous output by the external interrupt 2 (IRQ2) is shown as follows. As
it is operated, the initial output data of port 6 is "55", the synchronous output data is "AA", and the rising
edge of the IRQ2 is selected at the synchronous event.
An example setup procedure, with description of each step is shown below.
Setup Procedure
(1) Select the synchronous output
event.
FLOAT (x'3F2E')
bp1-0
(2) Specify the interrupt edge.
IRQ2ICR(x'3FE4')
bp5
EDGDT(x'3F8F')
bp2
(3) Set the initial output data.
P6OUT(x'3F16')
bp7-0
(4) Set the synchronous output pin.
P6SYO(x'3F1E')
bp7-0
P6DIR(x'3F36')
bp7-0
(5) Set the synchronous output data.
P6OUT(x'3F16')
bp7-0
(6) Event is generated.
Rising edge is generated at P22.
IV - 52
Synchronous Output (Port 7)
:SYOEVS1-0 = 00
: REDG2 = 1
: EDGSEL2 = 0
: P6OUT7-0 = x'55'
: P6SYO7-0 = x'FF'
: P6DIR7-0 = x'FF'
: P6OUT7-0 = x'AA'
Description
(1) Set the SYOEVS1-0 flag of the FLOAT register
to "00" to set the synchronous output event to
the IRQ2.
(2) Set the REDG2 flag of the IRQ2ICR register to
"1" to set the active edge of the IRQ2 at the
rising edge. Set the EDGSEL2 flag of the
EDGDT register "0" to select the
programmable active edge interrupt.
(3)
Set the initial output data "55" to the P6OUT
register. Port 6 outputs "55".
(4)
Set port 6 to synchronous output pin by setting
the P6SYO7-0 flag of the P6SYO register to
"FF". Select the output mode by setting the
P6DIR7-0 flag of the P6DIR register to "FF".
(5)
Set the synchronous output data "AA" to the
P6OUT register.
(6)
Port 6 outputs "AA" at the rising edge of
IRQ2.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Panaxseries mn101c77cPanaxseries mn101f77g

Table of Contents