CY7C63001A
CY7C63101A
6.5
On-Chip Timer
mode is entered.
illustrates the format of this
register and
is its block diagram.
With a 6 MHz resonator, the timer resolution is 1
µs.
The timer generates two interrupts: the 128-µs interrupt and
the 1.024-ms interrupt.
The USB Controller is equipped with a free-running timer
driven by a clock one-sixth the resonator frequency. Bits 0
through 7 of the counter are readable from the read-only Timer
Register located at I/O address 0x23. The Timer Register is
cleared during a Power-On Reset and whenever Suspend
Figure 6-6. Timer Register (Address 0x23)
b7
T.7
R
0
b6
T.6
R
0
b5
T.5
R
0
b4
T.4
R
0
b3
T.3
R
0
b2
T.2
R
0
b1
T.1
R
0
b0
T.0
R
0
1.024-ms interrupt
128-
m
s interrupt
9
8
7
6
5
4
3
2
1
0
Resonator Clock/6
8
To Timer Register
Figure 6-7. Timer Block Diagram
6.6
General Purpose I/O Ports
Interface with peripherals is conducted via as many as 16
GPIO signals. These signals are divided into two ports: Port 0
and Port 1. Port 0 contains eight lines (P0.0–P0.7) and Port 1
contains up to eight lines (P1.0–P1.7). The number of external
I/O pins depends on the package type. Both ports can be
accessed by the IORD, IOWR, and IOWX instructions. The
b7
P0.7
R/W
1
b6
P0.6
R/W
1
b5
P0.5
R/W
1
b4
P0.4
R/W
1
Port 0 data register is located at I/O address 0x00 while the
Port 1 data register is located at I/O address 0x01. The
contents of both registers are set HIGH during a reset. Refer
to
Figures 6-8
and
for the formats of the data registers. In
addition to supporting general input/output functions, each I/O
line can trigger an interrupt to the microcontroller. Please refer
to the interrupt section for more details.
b3
P0.3
R/W
1
b2
P0.2
R/W
1
b1
P0.1
R/W
1
b0
P0.0
R/W
1
Figure 6-8. Port 0 Data Register (Address 0x00)
b7
P1.7
R/W
1
b6
P1.6
R/W
1
b5
P1.5
R/W
1
b4
P1.4
R/W
1
b3
P1.3
R/W
1
b2
P1.2
R/W
1
b1
P1.1
R/W
1
b0
P1.0
R/W
1
Figure 6-9. Port 1 Data Register (Address 0x01)
Document #: 38-08026 Rev. *A
Page 8 of 25