Specifications

Table Of Contents
S1C62740 TECHNICAL SOFTWARE EPSON II-25
CHAPTER 6: PERIPHERAL CIRCUITS (Output Ports)
FOUT output
The FOR00 is to select R00 for FOUT output. So when you want to
use R00 as FOUT output, set FOR00 to "1", and R00 to "0".
When R00 is selected to FOUT output, it outputs the clock of f
OSC3,
f
OSC1 or the demultiplied fOSC1. The clock frequency can be se-
lected by registers FOFQ1 and FOFQ0, from the frequencies listed
in Table 6.4.3.
Table 6.4.3
FOUT clock frequency
FOFQ1 FOFQ0 Clock frequency (Hz)
0 0 512
0 1 4,096
10 f
OSC1
11 fOSC3
A hazard may occur when the FOUT signal is turned ON or OFF.
PTOVF output
The PTR01 is to select R01 for PTOVF output. So when you want to
use R01 as PTOVF output, set PTR01 to "1", and R01 to "0".
The PTOVF signal is come from programmable timer. See Section
6.9, "Programmable Timer".
Note:
Example program
for the special use
output ports
Following program shows the special use output ports controlling
procedure.
Label Mnemonic/operand Comment
;* SPECIAL USE OUTPUT PORT
;*
;
ZR0 EQU 0D4H ;R0 OUTPUT PORT
ZBZCTL EQU 0E0H ;BUZZER CONTROL REGISTER
ZFOCTL EQU 0E1H ;FOUT CONTROL REGISTER
ZPTC1 EQU 0E9H ;PROGRAMMABLE TIMER CONTROL REGISTER 1
ZPTC2 EQU 0EAH ;PROGRAMMABLE TIMER CONTROL REGISTER 2
ZRDL EQU 0EDH ;PROGRAMMABLE TIMER RELOAD REGISTER LOW
ZRDH EQU 0EEH ;PROGRAMMABLE TIMER RELOAD REGISTER HIGH
;
;* BUZZER OUTPUT
;
BZON:
LD X,ZBZCTL ;SELECT R03 & R02 AS BUZZER OUTPUT
LD MX,1101B ;SELECT 2 KHz FREQUENCY FOR BUZZER
;OUTPUT
LD X,ZR0
LD MX,1100B ;TURN ON R03 & R02 OUTPUT PORT
;
;
;* FOUT OUTPUT
;
FOUT:
LD X,ZR0
AND MX,1110B ;TURN OFF R00 OUTPUT PORT
LD X,ZFOCTL