6522
   HOME

TheInfoList



OR:

The MOS Technology 6522 Versatile Interface Adapter (VIA) is an
integrated circuit An integrated circuit (IC), also known as a microchip or simply chip, is a set of electronic circuits, consisting of various electronic components (such as transistors, resistors, and capacitors) and their interconnections. These components a ...
that was designed and manufactured by
MOS Technology MOS Technology, Inc. ("MOS" being short for Metal Oxide Semiconductor), later known as CSG (Commodore Semiconductor Group) and GMT Microelectronics, was a semiconductor design and fabrication company based in Audubon, Pennsylvania. It is ...
as an
I/O port Memory-mapped I/O (MMIO) and port-mapped I/O (PMIO) are two complementary methods of performing input/output (I/O) between the central processing unit (CPU) and peripheral devices in a computer (often mediating access via chipset). An alterna ...
controller for the
6502 The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") William Mensch and the moderator both pronounce the 6502 microprocessor as ''"sixty-five-oh-two"''. is an 8-bit microprocessor that was designed by a small ...
family of microprocessors. It provides two bidirectional 8-bit parallel I/O ports, two 16-bit
timer A timer or countdown timer is a type of clock that starts from a specified time duration and stops upon reaching 00:00. It can also usually be stopped manually before the whole duration has elapsed. An example of a simple timer is an hourglass ...
s (one of which can also operate as an event counter), and an 8-bit
shift register A shift register is a type of digital circuit using a cascade of flip-flop (electronics), flip-flops where the output of one flip-flop is connected to the input of the next. They share a single clock signal, which causes the data stored in the syst ...
for
serial communication In telecommunication and data transmission, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits a ...
s or data conversion between serial and parallel forms. The direction of each bit of the two I/O ports can be individually programmed. In addition to being manufactured by MOS Technology, the 6522 was
second source In the electronics industry, a second source is a company that is licensed to manufacture and sell components originally designed by another company (the first source). It is common for engineers and purchasers to seek components that are availab ...
d by other companies including Rockwell and
Synertek Synertek, Inc. was an American semiconductor manufacturer founded in 1973. The initial staff consisted of Bob Schreiner (the CEO), Dan Floyd, Jack Balletto, and Gunnar Wetlesen and Zvi Grinfas. Schreiner, Floyd, Balletto and Wetlesen were all forme ...
. The 6522 was widely used in computers of the 1980s, particularly
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (India), in India ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ' ...
's machines, and was also a central part of the designs of the
Apple III The Apple III (styled as apple ///) is a business-oriented personal computer produced by Apple Computer and released in 1980. Running the Apple SOS operating system, it was intended as the successor to the Apple II; however, it was largely cons ...
,
Oric-1 Oric was a brand of home computers sold in the 1980s by Tangerine Computer Systems. Tangerine was based in the United Kingdom and sold their computers primarily in Europe. All computers in the Oric line were based on the MOS Technology 650 ...
and
Oric Atmos Oric was a brand of home computers sold in the 1980s by Tangerine Computer Systems. Tangerine was based in the United Kingdom and sold their computers primarily in Europe. All computers in the Oric line were based on the MOS Technology 650 ...
,
BBC Micro The BBC Microcomputer System, or BBC Micro, is a family of microcomputers developed and manufactured by Acorn Computers in the early 1980s as part of the BBC's Computer Literacy Project. Launched in December 1981, it was showcased across severa ...
, Victor 9000/Sirius 1 and
Apple Macintosh Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
. Video game platforms such as the
Vectrex The Vectrex is a vector display-based home video game console, the only one ever designed and released for the home market, that was developed by Smith Engineering and manufactured and sold by General Consumer Electronics. It was first released ...
also used the 6522, as did the 1984 through 1989 Corvette digital dash cluster. A high speed, CMOS version, the W65C22, is produced by the
Western Design Center The Western Design Center (WDC), located in Mesa, Arizona, is a company that develops intellectual property for, and licenses manufacture of, MOS Technology 65xx based microprocessors and microcontrollers. WDC was founded in 1978 by a former ...
(WDC).


Input/output ports

The VIA contains 20 I/O lines, which are organised into two 8-bit bidirectional ports (or 16 general-purpose I/O lines) and four control lines (for handshaking and
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
generation). The directions for all 16 general lines (PA0-7, PB0-7) can be programmed independently. The control lines can be programmed to generate an interrupt when activated (all four), latch the corresponding I/O port (CA1 and CB1), automatically generate handshaking signals for devices on the I/O ports, or operate as plain program-controlled outputs (CA2 and CB2). CB1 and CB2 are also used as the clock input and the data line for the shift register, precluding their use for other functions while the shift register is enabled.


Timers

The VIA provides two 16-bit timer/counters. Each can be used in one-shot (
monostable A multivibrator is an electronic circuit used to implement a variety of simple two-state devices such as relaxation oscillators, timers, latches and flip-flops. The first multivibrator circuit, the astable multivibrator oscillator, was invented b ...
) "interval timer" mode; timer 1 can also be used in "free-running" (divider/
square wave Square wave may refer to: *Square wave (waveform) A square wave is a non-sinusoidal waveform, non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same ...
) mode, in which the timer is automatically reloaded with the initial count when it reaches zero, and timer 2 can also be used in "pulse counting" mode, in which the timer will count the high-to-low state transitions of pin PB6 (the 7th bit of parallel I/O port B). In the one-shot mode, each timer continues free-running so that the time since zero was reached can be determined, but no further interrupt is issued until the timer is restarted. Each timer can generate an interrupt when it reaches zero, and timer 1 can also output pulses (in the interval timer mode) or square waves (in the free-running mode) on pin PB7 (the 8th bit of port B). Timer 2 can be used to provide the clock frequency for the shift register. A useful feature of the free-running mode is that the 16-bit counter latch can be loaded with a new count without reloading the counter, so that it will load the new count only after the current count reaches zero, seamlessly changing the output frequency. This feature of timer 1, combined with its ability to output to pin PB7, can be used to generate complex waveforms, for example
pulse-width modulation Pulse-width modulation (PWM), also known as pulse-duration modulation (PDM) or pulse-length modulation (PLM), is any method of representing a signal as a rectangular wave with a varying duty cycle (and for some methods also a varying peri ...
signals, frequency sweeps, or bi-phase or FM-encoded serial bit streams.


Shift register

The VIA's shift register is bidirectional, 8 bits wide, and can run from either a timer-generated clock (from timer 2), the CPU clock, or an external source on line CB1. The serial input/output is on line , and can also be programmed to output a bit clock for external clocked serial devices.


IRQ output

The NMOS 6522 has an
open drain Open collector, open drain, open emitter, and open source refer to integrated circuit (IC) output pin configurations that process the IC's internal function through a transistor with an exposed terminal that is internally unconnected (i.e. "open" ...
IRQ output that may be used in
wired-OR A wired logic connection is a logic gate that implements boolean algebra (logic) using only passive components such as diodes and resistors. A wired logic connection can create an AND or an OR gate. Limitations include the inability to create a ...
interrupt circuits. The WDC W65C22S, in contrast, has a
totem pole Totem poles () are monumental carvings found in western Canada and the northwestern United States. They are a type of Northwest Coast art, consisting of poles, posts or pillars, carved with symbols or figures. They are usually made from large t ...
IRQ output that must be isolated from a wired-OR circuit by a
Schottky diode The Schottky diode (named after the German physicist Walter H. Schottky), also known as Schottky barrier diode or hot-carrier diode, is a semiconductor diode formed by the junction of a semiconductor with a metal. It has a low forward voltag ...
, due to the fact that the totem pole output actively drives the IRQ pin high when the W65C22S is not interrupting. This specific issue is resolved on the WDC W65C22N which is fitted with an open-drain IRQ output.


Bugs

Due to a design defect, if the edge on falls within a few nanoseconds of the falling edge of the ϕ2 (phase–2) clock, the will be ignored, causing the loss of a bit and framing errors on subsequent data. A workaround is put the external clock signal into the input of a 74ACT74 flip-flop, run the flop's output to the 6522's pin, and clock the flip-flop with ϕ0 or ϕ2.Wilson, Garth
/ref> The serial shift register bug was corrected in the
California Micro Devices ON Semiconductor Corporation (stylized and doing business as onsemi) is an American semiconductor supplier company, based in Scottsdale, Arizona. Products include power and signal management, logic, discrete, and custom devices for automotive, c ...
CMD G65SC22 and in the MOS 6526, the latter device which Commodore used in place of the 6522 from the
Commodore 64 The Commodore 64, also known as the C64, is an 8-bit computing, 8-bit home computer introduced in January 1982 by Commodore International (first shown at the Consumer Electronics Show, January 7–10, 1982, in Las Vegas). It has been listed in ...
onwards. Aside from the aforementioned shift register bug, there was a potential register corruption problem that usually only occurred in systems using the 6522 with a microprocessor having a non-6502
bus A bus (contracted from omnibus, with variants multibus, motorbus, autobus, etc.) is a motor vehicle that carries significantly more passengers than an average car or van, but fewer than the average rail transport. It is most commonly used ...
architecture, such as a
Motorola 68000 The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Sector ...
. If the address lines changed while
chip select Chip select (CS) or slave select (SS) is the name of a control line in digital electronics used to select one (or a set) of integrated circuit An integrated circuit (IC), also known as a microchip or simply chip, is a set of electronic cir ...
was low (inactive) but the ϕ2 clock input was high (active), register contents could be changed despite the fact that the chip was not selected. This was fixed in some but not all of the CMOS versions.


References


External links


MOS 6522 VIA preliminary datasheet (1977)WDC W65C22 description
{{DEFAULTSORT:Mos Technology 6522 MOS Technology integrated circuits Input/output integrated circuits