Panasonic F77G Cell Phone User Manual


 
Chapter 4 I/O Ports
IV - 46
Real Time Output Control (Port 1)
4-10-2 Operation
Real Time Output Pin Setup
The real time output pin is set by the port 1 output control register(P1TCNT). The selectable pins are
P10, P12 and P14. Those can be specified by each pin. Select the output mode by the port 1 direction
control register (P1DIR).
There are 3 output levels ; "0", "1" and "High impedance(Hi-z)". Those are switched at the falling edge of
the external interrupt 0 pin (P20/IRQ0). At high impedance, port becomes input mode.
The real time control changes the timer output signal (PWM output, timer pulse output, remote control
carrier output) in synchronization with the external event, but it is also valid on normal port output.
When the I/O port (disable the real time control) is selected by the port 1 output control register
(P1TCNT), the output level is not changed even if the switching event is generated. When it is used as
general port, set this mode.
Real Time Output Control Operation
After the port 1 output control register (P1TCNT) is set, the function selected by the port 1 output mode
register (P1OMD) is output from the pin until the falling edge at the external interrupt 0 pin (P20/IRQ0) is
generated.
Once the falling edge of the external interrupt 0 is generated, the pin's output is switched to the set level.
The event of the falling edge is stored to the edge event save function shown at the figure 4-3-4. Block
diagram (P10, P12, P14), and the set level of the port 1 output control register (P1TCNT) is output until
the event data is cleared.
Release Real Time Output (Clear the edge event save function)
Writing data to the port 1 output register (P1OUT) after event is generated, makes the event data of the
edge event save function cleared. And all pins' output data become the former data before event is
generated. If the event is generated again, all pins' output level of the port 1 output control register
(P1TCNT).
Set the pin's output to "I/O port (disable the real time control)" by setting the port 1 output control register
(P1TCNT) to stop the real time control.
Write to the port 1 output register (P1OUT) to clear the event data of the edge event save
function, before the real time output control function is used.
The active edge of IRQ0 is only falling edge, regardless of its setting at the external interrupt
0 control register (IRQ0ICR).