6532 Commodore
6532 Commodore
, commodore MPS
~ aernlconduct:or group 6532
[K!J~@~
MEMORY,
I/O, TIMER
ARRAY
2-107
MPS
6532
BLOCK DIAGRAM
DO
01 DATA
DIRECTION
02 DATA CONTROL
03 BUS REGISTER
04 A
BUFFER
D!5
06 OUTPUT
07 REGISTER A
CSI
CS2 CHIP
02 SELECT
PA7
R/W
PERIPHERAL PA6
RES
PA!5
DATA
PA4
BUFFER
PA3
A
Rs PA2
PAl
PAO
IRQ
PB7
PB6
PERIPHERAL
PB5
DATA
PB4
BUFFER
PB3
B
PB2
AO
ADDRESS PBI
AI
DECODERS PBO
A2
A3
A4
A!5
A6 OUTPUT
REGISTER B
DATA
DIRECTION
CONTROL
REGISTER
B
2-108
MPS
6532
MAXIMUM RATINGS
RATING SYMBOL VOLTAGE UNIT
Supply Voltage vee -.3 to +7.0 V
InputlOutput Voltage VIN -.3 to + 7.0 V
Operatlng'Temperature Range TOp Oto 70 ·C
Storage Temperature Range TSTG -55 to + 150 ·C
All Inputs contain protection Circuitry to prevent damage due to high static charges. Care should be
exercised to prevent unnecessary application of voltage outside the specified range.
I
ELECTRICAL CHARACTERISTICS (VCC - 5.OV ± 5%, VSS = OV, TA = o.70 C)0
vee ,. MIN, ILOAD ~ • 100,.A(PM-PA7, P8().PB7, [)()'D7) VOH VSS+2.4 3.5 VCC V
----
Output Low Voltage
f-'
O-utput Low Current (SInking); VOL.s. ,4v (PM-PA7) (P8().PB7) IOL 1.8 3,0 -- mA
f---. -
Clock Input Capacitance Cclk - 18 30 pI
---
r--'
Input lCapacltance CIN - 7 10 pI
.•.• _--
f----
_.
Output Capacitance CollT - 7 10 pI
2-109
MPS
8532
WRITE TIMING CHARACTERISTICS
DATA BUS
,.... - - - - - - - - - - - Vce- 30 %
I~+-~---------- 2.4V
PERIPHERAL
CLOCK INPUT
--------
ADDRESS
PERIPHERAL
DATA
____________ ~~Tle _ _- - -
2-110
MPS
6532
WRITE TIMING CHARACTERISTICS
I
Address valid before positive transition
of clock TACW 1130 - 90 - 60 - nS
Data Bus valid before negative transition
of clock TDCW aoo - 150 - 100 - nS
Data Bus Hold Time THW 10 - 10 - 10 - nS
Peripheral data valid after negative
transition of clock TCPW - 1 - .500 - .333 fS
Peripheral data valid after negative
transition of clock driving CMOS
(Level=VCC-30%) TCMOS - 2 - 1 - .666 }JS
2-111
MPS
6532
INTERNAL ORGANIZATION
A block diagram of the Internal architecture Is shown In Figure 1. The 6532 Is divided Into four basic sec-
tions, RAM, 1/0, TIMER, and Interrupt Control. The RAM Interfaces directly with the microprocessor through
the system data bus and address lines. The 110 section consists of two 8-blt halves. Each half contains a
Data Direction Register (DDR) and an I/O Register.
Data Is read directly from the PA pins during any read operation. For any output pin, the data transferred Into the
processor will be the same as that contained In the Output Register if the voltage on the pin Is allowed to go to 2.4v
for a logic one. Note that for Input lines, the processor can write Into the corresponding bit of the Output Register.
This will not affect the polarity on the pin until the corr'9sponding bit of DORA is set to a logiC one to allow the
peripheral pin to act as an output.
In addition to acting as a peripheralI/O line, the PA7line can be used as an edge-detecting input. In this mode,
an active transition will set the internal interrupt flag (bit 6 of the Interrupt Flag register). Setting the interrupt flag
will cause fRO output to go low If the PA71nterrupt has been enabled. The PA7line should be set up as an input for
this mode.
Control of the PA7 edge detecting mode is accomplished by writing to one of four addresses. In this operation,
AO controls the polarity of the active transition and A1 acts to enable or disable interrupting of the processor. The
data which is placed on the Data Bus during this operation is discarded and has no effect on the control of PA7.
Setting of the PA7 interrupt flag will occur on an active transition even if the pin is being used as a normal input
or as a peripheral control output. The flag will also be set by an active transition If interrupting from PA7 is dis-
abled. The reset signal (RES) will disable the PA7 interrupt and will set the active transition to negative (high to
low). During the system initialization routine, it is possible to set the interrupt flag by a negative transition. It may
also be set by changing the polarity of the active Interrupt. It is therefore recommended that the interrupt flag be
cleared before enabling Interrupting from PA7.
Clearing of the PA7 Interrupt Flag occurs when the microprocessor reads the Interrupt Flag Register.
The operation of the Peripheral B Input/Output port is exactly the same as the normal I/O operation of the
Peripheral A port. The eight lines can each be programmed to act as either an input or as an output by placing a 0
or a 1 into the Data Direction register (DDRB). In the output mode, the voltage on a peripheral pin is controlled by
the Output Register (ORB).
The primary difference between the PA and the PB ports is in the operation of the output buffers which drive
these pins. The buffers are push-pull devices which are capable or sourcing 3 ma at 1.5v. This allows these pins to
directly drive transistor switches. To assure that the microprocessor will read proper data on a "Read PB" opera-
tion, sufficient logiC Is provided in the chip to allow the microprocessor to read the Output Register Instead of
reading the peripheral pin as on the PA port.
2-112
MPS
6532
INTERFACE SIGNAL DESCRIPTION
R...t(RES)
During system Initialization a logic "0" on the RES Input will cause a zeroing of all four 110 registers. This
In turn will cause all 1/0 buses to act as Inputs thus protecting external components from possible damage
and erroneous data while the system Is being configured under software control. The Data Bus Buffers are
put Into an OFF-5TATE during Reset. Interrupt capability Is disabled with the RES signal. The RES signal
must be held low for at least one clock period when reset Is required.
Input Clock
The Input clock is a system Phase Two clock which can be either a low level clock (Vil < 0.4, Vil > 2.4) or high
level clock (Vil < 0.2, VIH =
Vcc ~ :~)
ReadIWrlt. (RIW)
The RIW signal Is supplied by the microprocessor array and Is used to control the transfer of data to and
from the microprocessor array and the 6532. A high on the RIW pin allows the processor to read (with proper
addressing) the data supplied by the 6532. A low on the ANI pin allows a write (with proper addressing) to
the 6532.
2-113
MPS
6532
Interval nnw
The Timer section of the 6532 contains three basic parts: preliminary divide down register, programmable 8-blt
register and Interrupt logic.
• I' I. r r I
I ~ . Ir
07 De os EM 03 02 01 DO
The Interval time can be programmed to count up to 255 time intervals. Each time interval can be either 1T, 8T,
64T or 1024T Increments, where T is the system clock period. When a full count is reached, an interrupt flag is set
to a logic "1". After the Interrupt flag Is set the internal clock begins counting down to a maximum of - 255T. Thus,
after the Interrupt flag Is set, a Read of the timer wi" tell how long since the flag was set up to a maximum of 255T.
The 8 bit system Data Bus is used to transfer data to and from the Interval Timer. If a count of 52 time intervals
were to be counted, the pattern 0 0 1 1 0 1 0 0 would be put on the Data Bus and written into the Interval Time
register.
At the same time that data Is being written to the Interval Timer, the counting intervals of 1, 8, 64, 1024T are
decoded from address lines AO and A 1. During a Read or Write operation address line A3 controls the interrupt
capability; I.e., A, = 1 enables IRO, A, = 0 disables IRO. When the timer is read prior to the interrupt flag being set,
the number of time Intervals remaining will be read, i.e., 51,50,49, etc.
When the timer has counted thru 00000000 on the next count time an interrupt will occur and the counter will
read 1 1 1 1 1 1 1 1. After Interrupt, the timer register decrements at a divide by "1" rate of the system clock. If after
Interrupt, the timer Is read and a value of 1 1 1 0 0 1 0 0 is read, the time since interrupt Is 27T. The value read is In
two's complement, but remember that interrupt occurred on count number. Therefore, we must subtract 1.
Complement = 0 0 0 1 1 0 1 1
2-114
MPS
6532
Thus, to arrive at the total elapsed time, merely do a two's complement add to the original time written Into the
timer. Again, assume time written as 00 1 1 0 1 00 ( = 52). With a divide by 8, total time to Interrupt Is (52 x 8) + 1 =
417T. Total elapsed time would be 416T + 28T =
444T, assuming the value read after Interrupt was 11 1 001 0 O.
After the Interrupt, whenever the timer Is written or read the Interrupt Is reset. However, the reading of the timer
at the same time the Interrupt occurs will not reset the Interrupt flag. When the Interrupt flags are read (DB7 for the
timer, DB6 for edge detect) data bus lines DO-D5 go to O.
12 IN
I
~",T ~~_______________________________________________________________
When reading the timer after an interrupt, A3 should be low so as to disable the IRQ pin. This is done so as to
avoid future Interrupts until after another Write operation.
7 6
I, 5 4 I I2
3 o I
j
·0·
PA7 FLAG
TIMER FLAG
The PA7 flag Is cleared when the Interrupt Flag Register is read. The timer flag is cleared when the timer register
is either written or read.
2-115
MPS
6532
ADDRESSING
Addesslng of the 6532 Is accomplished by the 7 addressing pins, the AS pin and the two chip select pins CS1
and CS'2. To address the R~ CS1 must be high with CS2 and AS low. To address the 110 and Interval timer CS1
and AS must be high with ~~ low. As can be seen to access the chip CS1 Is high and ~ is low. To distinguish
between RAM or 110 Timer the AS pin Is used. When this pin Is low the RAM Is addressed, when high the 110 Inter-
val timer section Is addressed. To distinguish between timer and 110 address line A2 is utilized. When A2 is high the
Interval timer Is accessed. When A2 Is low the 110 section Is addressed. Table 1 Illustrates the chip addressing.
Control of the PA7 edge detecting logic Is accomplished by performing a write operation for one of four ad-
dresses. The data lines for this operation are "don't care" and the addresses to be used are found in Figure 4.
The setting of the Internal Interrupt flag by an active transition on PA71s always enabled, no matter whether PA7
Is set up as an Input or an output.
The RES signal disables the PA71nterrupt and sets the active transition to the negative edge-detect state. During
the reset operation, the Interrupt flag may be set by a negative transition. It may, therefore, be necessary to clear
the flag before its normal use as an edge detecting Input is enabled. This can be achieved by reading the Interrupt
Flag Register, as defined by Figure 4 immediately after reset.
When the timer Is selected A 1 and AO decode the "divide-by" matrix. This decoding is defined in Table 1. In addi-
tion, Address A3 Is used to enable the Interrupt flag to fRO.
WrIte RAM 0 0
Read RAM 0 1
Write DORA 0 0 0
Read DORA 1 0 0
WrlteDDRB 0 0 1
Read DDRB 1 0 1 1
Wrlte Output Reg A 0 0 0 o
Read Output Reg A 1 0 0 o
Wrlte Output Reg B 0 0 o
Read Output Reg B 1 0 o
Write TImer
+IT 0 (s) 0 o
+BT 0 (s) 0 1
+64T 0 (s) o
+1024T 0 (s)
Read TImer (s)
Read Interrupt Flag(s) 1
Wrlte Edge Detect Control (b) (e)
NOTES:- = Don't care, '"1'" =High ItMtI (;o2.4V),'"0'" = Low I_I (.. 0.4V)
(.) A3 = 0 to disable Interrupt from timer to IRQ
A3 = 1 to enable interrupt from timer to iRQ
(b) Al =0 to disable Interrupt from PA7 to iR<:i
Al = 1 to en.ble Interrupt from PA7 to iR<:i
=
(e) AO 0 for negative edge-detect
AO = 1 for positive edge-detect
COMMODORE SEMICONDUCTOR GROUP reserves the right to make changes to any products herein to
improve reliability, function or design. COMMODORE SEMICONDUCTOR GROUP does not assume any
liability arising out of the application or use of any product or circuit described herein; neither does it convey
any license under its patent rights nor the rights of others.
2-116