This book was produced in EPUB format by the Internet Archive.

The book pages were scanned and converted to EPUB format automatically. This process relies on optical character recognition, and is somewhat susceptible to errors. The book may not offer the correct reading sequence, and there may be weird characters, non-words, and incorrect guesses at structure. Some page numbers and headers or footers may remain from the scanned page. The process which identifies images might have found stray marks on the page which are not actually images from the book. The hidden page numbering which may be available to your ereader corresponds to the numbered pages in the print edition, but is not an exact match; page numbers will increment at the same rate as the corresponding print edition, but we may have started numbering before the print book's visible page numbers. The Internet Archive is working to improve the scanning process and resulting books, but in the meantime, we hope that this book will be useful to you.

The Internet Archive was founded in 1996 to build an Internet library and to promote universal access to all knowledge. The Archive's purposes include offering permanent access for researchers, historians, scholars, people with disabilities, and the general public to historical collections that exist in digital format. The Internet Archive includes texts, audio, moving images, and software as well as archived web pages, and provides specialized services for information access for the blind and other persons with disabilities.

Created with hocr-to-epub (v.1.0.0)

The text on this page is estimated to be only 29.55% accurate

$m$ z. Commodore 64 Troubleshooting & Repair Guide Robert C Brenner

The Commodore 64 Troubleshooting & Repair Guide

Robert Brenner is a retired Naval officer with distinguished service in submarines and in engineering duty officer billets. He has a graduate degree in electrical engineering from the Naval Postgraduate School in Monterey, California. He also has a graduate degree in management from the University of Southern California. Mr. Brenner is a specialist in microelectronic applications and is an avid computer enthusiast. He is married to the former Carol Ann Berry of East Detroit, Michigan. The Brenners have four children and reside in San Diego, California.

The Commodore 64 Troubleshooting & Repair Guide by Robert C. Brenner Howard W. Sams & Co., Inc. A Subsidiary of Macmillan, Inc. 4300 West 62nd Street, Indianapolis, Indiana 46268 U.S.A.

© 1985 by Robert C. Brenner FIRST EDITION THIRD PRINTING — 1985 All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. International Standard Book Number: 0-672-22363-5 Library of Congress Catalog Card Number: 84-51406 Edited by: Microtrend, Inc. Printed in the United States of America.

Acknowledgments Closeup photos by Jerome Mosley, Professional Photographer, San Diego, California. To my son, Dan, for his technical support in verifying the accuracy of the document. To Diane Berry Long, and Laura Ann Brenner for providing technical illustrations. To Larry Taylor of San Diego, California for providing hardware and documentation support. To Leslie Smith and his staff at Microtrend for providing professional guidance, hardware, and editorial support.

Trademarks Commodore 64, VIC-20, VIC 1541, VIC Datasette are trademarks of Commodore Business Machines, Inc. CP/M is a registered trademark of Digital Research, Inc.. Warranty Warning Warning: Opening or otherwise modifying the Commodore 64 computer may void any manufacturer's warranty on the product.

Dedication This book is dedicated to my wonderful family, who have encouraged, supported, and otherwise enabled me to maintain writing progress through the many hours that I was totally focused on my other loves-writing and computers.

Contents INTRODUCTION 13 Why a Commodore 64 Repair Guide? 13 How to Use This Guide 14 CHAPTER 1 —THE COMMODORE 64 DESCRIBED 17 Overview ^ Structure 18 Display Modes 19 Component Recognition — What's in a Commodore 64? 20 CHAPTER 2 — COMMODORE 64 OPERATIONS 25 The Basic Parts of Your Commodore 64 25 How Each Part Works 25 Chip Location Scheme 26 Central Processing Unit 26 Memory Design 27 Clock Timing 32 The Power Supply 33 Input/Output 33 Video Display 34 Cassette Input/Output 36 The VIC-1 541 Disk Drive 36 Keyboard Operation 37 Sound 39 The Game Input and Output 41 How the System Works 45 Software Structure 46 In Summary 47

CHAPTER 3 — BASIC TROUBLESHOOTING 4g Introduction to Troubleshooting 49 Steps to Successful Troubleshooting 49 Looking at the Components 50 Component Failures 53 How Disk Drives Fail .- 54 How Displays Fail . 54 Other Failures , . . r . . . 55 Finding Failures 56 If You Must Use a Service Center 62 Safety Precautions During Troubleshooting & Repair 63 Repair Parts 64 CHAPTER 4 — SPECIFIC TROUBLESHOOTING & REPAIR FOR TH E COMMODORE 64 65 Troubleshooting Index 66 Start-up Problems 66 Run Problems 75 Display Problems 80 Keyboard Problems 91 Other Input/Output (I/O) Problems 93 Summary 106 CHAPTER 5 — ROUTINE PREVENTIVE MAINTENANCE 1Q7 Contributors to System Failure 108 Noise Interference 110 Where Does Interference Come From? 111 Noise Interference Countermeasures 112 Power-Line Problems 116 Preventing Power-Line Problems 117 Corrosion 119 Corrosion Prevention 120 Magnetism 121 PMs for Floppy Disks 121 PMsfor Disk Drives 123 Display Screens and Eye Problems 130 Using Heat to Spot Troubles 1 32 Insurance 133 Summary 133

CHAPTER 6 — ADVANCED TROUBLESHOOTING 135 Tools of the Trade 135 Components and How They Fail 1 42 Using Tools to Find Failed Components 144 Other Troubleshooting Techniques 146 Testing Capacitors 147 Testing Diodes 1 48 Testing Transistors ...... 148 Removing Solder 149 Soldering Tips 150 Recommended Troubleshooting and Repair Equipment .... 153 Summary 153 APPENDIX 155 GLOSSARY 167 BIBLIOGRAPHY 169 INDEX 173

Introduction WHY A COMMODORE 64 REPAIR GUIDE? This book is written and dedicated to all the others who have experienced long, anxious hours waiting for a computer or peripheral device to be fixed and then almost had a coronary when the repair bill was presented. I am, like yourself, one of the 100 million computer users in this country. When I purchased my first real computer, a Commodore 64, I was so elated I hardly slept a wink the first night. It wasn't long before my machine was dancing and twirling (figuratively, of course) as it produced tons of code and useful hardcopy reports, articles, and various analysis documents. And then, one day, the dreaded event happened — the Commodore 64 broke down. I could scarcely contain my frustration. The key, the doggone "A" key had stopped working! My machine was out of warranty. With tenderness, I lifted it and carried it down to my "friendly" computer store. "My Commodore is sick." "Too bad. What seems to be the problem?" "Key won't work." "Oh? Well we can take care of that for you." "Great! When can I get it back all better?" "How about a week from Wednesday . . . late afternoon?" My heart sank. A week from Wednesday? Eight days just to fix a sick "A" key? Reluctantly, I handed over my cherished Commodore to the technical service person. Sadly, I turned and left. The next eight days were rough— for me and my family. From the third day on, one of us called the store's computer service center every day to determine the status of the repair and to try to get the work expedited. On the appointed day my whole family escorted me to the store. I was like a kid at Christmas. There on the counter was my machine, all neat, clean looking, and fixed. I was back in computer heaven. My Commodore 64 was coming home. And then I got the bill. "Wait a minute! This bill says fifty-four dollars and twenty-three cents!" "Yes, it does." "To fix one key?" "Well, the key actually cost less than five dollars. The rest is labor." "But, but ..." I was stuttering and stammering as my wife paid the bill, and they escorted me and my Commodore 64 out to the car. 13

14 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Although I was indeed happy to have my computer back, I never forgot that day and that bill. I knew there had to be a less expensive way. Most computers don't often have major failures. Most problems come from the breakdown of simple chips, (those little black plastic centipede-looking things) or other easy-to-spot components. And with a little training, just about anyone could make most repairs. A plan began to develop. Why not repair my own equipment and then pay myself for the labor costs? I began to read, study, research, and test various troubleshooting techniques. I spent the next year preparing myself. And then it happened again. Right in the middle of typing out a college report using my word processor program, the machine suddenly stopped. It quit printing and refused to access the disk where the report was stored. The report was due the next morning. Here was my first real opportunity to test my knowledge of repairing our Commodore 64. To my delight, I was able to troubleshoot and repair our computer in less than an hour. And most of that time was spent running down to the electronic parts store to buy a chip. The total cost for the repair — 82 cents plus tax. Probable savings — forty-five dollars. I was convinced. We were all delighted. My research was paying off. It wasn't long before our friends who also owned Commodore 64s heard about my success and began calling on me to help fix their machines too. Another idea began to develop. Rather than spend my life running from one friend's repair to another friend's repair (you'll never know how many friends you have until you can fix a computer), I decided to write a book and let people save on their own repairs. This is the result. In the two years it took to complete this manual, each step, each troubleshooting idea was tested and verified. HOW TO USE THIS GUIDE This manual is structured to make it quick and easy for either the novice or the experienced technician to locate and correct most computer failures. The first chapter introduces troubleshooting and repair. In easy-to-understand terms, you will proceed step by step through the diagnostic techniques (called troubleshooting) for microcomputer hardware. Chapter 1 covers methods taught the best service technicians and includes numerous useful hints used by practicing electronic repair persons. Chapter 2 describes just what constitutes a Commodore 64 system. The chapter begins with a definition and specification overview, followed by a discussion of system structure. Chapter 3 the operation of the Commodore 64 is explored from both an internal and an external perspective. This chapter describes what happens inside the machine when power is applied and explains what events you should observe as the system powers up. Each of the major subsystems of a Commodore 64 is discussed, and numerous drawings are included to help you understand. Chapter 4 describes specific hardware malfunctions (failures) that can happen to the Commodore 64. The main focus of the book, Commodore 64-specific failure diagnosis and repair, begins in this chapter. The chapter starts with a trouble symptom index table that guides you quickly to the page that treats a specific problem. Malfunctions are organized by computer subsystem. Each type of failure is analyzed to the chip level with ample drawings, including a picture layout of the board on which the failure is most probably located. Chips are highlighted for easy identification. A good repair manual should not just help locate and correct computer failures; it should also provide guidance in preventing further failures. Chapter 5 provides valuable periodic preventive maintenance (PM) suggestions to help maintain a healthy system. This chapter covers such subjects as maintenance of disks and disk drives, electrical and magnetic interference, and recommended cleaning techniques. This chapter also includes a PM schedule which you can use to keep the system in peak operating condition and extend its "on-line" life. By the time you've mastered Chapters 1 through 5, you should be able to troubleshoot and repair 95 percent of all Commodore 64 computer failures. Chapter 6 was written for those who wish to go after the remaining 5 percent of malfunctions. In this chapter you'll become familiar with the tools of the repair technician's trade — logic probes, logic pulsers, current tracers, oscilloscopes, logic analyzers, and signature analyzers. The chapter even provides guidance in developing some of your own diagnostic tools, both hardware and software. The Appendix provides a wealth of back-up information. It includes step by step disassembly and reassembly instructions, conversion tables, specifica

INTRODUCTION 15 tion data sheets, and discrete component marking conventions. A reference section, a glossary, and a lengthy index complete the manual. This book is a detailed troubleshooting and repair document. It is not a treatise on basic computer theory or a discussion of chip operation, registers, busses, and logic gates. It is an all "meat and potatoes" manual to enable the computer user to repair his or her own machine in those 95 percent of circumstances where knowledge and a good reference are enough to find and repair a failure. The book's cover is constructed to make it easy for you to lay it out on your workbench or desk. Using this manual, you should be able to isolate and correct most Commodore 64 failures. This book has brought me much success in my own troubleshooting, and I trust it will do the same for you. 4

CHAPTER 1 The Commodore 64 Described /^ny manual dealing with Commodore troubleshooting and repair must begin with an overview of the machine itself. Chapter 7 focuses on the Commodore 64 computer. This chapter is primarily for the novice; most new expressions are explained in easy-to-understand terms. Examples reinforce key points. Experienced users will find this chapter a helpful review, and the "Commodore Ops" section will probably be new material for many users. OVERVIEW One of the first companies to market a fully assembled computer, Commodore Business Machines has had a fast-paced, tough, and competitive history since it introduced the Commodore Pet in 1977. These were the days when electronic kits and microcomputers were the toys and tools of technicians and hobbyists who were comfortable handling electronic components and building computer projects. Although ,the Commodore Pet was plagued with faulty operation and a keyboard that badly needed improvement, it wasn't long before schools and homes all over the country were using this new machine. Improvement came in 1981 with the VIC-20, an inexpensive, limitedmemory computer. Over a million VIC-20s were sold and still sell today for less than $100. In the fall of 1982, Commodore Business Machines introduced the Commodore 64. It was still inexpensive, yet a more powerful computer than the Pet or VIC-20, with additional features like music, sound, memory, and graphics capabilities— challenging personal computers sporting price tags many times higher. Sales of the Commodore 64 zoomed during a price war that hit the personal computer industry hard, and today, thousands of people are getting their first computer experience on a Commodore 64. At first glance, the "64" can be mistaken for a VIC-20. In fact, the case is the same size and shape. As shown in Fig. 1-1, the Commodore 64, with its twotone chocolate colored case and compact construction, can be easily transported to any work location you desire. Your machine was designed for flexibility, so Commodore provides many different kinds of optional add-on devices — display screens, mass storage units and printers— that easily plug in or attach to it. For example, Commodore offers mass storage devices like the Datassette recorder or the VIC-1541 disk drive, and the Series 1520 printers. 17

18 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Fig. 1-1. The Commodore 64 computer. STRUCTURE The Commodore 64 is really a single-board computer in a molded case, or chassis. It weighs just over 4 pounds, and uses less power to operate than a 100-watt light bulb. A hair dryer uses 1200 watts! Your Commodore 64 has a typewriter-style keyboard mounted in the case, with a space bar and 65 keys that can generate 157 different uppercase and lowercase characters or graphic symbols on your screen. While the keyboard is much like that on a standard typewriter, it has several special keys to control user-designed functions. In addition, your computer comes complete with two character sets— one for uppercase and graphic characters, the other for uppercase and lowercase characters. A double-key action lets you shift between the two modes. This provides superb flexibility in character/symbol display. Nine external connections can be found on the side and back of your Commodore 64. • Two control ports • Power cord socket • Cartridge expansion slot • TV connector • Monitor audio-video connector • Serial bus connector • Cassette interface • User I/O connection The right side of your machine should appear as shown in Fig. 1-2. Fig. 1-2. The three connections at the right side of your Commodore 64 computer. From left to right, you'll see two game ports labelled "CONTROL FORT 1" and "CONTROL PORT 2." These 9-pin sockets enable you to connect joysticks or game controller paddles to your machine. Control port 1 is also used if you wish to connect a light pen to your "64." The connection on the far right is the power cord socket. Between the control port 2 socket and the power cord socket is the power-ON/OFF switch. Turn your computer around and look at the back of the case. As shown in Fig. 1-3, six of the nine external connections are found here. The left slot is called the cartridge expansion slot. It was designed to accept custom programs or games permanently installed in a plastic cartridge. Plugging the cartridge into this 44-pin slot and then turning on your machine will cause the program or game to be available immediately. These plastic cartridges are simply small, extended printed-circuit boards with a program Fig. 1-3. The six external connections at the rear of your computer.

THE COMMODORE 64 DESCRIBED 19 stored in memory (firmware) and housed in sturdy plastic. This slot is also designed for expanding your Commodore 64 system. The next socket is the TV connector. This RCA jack is your computer's audio and video output port when you are using a standard television for display. Just to the right of this socket is another type of connector for video output. This 5-pin DIN jack is the monitor audiovideo connector, used for connecting a monitor to your computer; a monitor gives you a higher quality display than a television. To the right of the monitor audio-video connector is another round DIN jack socket— the 6-pin serial input/output (I/O) connection. It's often called the serial bus connector. This jack lets you connect a VIC-1541 disk drive or a VIC-1525 graphics printer to your computer. In fact, up to five devices can be connected to this serial bus at one time. Next comes the 6-dual-pin cassette interface. This connection is actually an extension of the printedcircuit board inside, on which finger pins have been mounted top and bottom. The connector for the Datassette recorder is plugged into these pins enabling you to store programs on this Commodore product. At the far right is a 24-pin user I/O connection which can be used for a printer or a modem. The VICMODEM or Commodore RS-232 communication cartridges are directly plug-compatible with this connection. However, if you wish to use another company's modem or printer, be aware that the signals on this interface are not compatible with standard off-the-shelf printers or modems. This port provides voltages at 0 and + 5 volts (TTL) rather than the -1 2 and + 1 2 volts used in RS-232 C interfaces, so the Commodore RS-232 interface cartridge handles the voltage and signal conversion. For video display you will probably use a computer monitor connected to what engineers call a DIN jack (the monitor audio-video connection) on the rear of the Commodore 64. If you want to use your television as a display device, Commodore includes a radio frequency (RF) modulator in your computer. It converts the video signal produced by the computer to a signal the television can use. The monitor or the television can be either a color or a black-and-white unit. Green or amber monochrome monitors are also available. The Commodore 1701 color monitor gives you light blue characters on a dark blue background. DISPLAY MODES Your Commodore 64 produces seven types of video display: three character display modes, two bitmap graphics modes, and two special character "Sprite" modes. The character modes offer you color options for the characters or the background. Character Display Modes Standard character mode is the default mode set when you turn on your "64." Two character sets are available in permanent memory. Or you can select specific, characters and develop your own custom character set. The characters are arranged to display 25 lines of 40 characters across.Any of these 1 6 colors can be used for each character displayed: Black Green Light Red White Blue Gray 1 (dark) Red Yellow Gray 2 (medium) Cyan Orange Light Green Purple Brown Light Blue Gray 3 (light) . Multicolor character mode creates characters in a matrix 4 columns of dots across and 8 rows of dots down, in which each dot can be either the color of the background, or the color set by one of two color registers. The dots can also be the color stored in memory for that character. Extended background color mode gives you control over both the character color and the background color for that character. You're limited to 64 characters from either the computer's permanent character memory or your own programmed character memory. Bit-Mapped Graphics Modes Bit-mapped hi-res offers a screen with 64,000 dots or pixels (picture elements) — 320 pixels wide and 200 pixels high— for higher resolution. You can program each dot to make it bright or dark. In bit-mapped hires, any two of the 16 possible colors are assigned to arrays of 8 dots by 8 dots. These colors are preselected during programming. Multicolor bit-mapped hi-res lets you display any 4 of the 16 possible colors in each 8x8 dot array but it reduces the resolution to 160 pixels wide and 200 pixels high. Special Character (Sprite) Modes The final type of display is Commodore's own Sprite graphics— user-defined graphic characters which are displayed anywhere on the screen. The Sprite is a special

20 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE high -resolution graphic shape, designed within a 24 x 21 dot array, which can be easily moved around the screen as a unit. Sprites are ideally suited for animation graphics. Each Sprite has a unique shape and color. As many as eight Sprites can appear on a single horizontal line. You can program Sprites to pass in front of or behind other Sprites. Their colors can be changed to any of the 16 colors associated with text characters. You can expand their sizes horizontally, vertically, or in both directions. Many animation programmers use Sprites that change color upon detecting a Sprite-to-Sprite or Sprite-tobackground collision. This is a unique and very handy capability for game writing. Two Sprite modes are available: standard Sprite mode— the type described above, and the multicolor Sprite mode, which is similar to the multicolor modes for characters and bit-map video. In this mode, up to four different colors can be in each Sprite (one a transparent color, the same as the screen color), but the horizontal resolution is reduced from 24 dots to 12 pairs of dots. COMPONENT RECOGNITION — WHAT'S IN A COMMODORE 64? Let's take a look inside your computer. First, make sure the power is off and that you have disconnected the power plug cord from the side of your machine. Disconnect all other cables, cords or cartridges so your Commodore has nothing connected to it. Using a soft antistatic pad material (not foam rubber or velvet, which can cause static electricity problems), gently turn your machine over and set it down on the pad. As shown in Fig. 1-4, there are three Phillips-head screws located just under the keyboard section. Remove these screws. Holding the two sections together, turn the computer right-side up. Gently lift the top up and away from the rest of the case as shown in Fig. 1-5. You'll immediately notice that there are two sets of wires connecting the two sections. The smaller set of wires (two-conductor) is for the power-ON light. The other wire harness connects the keyboard to the main large, green printed-circuit board. Disconnect the two cables and lift the keyboard up and away from the rest of the machine. Set the bottom portion down with the printed-circuit board facing up at you. That strong housing, or case, with the built-in keyboard is made of high-str,ength molded plastic. It is not likely to break under normal use. Inside the case is a large green board with all sorts of tiny components soldered or plugged into it (Fig. 1-6). This is the main part of the Commodore 64. It's called a printed-circuit board, main board, or motherboard. Mounted on this board are tiny, black integrated circuits, or chips, that make up the most important parts of the machine. You'll also notice the connectors we discussed earlier. Two large, rectangular, silver "cans" and a rectangular, silver cover stick out above the other cornFig. 1-5. The keyboard top folds up to open and expose the inside of your computer. Fig. 1-4. The bottom view of the "64," showing the disassembly screws. Fig. 1-6. Looking down inside your Commodore 64 computer at the motherboard.

THE COMMODORE 64 DESCRIBED 21 ponents. The silver can at the top covers the RF modulator circuitry, which converts the "64's" signal into one any television can read. The silver lid is actually a shield to keep the video signals from being transmitted into free air and interfering with your Commodore or other electronic appliances in the area. The larger silver can, just below the RF modulator can, covers five chips associated with the primary Commodore video. This can is also a shield and functions in the same manner as the RF modulator shield. The silver cover to the right of the RF modulator can is a shield for your cartridge expansion slot. It prevents stray electrical signals from being placed on the pins of this slot. Besides these silver cans and silver cover, there are a lot of strangely shaped components mounted on this board. You can see sockets with chips, connectors for attaching cables or special interfaces, tiny wire traces on the fiber-glass surface of the motherboard, and myriad chips, resistors, capacitors, transistors, diodes, and other assorted devices, all of which play an important role in making your Commodore 64 function. Fig. 1-7 shows the various types of devices on the motherboard. Representative values or labels in the figure refer to actual components on your Commodore's motherboard. See if you can pick out these devices. So? W VOLTAGE REGULATOR (VR1) VARIABLE INDUCTOR ELECTROLYTIC RESISTOR (L5) CAPACITOR (MS) (C19) CHIP (U8) CRYSTAL (Y1) DIODE (CR4) TANTALUM CAPACITOR (C48) RESISTOR TRANSISTOR NETWORK (Q2) RESISTOR (R43) DIODE (C41) Fig. 1-7. Some of the various devices mounted on the motherboard. Those black, centipede-like chips replace hundreds of transistors and allow the computer to work logically. Your Commodore 64 works in binary digits (bits) — all conditions are either ON (logic 1) or OFF (logic 0), and all operations occur in sequence. There are seven different sizes of chips mounted in sockets or soldered into the board: 14-pin, 16-pin, 18-pin, 20-pin, 24-pin, 28-pin, and 40-pin devices. Of these, Commodore uses four 40-pin, three 24-pin, and two 28-pin custom chips in its "64" design. The heart of your machine is the 40-pin chip just to the left of the RF modulator can. This is the 651 OA microprocessor. You'll see it called the CPU, for central processing unit or MPU, for microprocessor unit. This is the device that controls your computer. At the top left of your board, just to the right of the keyboard cable connector, are two 40-pin complex interface adapter devices called CIA #1 and CIA #2, respectively. These chips are used to handle input from the keyboard and game controls, and both, input and output on the serial and user ports. Below the 6510A MPU are two 40-pin devices. The left one is an 82S100, a programmed logic array (PLA) device custom-designed to produce signals that activate certain parts of the circuitry, including the memory devices. The vertically mounted chip next to the PLA is the 6581 sound interface device (SID). This marvelous chip is a music synthesizer and soundeffects generator. It provides extended range control over pitch, tone, and volume, making it an excellent companion in arcade and other games. Using this chip, you can generate music and sounds with your Commodore 64 that are usually associated with expensive keyboard synthesizers. Sound with your Commodore is produced on the motherboard as an audio signal and then sent to your monitor or television speaker where the sound is heard. The other custom device that aids in making this such a powerful machine is the 6566/6567 video interface chip (VIC) hidden beneath the silver can lid to the right of the 6581 SID device. The VIC is a color video controller and interacts with the Commodore's memory and data to produce the characters and shapes that appear on your display screen in those brilliant colors. Below the two CIA chips is a neat array of eight chips in two rows of four— the random access memory (RAM). The RAM provides 64K of on-board memory. The "K" stands for the number 1024. The number of K in RAM relates to the way the computer handles binary (base 2) numbers. The number 2 raised to the

22 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE sixteenth power is 65,536. We computer users call this 64K (64 x 1024 - 65,536), which is easier to say than 65,536. RAM memory can be written to or read from. Programs are temporarily stored in RAM when you're writing or running them. To store information for a long time, you'll use floppy diskettes or audio cassette tapes external to the computer. Another type of memory on the motherboard can only be read from. Just above the RAM and to the right of the CIA chips, you'll see three 24-pin chips and an 18-pin chip. These are called read only memory (ROM) and can be read but not written to. Information is permanently stored or written in these chips by the manufacturer. The chips hold programs that make your computer start up the same way each time you switch the power on, cause a specific character to be displayed, cause a character or shape to be a certain color, and let you write your own software code. On the leftmost of these 24-pin ROM chips Commodore has stored the BASIC language program. Stored on the next ROM chip is a machine language program called the Kernal that lets you control and communicate with your machine from the keyboard. The third 24-pin ROM holds the two character sets used in the character display modes. The 18-pin ROM generates the signals that control which color is displayed in a character, shape, or background. One major difference between RAM and ROM is that when you turn off the power to the computer, the program or data in RAM disappears (the power voltage kept the memory active). That's why you store your program or data on a disk or cassette before you turn off your machine. The programs in ROM are always there, always available when your Commodore 64 is on. You can't erase or write over programs stored in ROM as you can over those stored in RAM. Near the top right edge of the motherboard is a small receptacle, or jack, for input of the electrical power from the converter box and cord you plugged into the wall socket. The black converter box on your power cord converts the 115-volt electricity in your house or office to 9-volt alternating current and + 5-volt direct current. Inside your Commodore 64, the circuitry uses these input voltages to produce the voltages necessary to make your computer system function properly. Many of the problems found in Commodore 64 computers can be traced to the power supply. For example, some RAM failures, or blank screen displays can be caused by shorting the 5-volt regulator in the Singapore-built power supply. Although power supplies are easy to repair, do not attempt to fix any power supply problems, especially in that black converter box, unless you're a trained technician. There's 115-volt electricity inside which can be bad for your health. This manual does not cover any power supply repairs. Also located on the motherboard on the right rear side are two sockets for the game I/O connectors. Each port can accept a joystick or a game paddle pair; port 1 will also take-a Kght pen. These sockets are unique windows to the computer. A total of seven inputs to the Commodore 64 are on eacrwof the game I/O port connectors. Four of these inputs are for joystick position and can be read by a program. One pin is connected to a push-button input from a joystick or game paddle for games. For example, when you depress the push button on your game paddle or joystick, you are sending a logic level signal or voltage into your Commodore 64 through the control port I/O socket pin 6 called Button A/LP (port 1) or Button B (port 2). There are also two voltage inputs which can vary between 0 and + 5 volts. These are called analog or paddle inputs. The rotary knob on each of your game paddles connects to one of these inputs through a variable resistor (attached to the knob). (The Glossary of this book defines resistors.) Besides game paddles and joysticks, a light pen can be attached to controller port 1 , as described in Chapter 2. At the back of your computer is the cassette expansion slot connection. When the first small personal computer was built, disk drives were very expensive, so a decision was made to give Commodore users the ability to use a cassette recorder as a mass-storage device. While an adapter is available for use with standard audio cassettes, the best performance is achieved by using the digital data deck sold by Commodore. Over 85 percent of all cassette decks used with the Commodore 64 are Commodore Datassette Recorders. Using cassette tapes provides cheap mass storage, but saving or loading programs to or from cassettes is painfully slow and frustrating. The computer can be very sensitive to the volume control setting on the cassette player, and using tape requires close attention to the tape counter to locate the beginning and end of a file quickly. Most users who started out with these recorders soon shifted to a floppy-disk storage device for the speed, reliability and simplicity of operation, and because most of the programs that they wanted to buy were sold on floppy disks. One reason you might want to consider using a cassette as a mass-storage medium is for archive, or backup, storage. Many more files or pages of informa

THE COMMODORE 64 DESCRIBED 23 tion can be stored on a good cassette tape than can be stored on a floppy disk. In fact, one type of archive storage for hard disks is a cassette video tape just like that used to tape your favorite TV shows. Corvus, a hard disk manufacturer, uses a system called the Mirror to back up hard disk files on video tape. Fig. 1-8 shows the Commodore 64 connected with an MPS 801 printer and a VIC-1541 single-density disk drive. A disk drive lets you store and retrieve information on flexible magnetic disks called minidiskettes, or floppy disks. Since a disk drive is an important part of your Commodore system, we'll have lots more to say about them in Chapter 4, "Troubleshooting and Repair," and in Chapter 5, "Routine Preventive Maintenance." In Fig. 1-11, you see the "standard" Commodore 64 configuration. The cassette recorder/player has been replaced with a floppy-disk drive, and a printer has been added to provide a hard-copy output. Small business users generally configure a system as shown in Fig. 1-12. An 80-column adapter connected to the memory expansion port lets you see more information at once. The television display has been replaced by a higher resolution monitor. TV DISPLAY Fig. 1-8. A Commodore 64 system. (Commodore Electronics Limited) Proper connection of a monitor display unit is shown in Fig. 1 -9. While we won't cover internal repair of the monitor in this manual, you will be exposed to a number of easy-to-correct display problems. A "basic" Commodore 64 system is illustrated in Fig. 1-10. This is the minimum configuration for the Commodore 64. Without the display, the keyboard, or a storage device such as the cassette recorder/player, your computer is so limited that it can't really be called a system. COMMODORE 64 DATASETTE RECORDER KEYBOARD Fig. 1-10. The "basic" Commodore 64 system. TV DISPLAY PRINTER * COMMODORE 64 4— W DISK DRIVE KEYBOARD Fig. 1-11. The "standard" Commodore 64 system configuration. n 80 COL PRINTER VIDEO MONITOR COMMODORE 64 DISK DRIVE KEYBOARD Fig. 1-9. Proper connection of a display unit to your computer. Fig. 1-12. A typical small business Commodore 64 system.

24 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Flexibility is the key, as Fig. 1-13 shows. The Commodore 64 computer has a wide range of interface capabilities. This has been a quick overview of the Commodore 64. Chapter 2 discusses how the computer works. If Chapter 2 gets too technical, don't worry; the troubleshooting and maintenance chapters can be used without really understanding how the machine operates. The technical detail is provided so it will be here when you're ready for it. VIDEO MONITOR ANOTHER COMPUTER MODEM VIC 1541 DISK DRIVE 80-COLUMN INTERFACE DOT MATRIX PRINTER DAISY WHE.EL PRINTER SCIENTIFIC INSTRUMENTS IEEE 488 CARTRIDGE COMMODORE 64 LIGHT PEN KEYBOARD JOYSTICK HAND CONTROLLER VOLTRAX TYPE & TALK Z80 CP/M CARTRIDGE DATASETTE RECORDER Fig. 1-13. The flexibility of the Commodore 64 computer.

. CHAPTER 2 Commodore 64 Operations / n Chapter 1, you read a descriptive overview of the Commodore 64 computer. Next we'll explore how your Commodore works. Some of the information in this chapter is quite detailed. If some of the descriptions are too technical for you to understand, just skim over these sections. THE BASIC PARTS OF YOUR COMMODORE 64 Whether it's a tiny, single-chip microcomputer, a Commodore 64, or a room-size mainframe, every computer has five basic parts: • An arithmetic logic unit • A memory unit • An input unit • An output unit • A control unit These parts are associated as shown in Fig. 2-1 . HOW EACH PART WORKS Math and number crunching (arithmetic) occur in the arithmetic logic unit (ALU), where all the adding, subtracting, multiplying, dividing, comparing, and so on take place. The memory unit is used to store programs, calculations, and results. As shown, in Fig. 2-1 , this unit is composed of two types of memory — RAM (random access memory), which can be read from and written to, and ROM (read-only memory), which can only be read from. RAM is sometimes called main memory. When you turn off power to your Commodore 64, whatever you have stored in RAM is lost unless you first CENTRAL PROCESSING UNIT (CPU) INPUT UNIT 3 CONTROL UNIT IQEI ARITHMETIC LOGIC UNIT OUTPUT UNIT 3HT RAM ROM MEMORY Fig. 2-1 . The five basic parts of your Commodore computer. 25

26 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE save it on a disk or cassette. The program in ROM is placed there by Commodore during manufacturing and permanently stays in this memory. Since the ROM program (software) is in a hardware device, we call this firmware The input unit lets you enter information into the computer. It is a way for you to "talk" to your Commodore 64. A "human-to-machine" interface, the input unit can be a keyboard, a light pen that reacts when you touch it to a place on the screen, a special pen and a graphics tablet, a "mouse" that moves the cursor around the screen as you slide the mouse on your desktop, or a voice-recognition board and a microphone. An output unit gets information from the computer to you. It lets the computer "talk" to you. A television or monitor screen is the most commonly used output unit. You can also use a printer to produce a hard, or printed, copy of your data. Other ways for your computer to communicate include turning on motors and lights, making music and arcade sounds, and even "talking" in your own language by means of a speech synthesizer board and a speaker. Some computer devices are for both input and output. One input/output (I/O) device includes a form of memory external to the computer called mass storage. You save your programs to mass storage and retrieve them as needed. Mass storage media include floppy disks, cassette tapes, hard disks, and the recently announced optical disks. Another I/O device is the modem (modulator-demodulator), which you can use to send or receive information through your telephone line. I/O devices are called peripherals. They connect to your Commodore 64 through its built-in slots and ports. Everything that happens in and to your "64" is directed by the control unit. This unit interprets computer instructions and initiates the signals that cause the Commodore 64 circuits to do certain tasks. The control unit and the arithmetic logic unit are combined into a single chip called the central processing unit (CPU), or microprocessor unit (MPU). CHIP LOCATION SCHEME When Commodore Business Machines designed the Commodore 64 motherboard, it made certain the board was easy to install and easy to troubleshoot. As shown in Fig. 2-2, Commodore 64 engineers designed the board so all but three of the integrated circuits (chips) are mounted vertically. Pin 1 of each chip is at the top left corner of the chip. They also marked each component's identification code on the printed-circuit board, and numbered the components (U1 through U32) in increasing order from left to right. This allows you to locate any component on the board fairly quickly. In the pages that follow, all motherboard chips being discussed will be identified by the chip type (for example, 74LS74), name (for example, D-latch), and board designation (for example, U29). A list of all the chips used in your Commodore 64 can be found in the Appendix. . CENTRAL PROCESSING UNIT Look at your computer's motherboard. The heart of your Commodore 64 is the 6510 (6510A) MPU (also known as CPU), U7, shown clearly in Fig. 2-3. This 40-pin custom chip operates like a 6502 MPU except the 6510 has a built-in 6-bit peripheral I/O port that controls memory management and cassette I/O. As shown in Fig. 2-4, the 6510 MPU is a complex device that generates a wide range of output signals. The signals in the upper right corner of Fig. 2-4, at the peripheral interface buffer (PIB) output (P0-P5), control specific memory management and cassette interface actions within the machine. The processor uses 16 address bits to open and look into memory, fetch an instruction from that location, interpret the instruction, and perform the action the instruction requires (for example, adding two numbers) before moving on to process the next instruction. If the content of the memory location isn't an instruction, it is handled as data. Both instructions and data are transferred as the 8 data bits location DO - D7. When handling instructions, unless the next instruction directs the 6510 to a particular memory location to carry out the instruction stored there, the MPU will move from one instruction to the next instruction in sequential memory locations (one step after the other). Perhaps the most important difference between you stepping through a program (sequence of instructions) and your "64" doing the stepping is that the Commodore 64 can handle about 500,000 of these steps each second. The address enable control (AEC) signal coming into the top of the tri-state address buffer on the right edge of the diagram enables other processors or systems to use the Commodore 64's circuitry— when transferring data to and from a disk drive or another computer, for example.

COMMODORE 64 OPERATIONS 27 SERIAL MONITOR PORT VIDEO Elluinnnnnnnlli (nnlil USER PORT a cc < o 6526 6526 DO CIA CIA EY #1 *2 (Ul) (U2) eo oe Ul *_l BASIC 901226-01 KERNAl (01227-01,2 114 301 o (U6) (U3) (U4)

28 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE vccGNDRDYRES ■ IRQ ■ NMI INTERRUPT LOGIC PHASE 0 CLOCK TIMING CONTROL INDEX REGISTER X INOEX REGISTER Y 0 INSTRUCTION DECODER CIRCUITRY PROCESSOR STATUS REGISTER DATA DIRECTION REGISTER PERIPHERAL l/F BUFFER (PO-PS) PERIPHERAL OUTPUT REGISTER AEC STACK ■ POINTER REGISTER ARITHMETIC LOGIC UNIT ACCUMULATOR ^ij. PROGRAM C^V) CENTER HIGH r~ A~ PROGRAM (jZO CENTER LOW INPUT DATA LATCH 5 DATA BUS BUFFER INSTRUCTION REGISTER -> R/W (D0-D7) PHASE 2 -► CLOCK OUT Fig. 2-4. Architecture of the 6510 microprocessor chip. of the powers of two for each bit (two raised to the 1 5th power, plus two raised to the 14th power, plus . . . ). With 16 bits, the computer can access 65,536 locations (we count address 0000 as one of the locations). You can easily relate address word length to address range by raising the number two to the address length value. Two raised to the 16th power is 65,536. In computer jargon, this is called 64K. This is why the Commodore 64 is called a 64K machine. With more memory in the computer than 64K, clever memory management techniques are used to address beyond the 65,536 locations standard with 16-address-bit machines. In the Commodore 64, the 6510 MPU controls access to the 64K of available memory. Normally your "64" system is configured with 40K of RAM for programming, 8K for the Kernal or operating system, 8K for the BASIC language program, 4K for graphics, sound, and I/O, and 4K for machine language programs or special uses such as buffers for the I/O. The address-space allocation begins with three outputs of the 6510 MPU's PIB shown in Fig. 2-5. Output signals P0, PI, and P2 control which parts of memory are made available at any given time. The three control signals, LORAM, HIRAM, and CHAREN, are sent to the 82S100 programmed logic array (PLA) device (U1 7 in Figs. 2-2 and 2-6) where they enable the specific memory devices. The LORAM signal from P0 determines whether the 2364A 8K BASIC ROM (U3) or an 8K section of RAM is part of the MPU's $A000- $BFFF (hexadecimal) address space. LORAM at logic LOW causes the RAM to be in address space $A000-$BFFF. HIRAM, the PI output of the 6510 MPU, is used to bank the 2364A 8K operating system Kernal ROM (U4)

COMMODORE 64 OPERATIONS 29 PO P1 PERIPHERAL P2 INTERFACE BUFFER P3 (PIB) P4 P5 AO TRISTATE — ADDRESS BITS BUFFER A15 (A0-A15) DATA BUS BUFFER DO D7 INSTRUCTION REGISTER DO D7 651 OA LORAM -¥ HIRAM — ► CHAREN ► CASS WRITE ► CASS SENSE » CASS MOTOR DATA BITS D0-D7 R/W -► PHASE 2 CLOCK Fig. 2-5. The control signals from buffer outputs PO, P1, and P2 determine which part of memory will be accessed. in or out of address space $E000- $FFFF. If HIRAM is at a logic LOW, address space $E000- $FFFF is part of the RAM memory. Out of output P2 comes the signal CHAREN. This control signal determines whether the 2332A 4K character generator ROM (U5) or the I/O devices are within the address space $D000-$DFFF. When CHAREN is logic LOW, addressing a location anywhere within $D000— $DFFF will access the character generator ROM. The 6510 accesses this ROM when copying the character set from ROM into RAM. As you can see, your Commodore's 64K address space is separated into areas for RAM, ROM, and the input/output. Input and output ports have unique memory addresses— called memory-mapped I/O. For example, to read the position of the joystick connected to control port 1, you would address location $DCOO (hexadecimal), 56320 (decimal). I/O devices are accessed within the address space $D000-$DFFF. For convenience, a decimal to hexadecimal conversion table is included in the Appendix. A number of combinations can be used to allocate the memory in your Commodore 64. The primary map of memory allocation for your computer is shown in Fig. 2-7. CHAREN82S100 (PLA) (U17) CASRAM BASIC KERNAL Fig. 2-6. Memory access control signals. 4164-2 RAM (U12) D7 4164-2 RAM (U24) D6 4164-2 RAM (U11) D5 4164-2 RAM(U23) D4 4164-2 RAM(U10) D3 4164-2 RAM (U22) D2 4164-2 RAM(U9) D1 4164-2 RAM (U21) DO CHAROM 2364A (U3) BASIC ROM 2364A (U4) KERNAL ROM 901227-01,02,03 2332A (US) CHARACTER ROM 901225-01 D0-D7 D0-D7 D0-D7

30 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE RAM ROM SFFFF j r$FFF 8K OPERATING \ ALTERNATE SYSTEM < RAM KERNAL / $E000 ' -SE000 SDFFFA ( $DFFF 4K RAM OR CHARACTER 4K I/O ROM $D000 I L $D00O SCFFF) \ 4K RAM scooo ) SBFFF) / $BFFF 8K BASIC ROM 8K RAM ROM CARTRIDGE $A000 J 1SA000 $9FFF) RAM ( BASIC PROGRAM } AND DATA \ STORAGE $0800 J $07FF } ( SCREEN i MEMORY $0400 ) $03FF } COMMODORE ( SYSTEM ) _ _ _ _WORJ I/O SLOT 2 (DISK) $DFO0 ) } I/O SLOT 1 CK„ $DE00) f^B_LfL_ $DDFF| CIA 2 (SER|ALBUS) $DDO0 ) iiSl222_U_SJ« f ^JI $DCFF) > CIA 1 (KEYBOARD) SDC00 ) $DBFF) ' COLOR RAM SD800 ) $D7FF \ ' 6581 SID $D400 ' $D3FF \ > 6567 VIC SD000 J Fig. 2-9. I/O memory map.

COMMODORE 64 OPERATIONS 31 Table 2-1. ROM Address-to-Chip Translation Hexadecimal Address Function Size Chip Location $EOOO-$FFFF Kernal ROM 8K x 8 bits 2364A (U4) $DOOO-$DFFF Character ROM 4K x 8 bits 2332A (U5) $D800-$DBFF Color RAM/ROM IK x 4 bits 2114-30L (U6) $AOOO-$BFFF BASIC ROM 8K x 8 bits 2364A (U3) All of the RAM in your Commodore 64 is packed into eight 65,536-by-1-bit dynamic RAM chips (4164-2 or MK4564N-20) in the lower left of the computer's motherboard. Each chip is responsible for a single bit of an 8-bit data word. The odd-numbered data bits (D1, D3, D5, and D7) are in the uppermost row (chips U9, U10, U1 1, and U12); the even-numbered data bits (DO, D2, D4, and D6) are in the four RAMs in the bottom row (U21, U22, U23, and U24). In Table 2-2, RAM address spaces are related to their physical RAM chips. Table 2-2. RAM Address-to-Chip Allocation Hexadecimal Address Bit Size Chip Location $C000-$CFFF RAM bit DO 64K x 1 bit 4164-2 (U21) RAM bit D1 64K x 1 bit 4164-2 (U9) RAM bit D2 64K x 1 bit 4164-2 (U22) RAM bit D3 64K x 1 bit 4164-2 (U10) RAM bit D4 64K x 1 bit 4164-2 (U23) RAM bit D5 64K x 1 bit 4164-2 (U11) RAM bit D6 64K x 1 bit 4164-2 (U24) $0000-$9FFF RAM bit D7 64K x 1 bit 4164-2 (U12) RAM Memory Used During DOS Boot Every type of computer uses a unique software package to control the way it communicates with peripheral equipment and other software programs. This package is called an operating system. Some of the operating systems used in microcomputers today are DOS, MS-DOS, TRS-DOS, RTX, CP/M, and CP/M-86. On the Commodore 64, your operating system is called DOS, for disk operating system. This program resides in a ROM within the electronics of your VIC-1541 disk drive. It is always present and comes into play whenever you access the disk drive to store or retrieve information. When you turn on your computer, DOS 5.1, a support program provided on the VIC-1541 disk drive test/demo disk, allows you to use short forms of commands for storing and retrieving information. Where BASIC Programs Are Stored Although your Commodore BASIC high-level language is stored in ROM, the programs (source code) that you generate in this language are stored as Hex symbols in RAM. They begin at address $0800 and may extend all the way to address $9FFF, depending on the memory configuration you use and the size of your program code. Should your simple programs appear to load correctly, but not run, the problem could be a bad memory location in the BASIC ROM. It could also be a problem you cause yourself by inadvertently storing data values in the midst of the BASIC program storage area.* . . The Commodore 64 Bus Structure Control signals, addresses, and data are shared between the MPU and the rest of your Commodore system over tiny parallel lines, or traces, on the motherboard called buses as shown in Fig. 2-10. 6510 MPU Fig. 2-10. Basic Commodore bus structure. A bus is like a roadway over which the 6510 MPU communicates with other components (peripherals like disk drives) and the real world (motors, lights, sensors, etc.). Your Commodore 64 has three different buses in its design: • the data bus • the address bus • the control bus * I once did this. When the program refused to run, I listed it on the screen and found that the contents of two addresses had been changed from this: 830 PRINT:INPUT"WOULD YOU LIKE A PRINTOUT? ";P$ 835 IF P$- "Y" OR P$- "YES" THEN 5800 to this: 65442 SPC 60O96 MID$ MID$ MID$ MID$ MID$ MID$ SPC- PRINT X TAB( MID$ MID$ * - MID$ 'A TAB It was impossible to delete these two program lines because their numbers were beyond those the computer would accept for line numbers. And I certainly didn't want to erase 80 percent of my 500-line program! To save my work, I located the bad values in RAM and rewrote the correct line number values over the bad data. I didn't touch the command instructions that appear after the line numbers because I wanted to be able to list only the two bad lines. After listing that section of the program, I simply deleted the two bad lines and rewrote those two lines of code.

32 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE Each trace on each bus has a voltage (approximately 0 volts or + 5 volts) which represents a logic level (0 or 1 ). The data bus and the address bus are the primary buses. Information on the data bus can travel either to or from the MPU (it is bidirectional). Addresses come from the MPU (unidirectional) on the address bus. The Commodore 64 is called an "8-bit machine" which means that a data word is eight bits long. Therefore, the data bus has eight bits that together represent a data word or "byte." Because the data bus is bidirectional, it requires a signal to control the direction of data flow. This signal is sent via the control bus, a set of traces or lines on which special voltage signals are placed to enable or disable certain parts of the circuitry. The largest (widest) bus in the Commodore 64 carries the addresses the MPU accesses for program instructions or data. The address bus carries 1 6 bits at a time, enabling it to address up to 64K of memory locations. These 16 logic levels collectively represent unique address locations in memory or in the Commodore 64 I/O. Together, the address bus, data bus, and control bus are called the system bus. This bus is accessible from the cartridge expansion port. The relationship of the system bus to the MPU and the rest of your computer is described in Fig. 2-11. Under the direction of the MPU, special control signals are placed on the control bus and unique addresses are placed on the address bus. The control signals open the address locations, letting the information stored in these locations appear on the data bus, which is acted on by the MPU or I/O. Except for disk drive access signals, all data moves through the MPU and all addresses are generated and placed on the address bus by the MPU. CLOCK TIMING Information processing in those tiny chips is made possible by several clock signals that pulse throughout your Commodore 64. A crystal oscillator (beneath the silver can that shields the 6567 VIC chip) on the computer's motherboard produces a 14.31818 MHz master oscillator signal output from the 74LS629N crystalcontrolled oscillator, U31. All other clock signals are derived from this basic clock signal as shown in Fig. 2-12. A 14.31818 MHz clock pulse output signal from U31, called phase color, is applied to the count-up input of the 74LS193 binary up/down counter (U30), the 21 14-30L Color ROM (U6), and the 6567 VIC (U19). Counter U30 divides this phase color down through the 74LS74 D-latch (U29) to become dot color, at 8.1818 MHz or 7.88 MHz, depending on whether the system is set for NTSC video, used here in the United States, or for PAL video, common in Europe. Dot clock 6510 MPU RAM 7\ VIC II VIDEO SERIAL USER PORT PORT I II ROM 7\ CIA #2 7\ SYSTEM BUS iH> iiO Ui> SIO CIA #1 V SOUND KEYBOARD GAME CONTROLS Fig. 2-11. The Commodore 64 system bus. EXPANSION SLOT ENABLE PLA (U17)

COMMODORE 64 OPERATIONS 33 PHASE I jCni op^v (14.31818 MHz-NTSC) TO COLOR ROM (U6) | P COLOH^ (17 734472 MHz-PAL) AND VIC (U19) LS193 LS74 MC4044 (U32) (U30) (U29) — ©-Jdotclock^>(8.1818 MHz-NTSC) (7.88 MHz-PAL) 6567 VIC (U19) 6510 MPU (U7) JUMPER SELECT NTSC — I PHASE 2 > (1.02 MHz-NTSC) (0.98 MHz-PAL) — I PHASE 0> (1.02 MHz-NTSC) (0.98 MHz-PAL) Fig. 2-12. Clock timing circuitry. is applied to an input of the 6567 VIC (U19) which divides it by eight and puts it out as phase 0 at 1.02 MHz, the input clock to the 6510 MPU. The 6510 MPU produces the inverse of phase 0, a 1.02 MHz phase 2 system clock signal. Dot clock and phase 2 system clock are both provided on the 44-pin cartridge expansion socket. Should your machine behave erratically, a sick clock may be your problem. (Another could be the 6510 MPU itself.) We'll learn more about this in Chapter 4. THE POWER SUPPLY Power to your Commodore 64 comes into your machine via a sealed, bulky, and heavy voltageregulator supply built into your computer's power-in cable. This regulator provides 9 volts AC (VAC) and + 5 volts DC (VDC) via the 7-pin power input DIN connector (CN7) on the right side of the motherboard as shown in Fig. 2-13. As shown, these voltages are then regulated to apply + 5, +9, and + 12 VDC to the motherboard. In addition, 9 VAC is provided to pins 10 and 11 of the user port (CN2). One of the 9 VAC signals is fed to the TTL regulator circuit composed of CR1, a 1N4371 zener diode, and U27, a 74LS08 AND gate. These devices and their associated capacitor and resistors produce a 60 Hz external clock signal (time of day, TOD) that is sent to the two 6526 complex interface adapter chips, U1 and U2. The TOD clocks in each chip provide a 24-hour (AM/PM) clock, registering hours, minutes, seconds, and tenths of seconds. The maximum power consumption is a fantastic 79 watts (less than your 100-watt room lamp). Since this manual avoids getting you in or around high-voltage circuits, I won't discuss troubleshooting the voltageregulator power supply that came with your power cord package. It's best to leave power supply problems to an experienced repair technician. For those readers who fall into the "experienced technician" category, a schematic of the power supply can be found in the back of the Commodore 64 Programmer's Reference Manual. INPUT/OUTPUT All the connectors and plug jacks with their respective circuits are part of the I/O unit in the basic computer block diagram. For example, the 6567 video interface chip (VIC), (U19), beneath that large silver can in the lower right part of the Commodore's motherboard, is considered part of the I/O unit. Another part of the I/O unit is the 6581 sound interface device (SID), at U18, which generates the sounds emitted by your display unit's speaker. Except for the MPU and the memory, most of the

34 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE *2I 115V POWER SUPPLY 9VAC FUSE 9VAC L4 + 5V orrv. -j^rrrGNC T POWER INPUT CONN. (CN7) 1" POWER ON/OFF SWITCH "1 VR2 VR1 74 LS08 (U27) ;USER !PORT (CN2) -i— ► 9VAC -}— ► 9VAC -► +5V -► +12V -► +9V + SV, 60 Hz CLOCK (TOO) -► +5V Fig. 2-13. Power supply circuitry. chips on your Commodore's motherboard are associated with either control or I/O circuitry. Other MPU chips, like the 8080 and the Z80, use special instructions or commands to access the I/O ports. In your Commodore 64, you simply address a certain memory location in the computer to access its ports. Input/output devices are identified by specific device numbers as shown in Table 2-3. Table 2-3. Identification of input/Output Devices I/O Device Device Number Keyboard 0 Cassette Recorder 1 RS-232C Modem 2 Screen Display 3 Serial Bus Printer 4 Serial Bus Printer 5 Serial Bus Device 6 Serial Bus Device 7 Serial Bus Disk Drive 8 Serial Bus Device 9 Serial Bus Device 31 Devices 4 through 31 are hardware connected to the serial bus I/O port. Connecting Commodore products to the Commodore 64 I/O ports is straightforward and easy. Connecting other manufacturer's hardware to your "64" is much less convenient. VIDEO DISPLAY A positive, composite, NTSC-compatible video signal for monitor display use, and a modulated video signal for television display use, are produced and made available at the edge of your Commodore 64 motherboard. The RF modulator port at the rear of your computer is a standard RCA phono connector. Composite NTSC video is avaifable at a 5-pin DIN connector (CN5) on the right side of your computer's motherboard. The video signals originate in a custom-IC chip called a 6566 or 6567 (VIC) and the circuitry shown in Fig. 2-14. The 6566 and the 6567 are not pin compatible. The 6566 VIC connects directly to the lower 1 4 bits of the Commodore system address bus (A0-A13). The 6567 VIC multiplexes part of the address bits, and generates RAS/ and CAS/ signals used in multiplexing and dynamic RAM refresh. Since most Commodore 64s use the 6567 VIC, this device is discussed here. Except for addressing, the operation of both chips is similar. As Fig. 2-14 shows, there are two primary outputs from the 6567 VIC. Both outputs are mixed at the intersection of resistor R10 and capacitor C79. The S/LUM signal from pin 15 of the VIC contains all the video information, including horizontal and vertical synchronization and the luminance level, or brightness. Color comes from pin 14 of the 6567 VIC and includes the color-reference burst and the color-determination information. A 1K variable resistor (R25) can be used to

COMMODORE 64 OPERATIONS 35 CR3 DOT CLOCK (8 MHz) Fig. 2-14. Video interface controller (VIC) circuitry. ► LUM + NTSC C78 COMPOSITE Pi'^ VIDEO •"" TV RF MODULATED VIDEO adjust or trim the color signal for optimum screen presentation. The 6567 VIC chip uses the 8 MHz dot clock signalin on pin 22 to generate a 1 MHz phase 0 clock signal out pin 17. This signal is used to drive the 6510 MPU. The 6510 MPU uses the data bus when the clock signal is active-high, so the 6567 uses the data bus when this clock signal is low. By this action, the character fetches from video memory, and RAM-refresh are made totally transparent to the 6510 MPU. The VIC will access up to 16K of display memory, the exact amount depending on the video mode selected, as shown in Fig. 2-15. The 16K slice of memory, called the video matrix, determines what character is displayed. The character generator table in the 2332A character ROM (U5) is the source for alphanumeric character codes. The 6566 or 6567 VIC is told which 16K slice of RAM or ROM to access by signals VA14 and VA15, which are produced by the 6526 CIA #2 (U2) at its PAO, PA1 Port A output (Table 2-4). The CIA operates much like a peripheral interface adapter device. These two signals are placed on the AO and A1 inputs to 74LS258 multiplexer (U14) which then produces an output signal from Y0 and Y1 on pins 4 and 7, respectively. This code is applied to the D6 and D7 inputs to the 74LS373 octal transparent latch (U26) and to the 4164-2 RAM chips. Table 2-4. Blocks of Memory Accessed by Signals VA14 and VA15 (PAO, PAH 16K Slice Decimal Addresses VA15 VA14 VIC II Range RAM Char Gen ROM RAM 0 0 $C000-$FFFF 49152-65535 0 1 $8000-$BFFF 32768-36863 36864-40959 40960-49151 1 0 $4000-$7FFF 16384-32767 1 1 $0000-$3FFF 0-4095 4096-8191 8192-16383 -VA14_VA15. 74LS258 (U14) AO Y0 A1 Y1 MUX 74LS373 (U26) D6 Q6 D7 Q7 OCTAL TRANSPARENT LATCH VIDEO MATRIX RAM (16K SLICE) 2332A

36 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE DATA BUS Fig. 2-16. Cassette input/output circuitry. AOA1 ■ A2A36510 MPU (U7) P5 CR2 P4 (BIT 4) P3 (BIT 3) -> ADDRESS BUS +5X 6526 CIA 4 PLAfl SRQIN r CASS MOTOR CASS SENSE CASS WRITE + 5 VOLTS CASS READ GROUND DATA BUS 6 PIN CASSETTE CONNECTOR (CN3) CASSETTE INPUT/OUTPUT The simple circuit in Fig. 2-16 enables you to store programs and data on a standard audio cassette tape using the Datassette recorder connected to the 6-pin cassette port (CN3). You communicate with your cassette recorder by programming the format "OPEN file*, 1, number, string." The device number "1 " tells the MPU that you wish to communicate with the cassette recorder. The value for number can be 0, 1, or 2. These numbers represent the data direction as shown in Table 2-5. The routine in your Kernal ROM for handling the cassette's read and write action is LOAD "Program Name",1 or SAVE "Program Name",1 (the device number defaults to 1 if not specified, so use of the "1" is not required). Each time your program calls this routine, the Kernal program looks at the first two addresses in RAM to determine what action to take. Bit 1 at address $0000 tells the 6510 MPU in which direction the data is to move. If this bit is a 0, data is coming in; if this bit is a 1, data is being moved out to the Table 2-5. Format for "Number" Representation Number Meaning 0 Input 1 Output 2 Output with EOF (End of File) cassette. Address $0001 holds the information for cassette operation. Bits 3, 4, and 5 are connected to the cassette connector (CN3) through the 6510 MPU output port pins P3, P4, and P5 as shown in Fig. 2-1 6. Bit 3 is the cassette data output line; Bit 4 is the cassette switch sense line. If this bit is a 1, then the sense switch is closed. Bit 5 turns the cassette motor control on or off. If bit 5 is a 1, the cassette motor is commanded off. If your program tells the MPU to save to device #1 , P5 output goes low commanding the Datassette to turn on. THE VIC-1341 DISK DRSVE Your Commodore disk drive is designed to enable you to easily and quickly store and retrieve information using 5%-inch floppy disks. The disk mechanism is housed in a 3.82 x 7.87 x 14.72-inch beige case as shown in Fig. 2-17. This single floppy-disk drive has its own power supply and operates on 25 watts of electricity. It is an intelligent disk drive that contains its own microprocessor controller (a 6502 CPU), and associated electronics, including 2K of RAM for buffering I/O data. The VIC-1541 is probably the most important peripheral connected to your computer. It's the primary mass-storage device used by Commodore 64 owners all over the world. The drive connects to the serial bus connection on your Commodore 64 as shown in Fig. 2-18.

COMMODORE 64 OPERATIONS 37 Fig. 2-17. Photograph of the VIC-1541 disk drive. Fig. 2-18. The drive connects to your Commodore's serial bus output. Disk drives can be daisy-chained together, allowing more than one device to share the same serial bus. Up to five disk drives and a printer can share the bus at the same time. Device numbers can be assigned to drives by software or by a simple hardware modification inside the drive as discussed on page 40 of the VIC-1541 Single Drive Floppy Disk User's Manual. The 35-track cam-positioned drive rotates at 300 rpm to write or read data on a thin mylar disk with a magnetic coating of oxide particles. The disk starts out as a .003-inch thick polyester disk, which is then coated with about .0001 inch of iron oxide. The disk is called a floppy because it is thin and quite flexible. The disk (or diskette) used in your VIC-1541 is a single-sided, single-density platter whose surface is electromagnetically divided into 35 tracks or rings. The disk is divided into 17 to 21 rectangular sectors leading from the inner center hole to the outer edge. (Track 1 is on the outer edge of the disk.) Each sector holds 256 bytes of information. The disk is soft sectored; that is, sectors are marked off by a special series of code bits written on the disk by your Commodore 64. Each disk can store up to 174,848 bytes of data with 144 directory entries per disk. One double-spaced page on 8V2 by 1 1 -inch paper can use up 1670 characters, or bytes. Therefore, you can store a little over 100 pages of double-spaced text on one disk. The disks are provided in protective jackets to keep dust and foreign materials off their surfaces. Chapter 5 goes into great detail about disks and their protection. KEYBOARD OPERATION What happens when you depress a character key on your Commodore 64 keyboard? Right! You see a character appear on your'display screen. But what causes that particular character to be displayed? Look at your computer keyboard (Fig. 2-19). That remarkable input device has 65 built-in keys. These keys are classified according to their use. Some keys are used as alphanumeric keys, providing the ability to display numbers and letters. Other keys are used as cursor control keys, to move the cursor around the screen, edit characters, or clear the screen. Some keys are used as function keys, enabling single-key program action, such as running special routines. Other keys are designed for graphics control, and let you display any of the 62 graphic symbols permanently stored in memory. Fig. 2-19. The Commodore 64 keyboard. Some keys enable the color of the characters or symbols or even the background to be changed. This capability minimizes color bleed, or artifacting (when the character colors blend in with the background color). Finally, there are some keys which are used to toggle back and forth between character sets or symbols. They can be used to signify the end of a line of program text, or to delete characters. One key even stops a program after it has been running, without losing data. Using this RUN/STOP key with a SHIFT key can cause a cassette tape to load automatically. The Commodore 64 keyboard is physically and electronically connected to a matrix 8 rows high by 8 columns wide. It connects to your computer's mother

38 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE board through a 20-pin conductor ribbon cable that plugs into a socket just to the left of 6526 CIA #1, at CN1, as shown in Fig. 2-20. Keystrokes are interpreted by the circuitry on the motherboard and then produce the correct characters or special function codes. Notice that all the electronics for your keyboard are mounted on the motherboard. A pin-socket arrangement connects the keyboard matrix to the main circuit board, physically and electrically. The short cable, shown in Fig. 2-20, routes the keystroke information to your Commodore 64 motherboard. Fig. 2-21 is a simplified schematic of the keyboard circuitry. Commodore engineers designed a clever way to encode and interpret which key, or combination of keys, you have pressed. Rather than using a physical encoder chip to produce the American Standard Code for Information Interchange (ASCII) character set, they engineered your machine to accomplish this feat using the built-in monitor program, called the Kernal. The keys on your Commodore 64 keyboard are an integral part of an X-Y matrix where each key is on a crossover point of an X row and a Y column. Each time you press a character key, the circuitry converts this action into a column-and-row code pair which is stored in two registers in 6526 CIA #1 (U1). These two registers are located at addresses $DC00 (56320) for keyboard column data, and $DC01 (56321) for keyboard row data. Fig. 2-20. The keyboard connects to the motherboard via a 20-pin connector. The Kernal program interrupts the 6510 MPU operation every 1/60th of a second causing electronic control to shift to a machine-language routine that updates the system clock and scans the keyboard for any key action. The SCNKEY routine (starting at location $FF9F (65439) in the Kernal ROM) causes the rowcolumn data in the 6526 CIA #1 (U1) to be output as an 8-bit code to the 6510 MPU (117), which then stores the KEYBOARD CONNECTOR (CN1) ($0277$0280) KEYBOARD MATRIX 6526 CIA #2 (U2) DATA SERIAL BUS (CN4) Fig. 2-21. Simplified keyboard schematic.

COMMODORE 64 OPERATIONS 39 value in RAM location $00C5 (197) as a value LSTX. This value represents a code for the key pressed. Another code representing the status of the SHIFT key, CONTROL key, and the , or COMMODORE, key is stored in RAM location $028D (653) as the value SHFLAG. LSTX and SHFLAG are combined and then interpreted by the Kernal to form a new code, representing the ASCII value for a character or special symbol. This code is stored in a 10-character buffer that acts like a FIFO (First-ln, First-Out) register memory. This buffer is located in RAM at addresses $0277- $0280 (631-640) and acts as a queue to hold character keystrokes until they are serviced, that is, interpreted and displayed. The 10-level buffer allows you to continue typing, while the computer "catches up" during your barely noticeable pauses between some key actions. Each time the system is interrupted by the Kernal program, a routine named GETIN is called which gets a character code from the keyboard buffer or queue. This code is sent from the RAM buffer into the 6510 MPU accumulator register and out onto the data bus. It then enters either the 6567 VIC (U19) and video output circuitry or the 6526 CIA #2 (U2), where it is clocked out the serial bus port (CN4) to a printer, as serial ASCII data. One of the problems with mechanical switches such as keys is that they don't close cleanly. Electronically they "bounce" several times before solid contact is achieved. This bouncing can produce noise spikes that could be interpreted as valid signals, causing such effects as four or five repeated characters to occur on one key action. Your Commodore 64 is not bothered by keyboard bounce because a short routine (about 8 ms) in your Kernal program delays the scanning of the keyboard, allowing only one keystroke to be read at a time. Another thing that the Kernal does at every 1/60thof-a-second interrupt is scan the RUN/STOP key. If you press this key, when the interrupt occurs (you won't notice any delay between the time of your action and the system's response); the MPU halts any program that was running, displays the number of the program line last executed, and then waits for keyboard action by you. The Kernal routine STOP at location $FFE1 (65505) scans the RUN/STOP key every interrupt. Another important key is the RESTORE key. This is much like a system RESET key. RESTORE is used with the RUN/STOP key. When you depress the RUN/STOP key together with the RESTORE key, your Commodore 64 stops whatever it was doing and restores the system's initial conditions. The ports on your computer's motherboard, any sound the computer may be producing, sprites, and the colors of the display are all returned to the initial default settings. The RESTORE signal is generated on the keyboard. It enters the motherboard from the keyboard connector and is passed through a resistor capacitor network into a 556 timer (U20), then to the 7406N quad operational amplifier (U8). The output of U8 is the nonmaskable interrupt (NMI) input to the 6510 MPU (U7J. The software routine that handles the NMI interrupt causes a prompt to appear at the lower left corner of your screen. SOUND The magic of sound from a computer becomes a reality for all Commodore 64 owners thanks to a well designed chip called the sound interface device (SID) shown in Fig. 2-22. Fig. 2-22. The 6581 sound interface device (SID). Inside the 6581 SID, three generators are combined to produce the sounds you hear from your television or monitor's speaker. These generators are digitalcontrolled audio oscillators. Commodore calls these oscillators "voices." Inside the SID, 25 registers control the quality and type of sound produced. These registers are memorymapped to addresses $D400-$D418 (54272-54296). They are arranged as three groups of seven registers, and each sequential address location is a register for one of the three voices, or audio oscillators, as shown in Table 2-6. Notice that the last four registers apply to all three audio oscillators. A value stored in memory location $D418 (54296) controls the volume in 16 stages. The value in the lower four bits of this location is scanned

40 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Table 2-6. SID Control Function Addresses ojoi jiu v^uniiui runniun Voice 1 Voice 2 voice j Frequency (Low Byte) $D400 (54272) $D407 (54279) $D40E (54286) Frequency (High Byte) $D401 (54273) $D408 (54280) $D40F (54287) Pulse Width (Low Byte) SD402 (54274) $D409 (54281) $D410 (54288) Pulse Width (High Nibble) $D403 (54275) $D40A (54282) $D41 1 (54289) Type Waveform $D404 (54276) $D40B (54283) $D412 (54290) Attack/Decay Times $D405 (54277) 1 D40C (54284) $D413 (54291) Sustain/Release Times $D406 (54278) $D40D (54285) $D414 (54292) Filter Cutoff (Low Nibble) $D415 (54293) $D415 (54293) $D415 (54293) Filter Cutoff (High Byte) $D416 (54294) $D416 (54294) $D416 (54294) Filter Resonance + Voice $D41 7 (54295) $D417 (54295) $D417 (54295) Band Pass + Volume Control $D418 (54296) SD418 (54296) $D418 (54296) during sound generation to determine if the volume should be low ($01 stored there), or high ($0F stored there). Two registers control the characteristics of the sound produced. These 8-bit buffers enable a sound to peak (ATTACK), fade (DECAY), hold at a certain level (SUSTAIN), and finally disappear (RELEASE). The frequency level controls the pitch, the timbre or tonal quality determines the tone, and the volume corresponds to the dynamic amplitude of the sound signal. Frequency is determined by two cascaded registers allowing 65,536 possible pitch combinations over eight octaves. Any of four waveforms can be passed from any audio oscillator to the filter shown in Fig. 2-23. These waveforms are noise, pulse, sawtooth, and triangle. Sound from one of the oscillators can be fed back into another to produce bell sounds. Four types of filtering are possible using the SID in your Commodore 64. You can cause the chip to pass only high frequencies to the audio output (HIGH PASS); you can cause only lower frequencies to pass through (LOW PASS); or you can pass a narrow band of frequencies through to the output (BAND PASS). Finally, you can combine the high-pass and the low-pass filters to form a NOTCH filter that allows all but a narrow band of frequencies through. The last of the 25 registers ($4D18) controls the volume and the type of filter being applied to any audio signal passing through the chip. The 6581 SID (U18) also uses its built-in analog-todigital converter (A/D) to change either of the gamepaddle potentiometer inputs (POT X, POT Y) from a 0 to 5 volt analog signal to a corresponding digital signal. This digital signal is passed to the 6510 MPU accumulator on the data bus. The 6581 SID (U18) is designed into the circuitry shown in Fig. 2-24 to produce the high quality audio that makes your Commodore 64 known worldwide for its sound capabilities. As shown, the audio signal is passed through the resistor-resistor-capacitor (RRC) filter network of R6, R7, and C37 to a type PN2222 NPN transistor amplifier (Q8) which enhances the signal to a level suitable for your television or display monitor audio circuitry. Audio signals are either generated internally or enter the audio/video port connector shown in Fig. 2-25 (A). The sound signal exits your computer by ADDRESS BUS CONTROL BUS OJATA BUS^ POTX A/D CONV 1> POTY AUDIO OSCILLATOR VOICE 1 AUDIO OSCILLATOR VOICE 2 A Z AUDIO OSCILLATOR VOICE 3 \7 FILTER FILTER/ AUDIO SWITCH r AUDIO VOLUME EXTERNAL AUDIO IN Fig. 2-23. Simplified functional block diagram of the 6581 SID.

COMMODORE 64 OPERATIONS 41 EXT AUDIO IN SID ADDRESSES SD400-SD414 CONTROLDATA BUS V VIDEO C12 + 6567 -V 6581 VIC SID (U19) ► (U18) R7 -A/W .R6 T I C13 RF MODULATOR — VIDEO/AUDIO °> C37 R38 AUDIO OUT^> Fig. 2-24. Audio output circuitry. either the display monitor connection of Fig. 2-25 (A) or via the RF modulator jack in Fig. 2-25 (B). 'As you can see, the frequency you generate depends on how you program your machine. By programming the SID for the type of output you desire, you can then poke address $D404 (for Voice 1) to start the sound. You can also turn off the note by poking a value $10 (16) into this same location. THE GAME INPUT AND OUTPUT As we saw in Chapter 1 , your Commodore comes complete with two separate 9-pin game I/O connections control port 1 , and control port 2. These ports let you connect game paddles, joysticks, and even a light pen to your "64." Four types of inputs are accepted by the control port 7 connector (CN9) (Fig. 2-26): game paddle pushbuttons, a light pen, game paddle rotary potentiometers, and four joystick switches. As shown in Fig. 2-27, all inputs except the light pen, are also located on the control port 2 connector (CN8). When you connect a set of game paddles to your computer via a 9-pin plug on connector CN8 or CN9, you are electrically connecting the components in the paddles with certain chips in your Commodore 64. The part of the paddle that you rotate to move a cursor or image about the screen is a potentiometer, or variable resistor (nominally 470K ohms). This analog input is connected to your computer's motherboard circuitry as shown in the control port 1 application (Fig. 2-28). Rotating one of the paddle resistors places a voltage between 0 and +5 volts on the input to the 4066 CMOS analog switch (U28) (POTAX, POTAY, POTBX, or POTBY). This voltage is determined by the resistance setting on the potentiometer. The multiplexed output REV-K REV- A FUNCTION LUMINANCE/BRIGHTNESS GROUND AUDIO OUT VIDEO OUT AUDIO IN (A) DISPLAY MONITOR AUDIO/VIDEO PORT (CN5) r CONNECTION SLEEVE CENTER CONDUCTOR FUNCTION GROUND AUDIO/VIDEO SIGNAL (B) RF MODULATOR RCA AUDIO/VIDEO CONNECTOR (M1) Fig. 2-25. The audio interface connectors. of the 4066 analog switch is passed to the 6581 SID (U18) as POTX or POTY. This device, like the 6581 SID chip, has a built-in analog-to-digital converter. The 6581 SID converts the POTX or POTY input signal into an 8-bit digital value between 0 and 255 that corresponds to the setting of the potentiometer. The 8-bit data word is passed out of the SID on the data bus into the 6510 MPU (U7) where it is acted on by your program. Game paddle 1 (POTX) can be read off the data bus by addressing location $D419 (54297), one of the SID registers. Game paddle 2 (POTY) can be read by addressing location $D41A (54298), the other analogdigital converter register in your computer's 6581 SID.

42 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE PUSHBUTTON— I (NC) BTNA/LP ■' J— 7> POTAX POTAY r JOYSTICK CN9 BTNA/LP • + 5 POTAX -POTAY ■JOYAO ■JOYA1 -JOYA2 • JOYA3 (NC = NORMALLY CLOSED) Fig. 2-26 Connect game paddles, a joystick, or a light pen to your computer via control port 1 connector CN9. PUSHBUTTON— J (NC) BTNB ,' — |

COMMODORE 64 OPERATIONS 43 PUSH ., BUTTON H A (PBA) 1 1 (CN9) PUSH BUTTON H B (PBB) (CN8) BTNA/LP6567 TO VIC (U19) Fig. 2-29. Push-button circuitry. from DO- D7, so bit 5 is actually D4 on the data bus). Your 6510 MPU acts on this push button input as instructed by the program you are running. Addressing $DC01 (56321) will access the 6526 CIA #1 port B register. Addressing $DC00 (56320) will access port A. The general way to read the push button value is: • Read port A or port B by PEEKing its address; • Do a logical AND with the contents of the address using $10 (16) as the logical operator; • Since the bit 5 position (PA4 or PB4) holds the information, the AND operation will look like that shown in Table 2-7. If the result of the AND operation is $10, you know the button has not been pressed (1 AND 1 = 1 or +5 volts). A value of $00 tells you a button has been pressed (0 AND 1 = 0 or 0 volts). Like many other features of your Commodore 64, the power is in the software you develop or buy, because that is what gets the most out of your machine's capabilities. If you're using a light pen, you connect the pen to control port 1 (CN9). The pen uses the push button input PBA as its input path to the 6567 VIC (U19) where the present X-Y position of the pen on the screen is latched into a pair of registers inside the 6567 VIC. The X position of the pen can be read by addressing $D013 (53267), the light-pen X position latch. The Y position ofthe pen is read by addressing $D014 (53268),. the lightpen Y position latch, in the 6567 VIC (U19). The joystick circuitry is shown in Fig. 2-30. Here, the five inputs from the game device (the fire button and four direction switches) connect via control port 1 for joystick A or control port 2 for joystick B to 6526 CIA#1 (U1). The digital joystick has four signals which determine the direction of intended movement. The fifth signal is for the fire button. These signals are shown in Table 2-8. Each switch corresponds to an input bit to port A or port B of the 6526 CIA #1 (U1). Notice that a joystick connected to control port 2 (CN8) connects to 6526 CIA #1 port A. The joystick is read by your program and interpreted under software control using your Commodore 64's 6510 MPU. Like the push button, the joystick direction switches are normally closed, placing + 5 volts (a logic 1) on a particular input line when the switch is not activated. Most programs use the AND function and a subtraction to isolate the switch, or switches, that have been activated. By ANDing the first four bits in the CIA Table 2-7. Bit 5 (PA4/PB4) Information PA7 PA6 PA5 PA4 PA3 PA2 PA1 PAO PORTA X X X D X X" X X (D-DATA) LOGICAL AND 0 0 0 10 0 0 0 ($10) RESULT 000D0000 ($10 or $00) (X - DON'T CARE)

44 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE LIGHT PEN BTNA7LP RIGHT LEFT DOWN UP BTNB RIGHT LEFT DOWN UP (C9) ■JOYA2 (CN8) 6567 VIC (U19) PB4 PB3 PB2 PB1 PBO 6526 CIA #1 -D4— -D3— -D2 — -D1 — PA4

COMMODORE 64 OPERATIONS 45' HOW THE SYSTEM WORKS Eagerly you sit down in front of your Commodore 64 system. Reaching over, you turn on the power to your display unit and 1541 disk drive. Lights flash, the drive whirs up to speed, and the display screen flickers to life. Then, with one motion, you slide your fingers over your computer's power-ON rocker switch and life leaps into the machine. Instantly, the screen lights up with the familiar: **** COMMODORE 64 BASIC V2 **** 64K RAM SYSTEM 3891 1 BASIC BYTES FREE READY. [] After inserting a floppy disk into the drive, you gently shut the drive door and place your fingers on the keyboard to type: LOAD "$",8 Press RETURN and the red drive-active lamp lights brightly while the drive whirs softly. Shortly, the screen flashes the message: SEARCHING FOR $ FOUND $ LOADING READY The disk directory has been loaded into your computer's RAM memory. After you type LIST and press RETURN, the directory of files stored on your diskette will be displayed on the screen. Cold Boot What does it mean to boot up a disk? When you first apply power to your Commodore 64, the 9 VAC and +5 VDC setting on the input to your computer's power supply produces the system's +5 volts. This voltage registers on the reset pin of your 6510 MPU and starts the boot-up routine. It's called a cold boot because the system was not energized before the boot. The word "boot" comes from "bootstrap" — pulling one up by one's own bootstrap. The system is being reset and initialized with all the start-up conditions necessary to operate and enable the human-machine communication interface. The bootstrap on your Commodore 64 is a machine language program stored in the top of ROM memory. The program is called the Kernal. It's also known as an operating system, or OS. It's the program that's used to start other programs (so to speak). Composed of a jump table and a lot of subroutines to which the program jumps, the Kernal activates certain devices or functions, or sets certain conditions. It's the Kernal (in the 2364A ROM) that lets you communicate with your computer through the keyboard. It's the Kernal that allows the computer to communicate to you by way ef the screen. The operating system is the program that organizes your Commodore's memory. It watches for your keyboard input, and it lets the various parts of your computer system "talk." It's the personality of your machine, and it's always there when you turn your computer on. The following is a flowchart of the actions that the Kernal initiates in your Commodore 64 from the time you turn on the power. APPLY POWER SYSTEM CLOCK STARTS + 5V RESET PULSE ON PIN 40 OF 6510 MPU -INTERRUPTS DISABLED -INTERNAL REGISTERS OF 6510, 6526, AND 6567 CLEARED -6526 CIA PORT PINS SET AS INPUTS -6526 PORT REGISTERS CLEARED -6526 TIMER CONTROL REGISTERS CLEARED -6526 TIMERS LATCH TO ALL TS -6581 SID AUDIO OUTPUT SILENCED CONTENTS OF LOCATIONS $FFFC AND SFFFD LOADED INTO 6510 MPU PROGRAM COUNTER MPU EXECUTES FIRST INSTRUCTION MPU RESETS STACK POINTER AND THEN CLEARS DECIMAL MODE (Continued)

46 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE JUMP TO FIRST BOOTSTRAP SUBROUTINE (CHECK FOR AUTOSTART ROM CARTRIDGE) (IF PRESENT, TRANSFER BOOT UP CONTROL TO CARTRIDGE) JUMP TO SUBROUTINE ADDRESS $FF84 (65412) INITIALIZE INPUT/OUTPUT DEVICES (SETS ALL I/O DEVICES AND PORTS TO DEFAULT CONDITION) -6526 CIA CHIPS SET FOR KEYBOARD SCANNING -6581 REGISTERS CLEARED JUMP TO SUBROUTINE $FFEA (65514) UPDATE 60 HZ TIMER SELECT BASIC MEMORY MAP CASSETTE MOTOR ON/OFF CONTROL SWITCHED OFF JUMP TO SUBROUTINE AT $FF87 (65415) PERFORM RAM TEST -NONDESTRUCTIVE INCREMENTING RAM ADDRESS TEST STARTING AT $0300 JUMP TO SUBROUTINE MEMTOP AT $FF99 (65433) (IDENTIFY AND SET TOP OF RAM MEMORY) JUMP TO SUBROUTINE MEMBOT AT $FF9C (65436) (SET BOTTOM OF MEMORY AT $0800 (2048) ALLOCATE CASSETTE BUFFER SET 1024 BYTE SCREEN MEMORY AT $0400-$07FF (1024-2047) SET I/O VECTORS TO DEFAULT VALUES -SUBROUTINE $0099 (0153) DEFAULT INPUT DEVICE TO DEVICE 0 (KEYBOARD) ENABLE KEYBOARD PORT -SUBROUTINE $009A (0154) DEFAULT OUTPUT DEVICE TO DEVICE 3 (CRT DISPLAY) ENABLE VIDEO PORT ESTABLISH INDIRECT JUMP TABLE IN LOW PART OF RAM MEMORY CLEAR KEYBOARD i CLEAR SCREEN I RESET SCREEN EDITOR VARIABLES ACTIVATE BASIC AT $A000 (40960) PRINT CHARACTERS ON SCREEN PUT CURSOR ON SCREEN I WAIT FOR KEYBOARD COMMAND ACTION BY YOU The rest is up to you. The system will sit and wait until your interaction with the keyboard tells it what to do. Warm Boot During operation, the occasion could come up where you need to use the RESTORE key. This action initiates what is known as a warm boot. It's called "warm" because the system had been energized and used before the RESTORE pulse occurred. When you press the RESTORE key in conjunction with the RUN/STOP key, a nonmaskable interrupt is produced which causes the system to reset itself to its initial condition values. The result is that the memory and display return to default condition, the system is returned to BASIC and the keyboard awaits input. SOFTWARE STRUCTURE Three types of software are supplied when you purchase a disk-drive Commodore 64 computer system. 1. System monitor (Kernal operating system) 2. BASIC high-level language 3. Disk operating system (DOS) The Kernai operating system lets you initialize your computer and enable it to receive keyboard entry

COMMODORE 64 OPERATIONS 47 and generate screen display. This program resides in the 2364A Kernai ROM (U4). Each Commodore 64 comes complete with the high-level language BASIC stored in ROM. BASIC is an interpreted language. Each instruction is read, interpreted, converted to machine language code, and acted upon before the next instruction is read and so on. With a compiled language like FORTRAN, all the instructions are read, interpreted, and converted into machine language before being acted upon. While com piled-language programs run faster than interpreted-language programs, BASIC is simple to learn, making the programs easy to write. And many youthful entrepreneurs have become millionaires writing useful software in BASIC. The third ingredient for a complete software system is the disk operating system (DOS) Your Commodore 64 disk operating system handles reading and writing disk-stored information and lets you format disks, copy disks, and even catalog the programs or files you've saved. With your system, DOS is permanently stored in a ROM on the printed-circuit card inside the 1541 disk drive unit. Each time you access device 8 (or another disk drive device number, depending on how many drives you're using in your system), your computer is activating the disk operating system within the drive. IN SUMMARY In this chapter, you learned what a basic computer is made of and how your Commodore 64 works, from a hardware standpoint. You saw that memory, I/O, and the MPU all perform vital functions in this computer system. You learned what happens inside your computer when you turn power on. And you learned that several kinds of software are required to make your Commodore 64 a functioning system. In the next chapter, we'll get into some specific failure symptoms and the troubleshooting procedures to determine the source of a problem.

. CHAPTER 3 Basic Troubleshooting In Chapter 3, you will discover what troubleshooting is all about. Like automobiles, computers break down after a lot of use. Some break down sooner than others. Finding what failed can be easy or difficult, depending on your understanding of how to analyze a problem, identify the failed part, and step toward the correct repair. This chapter will show you how to find problems in your Commodore 64 in the shortest amount of time. INTRODUCTION TO TROUBLESHOOTING Imagine for a moment that you're in the midst of printing a lengthy analysis report when suddenly the printer halts, the screen display goes blank and your Commodore ceases to function. What do you do? What failed? This chapter is devoted to a subject we often wish we could ignore— trouble. Trouble is like a flat tire: no one wants one, but when it occurs we all wish we could fix it quickly and get the experience behind us. Knowledge and action are required to overcome trouble. You know from reading the owner's manual that came with your computer, that it's a digital machine; it operates in binary, where every condition is true (logic 1 ) or false (logic 0). A digital computer like the Commodore 64 generally doesn't break down slowly, or with graceful degradation. If it fails, it's usually with a hard, consistent failure. In addition, the digital devices that make up your Commodore 64 function within strict rules of logic. The most effective way to respond to a failure in these devices is to think the problem through just as the machine operates, logically. Understand what should happen and compare the "shoulds," one by one, with what is really happening. An interesting deductive technique called troubleshooting is particularly appropriate for solving digital equipment failure problems. Troubleshooting could be a really frustrating experience if you were left to struggle through the process by yourself without a good guide. This book provides you with techniques for quick and easy troubleshooting and repair. STEPS TO SUCCESSFUL TROUBLESHOOTING Effective and efficient troubleshooting requires gathering clues and applying deductive reasoning to isolate the problem. Once you know the cause of the problem, you can follow a process of analyzing, 49

50 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE testing, and substituting good components for each suspected bad component to find the particular part that has failed. The use of special test equipment such as logic probes and logic clips can speed the analysis; but, for most failures, good old brain power can suffice quite well. Once the problem has been isolated to a group of chips, deductive analysis changes to intelligent trialand-error replacement. Reducing the number of suspected chips to just a few and using intelligent substitution is the fastest way to identify the faulty device in the least amount of time. In general you can follow these Commodore Optimum steps to success when your computer fails: 1 . Don't panic. 2. Observe the conditions. 3. Verify failure. 4. Use your senses. 5. Retry. 6. Document. 7. Assume one problem. 8. Diagnose to a section (fault identification). 9. Localize to a stage (fault localization). 10. Isolate to a failed part (fault isolation). 1 1 . Repair. 12. Test and verify. The following pages discuss these steps to troubleshooting success in detail. LOOKING AT THE COMPONENTS Every computer is composed of functional sections as shown in Fig. 3-1. Any of these sections can fail. When something goes wrong, the first step is to determine whether the trouble results from a failure or just a loose connection or human error. Once you're sure a failure has occurred, the next step is to determine which functional section of the system is not operating — disk drive, keyboard, display, or some other part. Then, step by step, break each section up into stages and try to track the trouble to a single component. If a display isn't working, for example, the problem could be in the display monitor itself, in the video cable, or in the video circuity of the Commodore 64 POWER PROGRAM MEMORY (RAM/ROM) MASS STORAGE (DISC/TAPE) MPU OTHER PERIPHERAL I/O DEVICES CLOCK SPEAKER KEYBOARD DISPLAY Fig. 3-1. The parts of your Commodore 64 computer. VIDEO OUTPUT CIRCUITRY STAGE VIDEO CABLE INTERFACE STAGE Fig. 3-2. Stages of the video display function. computer. (Fig. 3-2). Each of these can be considered a stage of the video display functional section. Chips Take a look at one of the chips on the Commodore 64's motherboard. (Open the machine if necessary, using the guidance given in Chapter 1.) Notice how each chip has a notch or groove at one end as shown in Fig. 3-3. This marks the end of the chip where pin 1 can be found. Pin 1 is to the left of the groove as you look down on the top of the chip with the groove facing away from you. The pins are numbered counterclockwise starting from pin 1, so that the highest-numbered pin is directly across from pin 1 . As you'll learn later, in chip replacement, you must insert the new chip into the socket with pin 1 in the right place. Chips have special markings that tell a lot about what's inside. Look at the printing on the top of the chips on your motherboard. First, you'll notice that many different companies make chips and that many of these companies are outside the United States — in Japan, Malaysia, Indonesia, and El Salvador, for example. Some companies place their logo on the chip. Commodore, which makes its own custom chips, has its own logo. Some of the logos you'll see represented in the Commodore 64 chips are shown in Fig. 3-4.

BASIC TROUBLESHOOTING 51 PIN1 You'll also notice letter-number combinations on the chips. Some chips have two sets of letter-numbers. One set identifies the type of device, and the other set tells when the chip was made. The first, or primary, set of letter-numbers is called the manufacturer's type number or manufacturer's device code. It appears in three sections as shown in Fig. 3-5. S N 7 4 L S 1 6 1 A N / PREFIX I CORE NOMBER \ SUFFIX Fig. 3-3. Identification of pin 1 on an integrated circuit. Fig. 3-5. The manufacturer's device code for a 74LS257 chip. COMPANY ADVANCED MICRO DEVICES AMERICAN MICROSYSTEMS COMMODORE SEMICONDUCTOR F FAIRCHILD HARRIS HITACHI MONOLITHIC MEMORIES MOSTEK ® MOTOROLA NATIONAL SEMICONDUCTOR OKI OKI JAPAN STANDARD MICROSYSTEMS SYNERTEK 3> TEXAS INSTRUMENTS Fig. 3-4. A sampling of the logos you might find on ICs in your Commodore 64 computer. The prefix ("SN" in SN74LS257AN) is usually used to identify the manufacturer, although sometimes it is used to identify the device family (also associated with a manufacturer) or a temperature range (N = commercial temperatures, S = military temperature requirements). The prefix is sometimes omitted. In Fig. 3-5, the SN represents the company Texas Instruments. All the chips on the Commodore 64 motherboard are listed in the Appendix. The core number is three to six digits long with a letter or letters in the middle. It indicates the basic logic family. Most of the chips on the motherboard are 74xx series, which represents TTL (transistor to transistor logic). The core number 74LS257 represents a Quad 2- input tri-state digital multiplexer. The letters in the middle of the number describe particulars about the logic used in the chip, such as speed or power. In Fig. 3- 5, the LS stands for low-power Schottky, a particular type of TTL design. The suffix represents the package type or temperature range. Usually it describes the package type. In Fig. 3-5, the AN in SN74LS257AN denotes a dual in-line package (DIP) — a type of chip. Other package types include the flatpacks, single in-line package (SIP), and leadless chip. The second letter-number combination on a chip represents the manufacturer and the year and week the chip was made. On one chip in my computer, for example, the number 8108 are printed below the manufacturer's device code. This represents 1981, week 8, the date of manufacture of this chip. Likewise, the chip in the lower left corner of your Commodore 64 motherboard marked "MC3456" and "8114" is a dual 555 timer manufactured by Motorola in the fourteenth week of 1981.

52 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Capacitors In addition to chips, your motherboard has mounted on it a number of devices called capacitors. Fig. 3-6 shows what some of the capacitors look like so you can pick them out on your motherboard. Capacitors come in several varieties: (1) Electrolytic, (2) Tantalum, (3) Film, and (4) Variable. The first two are found on the Commodore 64 boards. TANTALUM CAPACITOR (C10) ELECTROLYTIC CAPACITOR (C17) Fig. 3-6. Two types of capacitors found on Commodore 64 main circuit boards. Capacitors are measured in farads and fractions of farads. You'll see values listed in "yF' for microfarads and "pF" for picofarads. Micro means to the sixth decimal place or .000001 (one millionth) and p/co means to the twelfth decimal place or .000000000001 (one trillionth). Capacitor (cap) value identification is one of the most challenging tasks you can encounter, because most companies use their own identification standards. On the side of C17 in your Commodore 64 computer, you'll find the numbers "25 V" and "10 \x?." This means that C17 is a 10-microfarad capacitor and is rated at 25 volts. On the side of another cap, C10, is printed "222 K." The first two digits (22) represent the significant figures. The last number (2) represents how many zeros to add after the first two numbers to get the true value in picofarads. Thus 222 represents 2200 picofarads which is the same as .0022 microfarads. Resistors Fig. 3-7 shows the three types of resistors found in the Commodore 64 circuitry. Resistors are used to restrict, or limit, the flow of electrical current through the board's circuitry. One type of resistor is the carbon film device shown in Fig. 3-7C. The value of resistance is given in ohms, and can be determined by comparing the color bands with the colors in Table 3-1. For example, R9 (over by the video jack at the top right of the Commodore 64 board) has the color code violet-green-black-gold. The first two bands describe 3.3K 1 1 u u u u ill ) _ 4111 (A) VARIABLE RESISTOR (R25) Fig. 3-7. (B) (C) RESISTOR CARBON FILM NETWORK RESISTOR (R43) Three types of resistors. Table 3-1. The Resistor Color Coae Cr Color Digit Multiplier BlacC 0 1 Brown 1 10 Red 2 100 Orange 3 * 1000 Yellow 4 10000 Green 5 100000 Blue 6 1000000 Violet 7 Gray 8 White 9 Gold ± 5% tolerance Silver ± 10% tolerance the primary number. The third band represents the number of zeros to add to the primary number. The last band is the tolerance value, jor how close to the color band value the actual value must be. As Table 3-1 shows, the violet band stands for 7, the green for 5, and the black band for 0, or no zeros after the 75. Thus, by using Table 3-1, R9's value can be found to be 75 ohms. This matches the value given on Commodore 64 schematics. The gold band represents a 5 percent tolerance value (this means the actual resistance value can be plus or minus 5 percent from the 75 ohm designation). Resistor R25 (Fig. 3-7) is called a variable resistor. This resistor is used to fine tune the color video output signal going to your monitor. Its resistance can be varied between 0 ohms and 1000 ohms (1 K ohms). The value of a variable resistor is stamped on the side or top of the device. A recently developed electronic device, the resistor network (shown in Fig. 3-7) is actually a group of resistors built into a single in-line package (SIP) or a dual in-line package (DIP). Several SIP resistor networks are mounted on the board. These resistors are designated "RAxx" or "RPxx." The resistance designation of network resistors can be found by noting the numbers printed on the side of the package. Resistor network RP4 is marked 3300-1 1 1 . The 3300 refers to the resistance (3.3K ohms). The 1 1 1 refers to a manufacturer's type number which is not of interest to us here.

BASIC TROUBLESHOOTING 53 Inductors Fig. 3-8 shows two types of inductors found on the Commodore 64 board. Near the power input connector (CN7) is a color-banded inductor labelled "L5" (Fig. 3-8A). The other type of inductor is smoke gray in color and doesn't have markings (Fig. 3-8B). The part of the motherboard just below this unmarked inductor is labelled "LA" =or> INDUCTOR INDUCTOR

54 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE a capacitor, these devices can be expected to last for 100,000 hours, or II. 4 years of operation. Resistors can absorb too much current and actually bake-in the circuit. The result is usually an open circuit with shorting during the "melt-down." All of the devices mentioned so far are solid state. They are constructed of materials (metals, plastics, oxide, etc.) that change as the components age or are subjected to severe temperatures or high voltages. Such a change can cause the device and the circuit or system to function strangely. Fortunately, Commodore 64 motherboards are not subjected to high voltages; but, they do get pretty hot, and this can affect the operation of the components. When we use our computers we place the circuitry, and especially the chips, under a lot of stress. First, they heat up when we turn on and use our computers. Then they cool down when we turn the machine off. They heat up when we turn the machine on again. This hot-cold-hot effect causes circuits to fail sooner than expected. The thermal stress can cause a break in the connection of a wire leading from inside the chip to a pin, producing an open circuit, which requires chip replacement. Even if there is no break in the chip or lead connection after exposure to high voltages or temperatures, the operating characteristics of a device can change. A chip may work intermittently or simply refuse to work at all. An output can become stuck at 1, or stuck at 0, no matter what the input signal is. Theoretically, a wearout failure like this won't occur until after several hundred years of use, but we shorten the life span of the chips by placing them in high-temperature, highvoltage, or power-cycling environments that cause them to fail sooner. Other problems occur outside the chip — between the chip leads and the support structure pins which connect the device to the rest of the computer through the socket. Such failures include inputs or outputs shorted to ground, pins shorted to the + 5-volt supply, pins shorted together, open pins, and connectors with intermittent defects. Most commonly, trouble results from opens or shorts to ground. Chips fail far more often than diodes or transistors, because chips that are the same size as single (discrete) diodes or transistors contain many tiny circuits that produce more heat and, therefore, more thermal wear. Chapter 5, "Routine Periodic Maintenance," tells more about heat effects. If you keep your computer cool and clean, it should work well for many years. HOW DISK DRIVES FAIL Disk drives give us the ability to save and load software at almost unbelievable speeds. These "boxes" are some of the most complex collections of electronics and mechanical hardware ever constructed. Thousands of tiny magnetic signals are stored on each disk that is placed into one of these drives. We expect disk drives to save all of our programs and data accurately and quickly, and to. load the information back into our computer without a single lost number or letter. And they do. Disk drives will give you months of faultless service if you do your part, operating them carefully and providing tuning and periodic cleaning. But sometimes we forget. We operate our drives as someone nearby puffs on a cigarette, tapping ashes onto a tray at the side of the drive. We smile as we jam a disk into the drive and then slam the drive door closed. And then one day, that horrible DISK ERROR message appears and the drive gives up the ghost. Now what? What/kinds of failures can occur with disk drives? One kind of failure is an undesirable change in the drive rotation speed which affects the reading and writing of information on the disks. The speed is adjusted for approximately 300 revolutions per minute. As the speed varies from this optimum, disk read and write errors begin to occur. Rough handling in disk insertion and removal can cause misalignment of the read head. Misalignment can also be caused indirectly by the dust and smoke that settles on the components inside the disk drive. These particles interfere with the natural escape of heat. If the temperature inside the drive becomes too high, the plastic head holder can warp, causing head misalignment. Overall, misalignment is not an easy thing to fix and usually requires special software and alignment tools. HOW DISPLAYS FAIL Most of us don't anticipate failure of a display monitor. But why not? Monitors are like television sets. And you know from experience that sooner or later your TV will develop a problem and need repair. Part of the reason displays still fail is that the cathode ray tube (CRT)— the screen you look at when you work with your computer — is the only new electronic device that still uses a vacuum tube. In fact, the CRT is probably the only modern electronic component that is guaranteed to wear out.

BASIC TROUBLESHOOTING 55 The letters and numbers you see on your screen are displayed there by electrons striking the back side of the screen. The electron streams get weaker as the CRT ages. You can correct some of the effects of age, but others require a service center, since it's better not to open up the display unit and expose yourself to those dangerous high voltages. Here are some possible video display failures: A short inside the CRT can result in a humming noise and a bar across the screen, very poor contrast, a bright beam on the screen, or even diagonal lines on the screen. An open or disconnect inside the CRT results in no characters being displayed on the screen. Bright "bloomy" letters and poor intensity control are caused by tube age. The center of the CRT has worn so that you can get normal brightness with the intensity turned down as far as possible, but black is really black, and gray shades are poor or not displayed. When the screen edge won't display, or the picture is fuzzy, a deposit has formed on the inside of the screen causing reduced brightness and fuzzy display. The deposit is thicker at the outer edge of the CRT. With no picture, brightness and intensity controls have no effect. Marginal performance results in display monitor performance that is less than optimal. Monitors, like computers, printers, and other electronic equipments, are affected by dust and dirt. These pollutants coat the components inside the chassis and cause heat to build up. And you know (now) what heat can do to your equipment. In general, CRT failures cannot be corrected by anyone other than a trained service technician. The voltages inside the chassis of your monitor reach as high as 25,000 volts. These levels can be lethal if you make a mistake. The only adjustments that you should attempt are those that can be accomplished from outside the chassis. If you see holes for alignment in the back of the chassis, you'd be better off keeping out of these too; but if you feel experimental, be sure you use a plastic alignment tool (looks like a thin pen with screwdrivershaped ends). OTHER FAILURES Some failures can be caused by overzealous or undertrained repair technicians. The following is a list of some common failures and their causes. Bent or broken pins; insert those chips carefully. You can only straighten those pins so many times before they break off completely (Fig. 3-1 OA). In addition, be careful not to install a chip upside down or in the wrong slot. (A) Broken pins (B) Solder splash Fig. 3-10. Bent or broken pins can cause failures. Solder "splashes" are tiny balls of solder dropped from the end of the soldering pencil onto the top of the board that short out some of the circuit (Fig. 3-1 OB). Devices "blown-up" in handling occurs when someone picks up ROM, MPU, CIA, SID, or VIC chips before touching the top of the power supply case or otherwise grounding any static electricity. Liquid "fry" occurs when someone accidentally spills a liquid into the top of the keyboard while the computer is running. Overheating can be caused by operating your machine in an environment where dust can be attracted to the inside of the computer and form layers on top of the components. This prevents component-generated heat from escaping. The interface that won't work can be caused by corroded connections or by cables being improperly connected. Cables plugged in just one pin off blow lots of chips. Radio frequency interference (RFI) ribbon cables don't have much protection from RFI, nor from magnetic fields produced around high voltage machines or power cords. Printers may print garbage or not print at all, because the ribbon cable connecting the computer to the printer was running right beside or through a loop in a power cord. Another source of trouble is connecting or disconnecting interface cables or plugs while your machine is turned on. This has been known to fry a lot of chips also. Caution: Never insert or remove an interface or peripheral device without first turning off the power to

56 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE the computer, and reaching around on the side of the Commodore 64 and pulling the power plug out of the socket. FINDING FAILURES You may be convinced that computer parts are pretty good, but they can fail. How do you locate the failure? There are three ways to localize failures, or find out which computer part is broken: (1) the hardware approach, (2) the software approach, and (3) the Commodore-Easy approach. Hardware Approach In the hardware approach, we use troubleshooting tools to measure voltage (logic) levels in the circuitry of the computer. These tools include the logic probe, the logic pulser, the current probe, the oscilloscope, the multimeter, the logic analyzer, and the. signature analyzer. This approach requires some knowledge of electronics and test equipment. It is usually used as a last resort; we'll cover the hardware approach in Chapter 6, "Advanced Troubleshooting." Software Approach The software approach is a troubleshooting method widely used by computer repair technicians. As long as the disk drive will boot up properly, you can often find the failure by using diagnostic software. Diagnostic Software Watching strange things happen to your computer system can be frustrating. Often you can't be sure immediately if you caused those weird characters on the screen or if the Commodore is sick. It's better not to start taking the system apart for failure analysis if the machine isn't really broken. There is a way to determine that the system is healthy and that the errors are probably in the software program you're trying to run. If the error is repeatable and the system drive still boots up, you can insert a diagnostic disk into your Commodore system and run a series of programs that test the condition of the computer. These self-test routines can leave you at least 95 percent certain that your computer is working properly and that the problem is in your software. The quality of different self-test packages is measured by the level of confidence one can have that the component identified as bad by the software is indeed faulty. Confidence level is determined by the probability that the diagnostic identification is correct. Some diagnostics are advertised as only 60 percent accurate; other companies say that their software test package has an 85 percent confidence factor. Diagnostic programs are available from several companies and they test main memory, system ROM memory, the MPU, the monitor, the game ports, the keyboard, the disk drive speed, and some peripherals. For example, Human Engineered Systems of Brisbane, California, markets a. diagnostic program called "Hesman." Diagnostic programs can also give you indications of potential faults before they become hard problems. For example, some diagnostic software tells if the disk speed is too fast, too slow, or within a speed range where reading and writing data can occur without errors. These diagnostics measure the mechanical operation of your disk drives and are helpful in periodic preventive maintenance. The most common diagnostic programs check the system's random access memory (RAM) and some of the I/O. Some routines check the operation of the CPU itself, but these usually locate only minor errors. It's difficult for an MPU like the 6510 to run a test on itself. Most diagnostics assume that the MPU is working properly. Some memory diagnostics test whether the computer is properly setting and clearing individual bits in memory and also if store or write operations are affecting more than one memory address location at one time. The main-memory tests work in this manner. This form of testing shows if test data can be correctly loaded into one specific location in memory. If the data value changes in a location after writing to that address, a "storage error" has occurred and a message is printed on your screen. If the data is stored in several different memory locations at the same time, an "addressing error" has occurred and this, too, is noted on your screen. We're fortunate with our microcomputer diagnostics compared to most minicomputer diagnostics which only identify faults to the board or module level. Most of the Commodore 64 diagnostics can reveal faults down to the chip level, especially in memory. A majority of minicomputer diagnostic programs only report faults to the board level because customers in large companies usually depend on the computer manufacturer's field service representatives for repair support. In this case, the diagnostic is used as

BASIC TROUBLESHOOTING 57 an improved user interface. The user can relay to the computer service center what the diagnostic tests have determined and shorten the field service technician's troubleshooting and repair time. The majority of diagnostics test and measure the performance of the main memory. All the routines I researched tested for addressing and storage errors. There are many algorithms (routines) for testing memories. Table 3-2 lists the most common memory tests. Table 3-2. The Most Common Memory Diagnostic Tests Simple Store and Read Sequential Numbers Test Rotating Bit Test Walking Bit Test Dual Address Test Butterfield Test Sum Test Simple store and read teststores a known value in every location in a selected block of memory. Then it reads the contents of each location to ensure that the value was correctly stored. It is a "quick and easy" rough test. Sequential numbers test involves sequentially storing all the binary number combinations for an 8-bit word into a block of 256 memory locations. Then, beginning at the first address location, the test reads out the data words stored, comparing each to the value that should be there. If the data is correct, the routine displays "all O.K." and the test moves on to the second location. If an error is found, the program displays an "error" symbol on the screen and the test starts over at the next (third) address location. The test repeats until vou reset your system. Rotating-bit test is a better memory test involving a rotating bit. This algorithm checks each address location to see whether a binary bit that is stored in one of the eight positions in a binary 8-bit data word will incorrectly set another bit in the same word. This test starts by loading the binary number 0000 0001 into the lowest RAM address space. The contents of this address are then read out and verified. If the 0000 0001 was correctly stored, the bit is then shifted left one place to 0000 001 0, and the test is repeated. If one of the bits was incorrectly set (e.g., 0001 0010— bit 5, fifth from the right, improperly set to a one) the error is displayed on the screen. After the set bit (the 1) is shifted through all the binary combinations, stored in that same address location, read out, and verified, the entire test starts over at the next memory address location. Walking bit test is a slight improvement to the rotating-bit test is achieved in this algorithm. All eight bits in a starting location are set to zero, or "cleared." Then the first bit is set to "1" (0000 0001), as in the rotating-bit test. The program tests the other seven bits to see if they have changed from zero to one. Then all zeroes are stored in the location and the second-bit position is set to one (0000 0010). Again the other seven bit positions are tested. This process walks through. each bk in that memory location, setting each bit to one and testing the other seven positions. Next, the values are all-reversed. All the cleared bits are set to 1 and the set bits are cleared to 0, and the entire process begins once more, but now as a rotating zero test. This test is quite time consuming. Apparently, it can take over 13 hours to check a 16K byte area of RAM. And it can take over 52 hours to test 32K bytes of memory! Dual-address test accomplishes a more thorough addressing check. Starting with the lowest memory address in a selected block of memory, the program stores all zeros into the area (clears it to zero). It then stores all ones (1111 1111) into the first location and checks all other locations to see if any other memory address received any false ones. If all other locations are still "zero-loaded," the test location is cleared (written into with all zeros) and the test shifts to the nexthigher address, storing all ones in this location and then testing all other memory locations. This test repeats until it reaches the end of the selected memory area. Butterfield test, named for the man who wrote it, is a variation of the dual-address test and is in the public domain. In this diagnostic routine, all ones are stored in every location of the selected memory area. Then all zeros are stored in every third address location starting with the first address. The algorithm then checks the contents of every memory address to make sure the stored values are correct. Next, the program shifts the locations of the "allzeros" word twice, using the second and then third locations in the memory as starting points for the everythird-location store-zero action. After the three-pass test finishes using zeros in a memory field of all ones, the bits are reversed and all ones are stored in every third location of an all-zeros memory field. If an error is found, the program stops and the address of the error is displayed. If no error is detected, the program ends and the top address plus one is displayed on the monitor.

58 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Sum test the most sophisticated memory diagnostic test, stores a unique data word in each location of memory to be checked. The data word is the sum of the two bytes which make up that memory address. (It takes 1 6 bits to address 64K bytes of memory and 1 6 bits is two 8-bit bytes.) Since each succeeding address is one location higher, the stored value increases and is consistently unique to that address. The algorithm then checks for correct value storage. If an error is found, the program displays the error and its location on the screen. This diagnostic test is time consuming also. We recommend checking small blocks of memory rather than testing all of the RAM because testing time quadruples for each doubling of the amount of memory tested. Sett-diagnosis There is a trend toward building diagnostic capability into peripheral equipment like printers and plotters. A different problem arises, however, when testing disk drives and printers. These machines function both electronically and mechanically. Many of the electronic controllers on these machines now do some form of self-diagnosis each time the system is powered up. These tests check for faults in the electronics. Mechanical components, on the other hand, are inherently less reliable than electronics, so peripherals containing mechanical parts must regularly have their internal operational status checked. Most of the conditions monitored on printers are operator related, such as paper out or ribbon out. Disk-drive diagnostics essentially measure mechanical parameters like speed and head alignment. Disk speed adjustments and head alignment are discussed in Chapter 5, "Routine Periodic Maintenance." You can find an assortment of disk-based diagnostic programs advertised in various computer magazines. All of these "canned" diagnostic packages use some version of the seven test algorithms described above. Each diagnostic program is a valuable addition to your troubleshooting toolbox, but is of little value if your system won't boot or display. Commodore-Easy Approach When a chip comes to the end of its useful life, a catastrophic failure usually occurs — it cooks itself internally. Although you can't always see the chip defect, you can find the problem without much effort. Don't assume, however, that you've had a catastrophic failure every time your computer stops working. In most cases, using the Troubleshooting Index will help you locate and correct the trouble quickly; but, for those problems not as easy to identify, the following discussion offers some guidelines for success. Don't Panic. You now have a manual that will help. Observe. What conditions existed at the time of failure? What actions were in progress? What program was running? What was on the display screen? Verify failure. Sometimes a failure is caused by a random glitch in the system or even operator error. Often the failure is caused by a software problem. Sense. Is there any odor present from overheated components? Does any part of the system feel overly hot? Retry If the power light isn't on, check the power plug and the power cord. Is the plug snug in the back of the computer? Is the other end of the power cord plugged into a wall socket? Is the wall socket working? If any of these isn't right, correct the problem and try again. If your problem involves the display, the printer, or other peripheral equipment connected to your computer by cable, turn the power to the system off, disconnect the power plug from the computer, and then reseat all the connector cables associated with the failure. Cables often work loose if they aren't clamped down. Once you've checked the cable connections, reconnect the power plug, power up, and retry. If a disk didn't boot, try the disk in another Commodore 64 computer. Or, try booting a copy of another program disk. Use a copy of a program disk so you can recopy on the same disk if the data stored on it is changed or erased. If your disk drive still won't work and you have a second disk drive, reconfigure your system (by software) so the second drive is now device 8 and the first drive is device 9. Try to load a program from the disk drive again. Try to boot up another program disk copy. These are two ways to isolate a boot problem to software failure or to a faulty drive.

BASIC TROUBLESHOOTING 59 6. Write. Document all that you see and sense. Write down all the conditions you observed at the time of the failure. Write down what conditions exist after the failure has occurred. What is your computer doing? What is it not doing? What is being displayed? Is power still indicated on each part of the system? 7. Assume one problem. In digital circuitry, the likelihood of having multiple simultaneous failures is low. Usually, a single chip (device) malfunctions, causing one or more symptoms. 8. Diagnose to section. Analyze and decide what section or division of the machine failed. Is it the display, the input or output, the keyboard, the memory? You can troubleshoot to a failed section by knowing how your computer operates and what the component parts do, by inspecting it inside and out, and by observing symptoms. 9. Consult symptom index. An index of the most common troubles is in Chapter 4. If the symptoms you see match a problem described in the "Troubleshooting Index," turn to the referenced page and follow the instructions under "Troubleshooting Procedure." Caution: Any time you connect or remove an interface, be sure the power is off and the power cord disconnected. 10. Localize to a stage. Turn off the power to the computer (the power light on the keyboard should be off), and then remove the power cord plug from the side of your computer. Disconnect all the peripheral hardware connected to your Commodore 64, including the 1541 disk drive. Reconnect the monitor and the power plug to the computer, and power up both the computer and the monitor. Press RUN/STOP and RESTORE. Observe the correct screen message. If the message display is not correct, refer to symptom "Won't start, power light on" in the chapter on "Specific Troubleshooting and Repair." If the correct message is displayed, turn off the power. (Remember to pull the power cord plug out of the side of the computer.) Reconnect the 1541 disk drive to the computer. Power up the disk drive and monitor, and then the computer — in that order. If the drive runs, try booting a copy of the system demonstration disk. If this action is unsuccessful, refer to Troubleshooting Index symptom "Won't boot, power light on, drive keeps running." Ifthe disk boots, secure the system by turning off the power. Pull the power plug out from the side socket,, and reinstall the peripheral cables one at a time. Each time you reconnect a peripheral, plug in the power cord, power up the peripheral, and turn on the computer. Then try loading and running a program with the demonstration disk. Power down after each successful test. Reconnect and test each peripheral until the system fails. You then know that the most recently tested peripheral is bad. If no peripherals are found to cause the failure, you probably had some corrosion on a peripheral's connector pins and just pulling out and reinserting the connector cleaned the contacts enough to restore operation. However, if the system is still inoperative with all the peripheral boards removed, move on to step 1 1 . 11. Isolate to failed part. Following the procedures in the chapter "Specific Troubleshooting and Repair," substitute chips you know are good, one at a time. After each substitution, reassemble the system enough to power up and test the repair. This process will probably locate the trouble. A loose chip could be your whole problem, so check each one before you begin substituting. Chips have a tendency to work themselves out of their sockets under normal operation. Chip replacement may look easy, but there are some pitfalls. Chips that are soldered into the motherboard are difficult to remove. The circuit board traces are pretty fragile and the slightest overheating of a trace can cause it to lift up off the board. Also the fragile pins on chips that are socketed are also potential problems during replacement because they bend easily, and it doesn't take very many straightening actions to break a pin off. Sometimes the computer's problem is caused by noise— electrical noise, the kind that

60 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE produces static on your radio. This noise affects computers; and computers can cause this noise. Your Commodore 64 (especially the older models) could play havoc with a television set placed too close. Newer models were improved and don't let out much computergenerated noise. Our concern, though, is with outside noise getting into the system and causing data loss or wrong data to be stored or displayed. The message is this: Keep your cables clear and away from power cords, especially coiled power cords. And don't try out your new drill next to your computer while computing. Sooner or later you will be confronted with once-in-a-while failures called intermittents. These can be a source of great frustration. The only real difference between a hard (constant) failure and an intermittent problem is that the intermittent shows up randomly, or only at certain times, usually when you least expect it. If you make the intermittent become a hard failure, its cause can be found by using standard troubleshooting methods. Since intermittent failures can be caused by shock, vibration, or temperature change, duplicating these conditions can help find and correct the intermittent. Here are some helpful hints regarding this type of failure: Caution: The following steps are conducted with the cover lid removed and with the computer operating. Be careful not to short out any connectors or pin leads. Use only a nonmetallic or wood object to probe components inside an energized Commodore 64 computer. With the power off, check, clean, and reseat all connector boards and cable plugs. With power applied, tap gently at specific components on the the suspected board, using a nonmetallic rod or screwdriver. Heat the suspected area with an infrared lamp or hair dryer. Don't overheat it. Spray canned coolant on a suspected component. If you have a component that is on the threshold of working or not working, it can sometimes be found with this technique used by service technicians. Several companies sell pressurized cans of coolant spray that have long plastic extender nozzles for pinpoint application on top of a suspect chip. By cooling the device, with the computer operating, you can identify chips on the verge of total failure. The system works for a few moments until the chip heats up again and starts acting erratically. Be careful not to tip the spray can over too far since some cans leak propellant if held at too sharp an angle. •After you've located the problem area, use a strong light and a magnifying glass to look for small cracks in the wiring or solder connections. If the problem is a marginal chip, replace it. Be sure your replacement chip is the same logic-family construction (e.g., replace a 74LS74 with another 74LS74). A large section of Chapter 5 is devoted to identifying and solving the intermittent problem. For now, good cleaning, pin and board reseating, and insidethe-case temperature control will prevent the occurrence of most random failures. Signal tracing is the final method for isolating a fault to a component. This technique will be covered in the advanced troubleshooting chapter. 12. Repair A disassembly and reassembly guide is located in the Appendix. Chip replacement takes a little practice before you can remove a chip without it jumping out of the socket and sticking in your thumb or index finger. Fortunately there are several devices that make the job much easier —the tiny screwdriver, or tweaker, and the IC extractor tool. Fig. 3-11 demonstrates how each tool can aid in removing stubborn chips that are snug in their sockets. Getting the chip out is only the first part of the repair. Next, you have to put the new chip in the socket. Here's how to do it. Line up the pin-1 end (with the notch or dot) with the pin-1 location on the socket. (Notice the way all the other chips around this socket are mounted.) Place the chip over the socket, lining up one row of pins with its socket holes as shown in Fig. 3-12. With the chip tipped at a slight angle, press down gently— causing the row of pins in contact with the socket to bend slightly, letting the other row of pins slip easily into their sockets, as shown in Fig. 3-13.

BASIC TROUBLESHOOTING 61 Fig. 3-13. Once each row of pins has been started into the socket, you can press down gently to complete the chip insertion. Fig. 3-11. Removing ICs from your Commodore motherboard. ig. 3-12. Place the chip over the socket as shown. Press the top of the chip down firmly to seat the chip completely into the socket. Be careful not to flex the board too much. If necessary, support the motherboard with the fingers of your other hand as you press the chip into place. Some cautions: • Make sure you don't put the chip in backwards. The notch or dot that marks the pin-1 end of the chip will help you correctly line up pin 1 on the chip with pin 1 on the socket. • Don't offset the chip over the socket by even one pin, as shown in Fig. 3-14. • Don't force the chip down causing any of the pins to hang out over the socket or to bend up under the chip. • An easier way to install 14- and 16-pin chips is to use a DIP insertion tool. You slip the chip in the end of the hand-held tool and then position it over the socket holes and insert it easily by pushing down on a small plunger at the top end of the tool. There is no such device to handle the custom chips with 24 or more pins on your Commodore 64 motherboard.

62 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Fig. 3-14. Be careful you don't offset the chip by one pin. 13. Test and verify This is an important step. We need to know whether our system works now. First energize the peripherals, then the "64," and then boot-up and test a copy of your demonstration disk. Run the same program that was in the machine at the time it failed. Note: It's a good idea to log the repair action in a record book to develop a history of the maintenance conducted on the machine. Sample record sheets are at the back of this book. If these troubleshooting steps still don't help you find the failed component, you have two choices: either take or ship the machine to a service repair center, or take out (or borrow) some test equipment, open the schematics, and start hunting for the failed or malfunctioning stage. Try signal tracing with a logic probe and a logic clip. Use an oscilloscope and a digital voltmeter to test the discrete components such as transistors, capacitors, and resistors. Connect a logic analyzer or signature analyzer to the system and step though the circuitry. Make voltage and resistance tests to locate the faulty part. For those of you who wish to learn about and use test equipment, test hardware and advanced troubleshooting methods are covered in Chapter 6. IF YOU MUST USE A SERVICE CENTER Before you disassemble your system and take it down to the repair shop, there are some things you can do to minimize your expense. Before you call for help, step through the list in Table 3-3. Table 3-3. Repair Service Checklist What is affected? Is the problem in software? Was it caused by operator error? Is it an intermittent failure? Describe the problem in writing. Ask for service center recommendations. Log the serial numbers of your system components. Request an estimate. Ask for a repair listing. Is the repair covered by warranty? Test the system before accepting the repair. This checklist should be used both before, during, and after the service center repair. Each step is elaborated on below. Find out if the problem is "catastrophic" and affects the operation of everything. If it only affects a part of the system, such as a disk drive, you may be able to take in just the drive for service center repair. Be certain the problem isn't in the software. Try to run a program that you know is good. Be certain the problem wasn't caused by operator error. Try a different operation that uses the same hardware or function. If your problem is intermittent, remember that intermittents are hard to find and could take quite a while (at quite a fee) to occur again, be found, and be fixed. You may want to just live with the problem until the intermittent becomes a hard failure. Then you will have something concrete to troubleshoot. Write down a complete description of the problem based on the questions in step 6 of the CommodoreEasy approach. Include what the system was doing at the time of failure, as well as what you were doing at the time of failure. Call your local users group for recommendations of some good, reasonable service centers. Jot down the serial numbers of all the equipment you'll be turning over for repair. Request an estimate of time and charges. Ask to have a detailed list of what was repaired or replaced, including a breakdown of charges. Make sure the work and parts are warranted for at least 90 days. Test run the system before taking it out of the shop. If you can wait for 10 working days, you can send your Commodore 64 directly to Commodore's service department, with a check for $55, and they'll fix or replace your computer, no matter what the failure.

BASIC TROUBLESHOOTING 63 SATETY PRECAUTIONS DURING TROUBLESHOOTING & REPAIR As with all devices that operate on electricity, certain precautions must be observed to prevent damage to yourself or your Commodore 64 system. Table 3-4 offers good advice for safe troubleshooting and repair that can save you time, money, and frustration. Table 3-4. Recommended Safety Precautions Keep out of the display chassis. Stay out of the power supply. Turn the power off, ground yourself, and pull the plug. Handle diskettes carefully. Don't cycle the power quickly. Power up the peripheral equipment before the computer. Use a power strip to apply power to all components at once (except for hard disk drives). Keep liquids away from the computer. Handle components with care. Keep out of the display monitor chassis because the voltages inside your monitor or television are dangerous. Only trained technicians should ever open a display unit for repair. Voltages are as high as 25,000 volts in there, so stay out! Don't open the power converter box in the middle of your Commodore 64 power supply cord. These circuits convert the 115- volt line power, in your home or office, to the 9 volts AC and + 5 volts DC used by the motherboard. That 115-volt electricity can be painful! This manual will not cover power-supply troubleshooting and repair except for whole (unopened) supply replacement. Always turn the power off, ground yourself from static electricity, and then pull out the power cord before touching anything inside. The number of repairs caused by people who don't follow this rule is unbelievable. Handle your diskettes carefully. Don't write on a label once it is attached to the disk jacket. Don't lay disks on a dusty, dirty surface. Keep cigarette ash away from your disks and your computer system. Don't touch the disk surface. Don't try to see how flexible a floppy disk is. Don't set your disks on, nor in front of, a TV or color monitor. Don't cycle the power on and off quickly. Wait 7 to 10 seconds to let the capacitors discharge fully and the circuits to return to a stable (quiescent) condition. Power up peripheral equipment first. Your computer can be damaged if you power it up before turning on the power to your disk drive and printer, or other peripheral equipment. Use a power strip. This saves wear and tear on the peripheral equipment on/off switches. Most power strips also have a built-in overload protection for voltage spikes. Voltage spikes can harm your computer system. Your Commodore 64 has built-in circuit protection. Keep liquids away from the keyboard. It's amazing how sticky soda becomes after frying components inside the computer. Handle components with care. Don't let chips lie around; the pins will get bent. Watch out for static electricity— chips may need special handling. Special Handling Some logic devices require extra care when being touched or handled. You should have no problem removing or inserting TTL (74xxxx series) chips. But the metal oxide semiconductor (MOS) chip family (MOS, CMOS, NMOS, etc.) needs some extra care because these chips are more susceptible to static electricity than are TTLs. There are some 74HCxx chips being sold today that are CMOS, but these aren't currently used in the Commodore 64 computer. Don't be afraid to touch the chips in your computer even though some of them are MOS type devices. Most guides for handling MOS chips lean toward the supersafe zone and sometimes cause more problems than they prevent. These chips can be damaged by the static charge you build up by scuffing your feet across a carpet, so be sure to ground yourself by touching the power supply case before you reach for a chip inside the Commodore 64 chassis. In addition, you can push your MOS-type chips into conductive foam for out-of-the-circuit storage or transporting. This foam conducts any voltages within itself and around the chips, preventing static electrical charge from getting into the chip. The MOS chips in your Commodore 64 are: The 6510 MPU. The ROM chips. The 4164-2 RAM chips. The 4066 CMOS analog switch chip. The 6581 SID chip. The 6567 VIC chip. Additional precautions apply when using test equipment with your Commodore computer. These will be covered in Chapter 6, "Advanced Troubleshooting Techniques.''

64 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE REPAIR PARTS Finding a problem is only part of the repair task. You must locate the specific chip, if the diagnostic software doesn't, and then make the repair. Just as the Commodore repair center can get support right from Commodore Business Machines, Commodore users have a Commodore number to call when there's a problem (Fig. 3-15). And, reportedly, you can order some parts directly from Commodore by using this service. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx I X x X COMMODORE BUSINESS MACHINES X X (215)431-9100 X X (ASK FOR SERVICE) X Fig. 3-15. Commodore 64 service center number. There are some other sources for Commodore repair parts. Most of these sources have been used successfully in the past and there is no reason to believe you won't have the same kind of success. Your local Radio Shack store carries most of the 7400-series chips. In fact, just about any electronic parts store will have a supply of 7400-series chips. You can decide what you'd like to keep as spare parts from the listing in the Appendix. The custom Commodore 64 chips — ROM, CIA, SID VIC— are proprietary to Commodore. Although you could use a ROM programmer to read and copy your ROM chips on EPROMs, you should buy these custom chips directly from Commodore, or from your local Commodore repair center. Sometimes you can locate a mail-order house that sells some of this type of chip's. For example, Falk-Baker Associates in Nutley, New Jersey,' se'Us several of these chips including the 6510 MPU. Sometimes you'll notice'an advertisement in one of the trade magazines for Commodore 64 repair parts. Commodore Business Machines, Inc. also has the parts. As you can see by the Commodore 64 parts listing in the Appendix, some of the Commodore chips can only be replaced by a board swap-out, or board exchange. The $55 exchange price may seem high, but you do get a new board, and the failure necessitating this action does not occur very often. In this introductory chapter on troubleshooting, you've learned the troubleshooting steps to success, how to recognize the components inside the Commodore 64, how components, disks and displays fail, and various methods for finding failures in your computer system. In the next chapter, we'll move into specific troubleshooting and repair of the Commodore 64 personal computer.

CHAPTER 4 Specific Troubleshooting & Repair for the Commodore 54 hapter 4 is a Commodore 64-specific troubleshooting and repair guide focusing on a large variety of computer failures. The section is divided into five parts. The parts are as follows: 1 . Start-up problems 2. Run problems 3. Display problems 4. Keyboard problems 5. Other I/O problems Each fault can be associated with one of these areas. The key index to these five general types follows. By letting your "fingers do the walking" through the Troubleshooting Index, you can quickly locate the page where your particular problem is addressed. Part 1 covers all symptoms that can occur at the time you turn the power on, or at start-up, including no power available, no key action, and no-display problems. Part 2 discusses all symptoms that can occur after initial boot up, such as bad memory, program hangups, and processing failures. Part 3 addresses difficulties associated with the display portion of the computer; for example, no display, no text mode, video synchronization failures, cursor and character faults, bad graphics, and others. Keyboard problems are detailed in Part 4. This section covers such faults as bad key operation. Part 5 encompasses all the other input and output problems, including speaker faults, cassette I/O failures, game controller problems, and disk drive malfunctions. Each part is subdivided into unique failures and provides symptom, problem, possible cause, and repair action or page reference for each circumstance. This data is followed with step-by-step troubleshooting instructions illustrated with applicable schematic drawings and a chip location layout diagram to make replacement easy. The chip layout diagrams in this chapter reflect the configuration of the Revision A motherboard. The Revision K motherboard chip layout is described in the appendix. The same designated chips are used on both revision boards. On the Rev K boards, some chips have been relocated to improve circuit operation. The PLA (U18) has been shifted to the top row, and some of the chips inside the metal can shielding the VIC, have been relocated within the can area. As you use this manual, you will find many useful hints for both troubleshooting and repair. Note: Be especially alert to the cautions because 65

66 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE further system degradation can occur if you do not Bad key action— some keys won't work .. 92 follow those procedures exactly as listed. 5. Other Input/Output (I/O) Problems If any step seems too complex, stop where you are Drive won't write (read is ok) 93 and seek help from a service center technician. You Drive won't read (get I/O error should be able to find and correct most problems, but or disk just runs and runs) 95 occasionally a component such as a resistor, capacitor, or Cassette —can't load data 97 inductor fails. Finding these failures requires advanced Cassette— can't write data to tape 99 troubleshooting techniques, and this book does not Game controller — won't work at all 100 assume you have these skills. If you'd like to try the Game controller — button won't work. ... 102 advanced methods, refer to Chapter 6 for guidance, and Printer port CN4 observe good troubleshooting procedures. (6-pin DIN) won't work 103 Light pen not working 104 No sound or bad sound 1 05 TROUBLESHOOTING INDEX 1 . Start-up Problems System won't boot No power light, nothing works, no display 66 Power light on, nothing works, no display 68 Power light on, nothing works, garbage on screen ... 69 Power light on, display works, keyboard won't work 72 Power light on, display works, cartridge won't work 74 2. Run Problems Computer locks up in middle of program 75 Intermittent operation— computer hangs up, keyboard entries won't work 77 Program loads but won't run 79 3. Display Problems No video 80 No color displayed on color monitor 81 No vertical or horizontal synchronization 83 Bad cursor or no cursor 84 Bad inverse 85 No text 86 Wrong characters 88 Annoying color tint or "jitter" on fringe or border of display 89 Bad bit-map graphics or no bit-map graphics 89 Bad Sprites or no Sprites 90 4. Keyboard Problems Bad key action — no keys respond 91 Bad key action — prints wrong character . . 92 1. START-UP PROBLEMS A number of things can cause the computer to boot improperly or not to boot at all: a bad memory chip, no clock pulses, or even a forgotten unplugged power cord. To find the problem, select the category that best fits the symptoms and turn to the appropriate page for a step-by-step troubleshooting guide. Symptom Categories Page System won't boot No power light, nothing works, no display .... 66 Power light on, nothing works, no display .... 68 Power light on, nothing works, 69 Power light on, display works, 72 Power light on, display works, 74 SYMPTOM: No power light, nothing works, no display Problem Possible cause Repair action No Power Power cord not Plug in cord. plugged in Power supply faulty Replace and test. Blown fuse on Replace and test. motherboard Bad bridge Replace and test. rectifier at CR4

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 67 Troubleshooting Procedure TURN POWER SWITCH OFF. IS POWER CORD PLUGGED IN? YES ^ OPEN COMPUTER TOP COVER. IS POWER SUPPLY CONNECTOR FROM SUPPLY TO MOTHERBOARD PLUGGED IN? YES ^ DISCONNECT POWER PLUG, REPLACE FUSE INSIDE OF COMMODORE 64. TEST -TURN POWER SWITCH ON. WORKS? NO REPLACE POWER SUPPLY. SERVICE CENTER ACTION. CONCLUDE: Problem is probably a bad CR4 bridge rectifier. NO *2l 115V POWER SUPPLY 9VAC PLUG IN CORD AND RETRY BOOTING. NO YES RETURN SYSTEM TO FULL SERVICE. FUSE 9VAC L4 ^1. + 5V sirr^ GNO t T P0WER ■ ' ON/OFF POWER INPUT CONN. (CN7) SWITCH Fig. 4-2. Physical location guide: fuse (a) and bridge rectifier (b). | USER j PORT 4— ► 9VAC -► 9VAC 4 VR2 +5V 4 VR1 ■> +12V ■> +9V 74 LS08 (U27) (TOD) ■> +5V Fig. 4-1. Simplified power supply circuitry.

68 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE SYMPTOM: Power light on, nothing works, no -oi^osdv Problem Possible cause Repair action No Clock 74LS629 (U31) Replace and test. Bad crystal Replace and test. Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE INCLUDING DISK DRIVE. CONNECT MONITOR TO COMPUTER. RECONNECT POWER CORD. TURN ON COMPUTER AND MONITOR. , WORKS? YES | NO TURN POWER OFF. REPLACE 74LS629 U31. (SEE APPENDIX) RECONNECT POWER CORD. 1 TEST. T TURN SYSTEM OFF. DISCONNECT POWER CORD. REPLACE PERIPHERALS ONE AT AT TIME. 4 RECONNECT POWER CORD. TURN ON AND TEST. WHEN FAILURE OCCURS LAST PERIPHERAL REPLACED IS BAD. REPAIR/REPLACE WORKS? YES RETURN TO FULL SERVICE. NO SERVICE CENTER ACTION. CONCLUDE: Component other than a chip has failed. PHASE XTAL HDH LS629 (U31) jCnt r>nN. (14.31818 MHz-NTSC)TO COLOR ROM (U6) 9 WLQH^ (17.734472 MHz-PAL) AND VIC (U19) Clock circuitry. LS74 (U29) PAL, JUMPER SELECT NTSC + 5* LS193 (U30) LS74 (U29) MC4044 (U32) — LS629 (U31) 4dotclock>— (8.1818 MHz-NTSC) (7.88 MHz-PAL) 6567 VIC (U19) 6510 CPU (U7) (1.02 MHz-NTSC) (0.98 MHz-PAL) — | PHASE 0> (1.02 MHz-NTSC) (0.98 MHz-PAL)

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 69 Chip designation Description Location 74LS629 Dual voltage-controlled oscillator U31 Chip location guide. This represents the Commodore 64 motherboard and is a guide to help you find the chip of interest. Problem Possible cause Repair action Kernal ROM not working Bad Kernal ROM at U4 Replace and test. SID malfunction Bad SID at U18 Replace and test. MPU not activating ROM Bad 6510 MPU at U7 Replace and test. ROM not being enabled Bad PLA at U17 Replace and test. Keyboard, video not enabled Bad 74LS139 at U15 Replace and test. RAM not being accessed Bad 74LS257 at U13 Replace and test. RAM not holding any data No phase 0 clock pulse Bad RAM IC Bad 74LS74 at U29 Bad 74LS193 at U30 Bad MC4044 at U32 Bad VIC at U19 Replace and test. Replace and test. Replace and test. Replace and test. Replace and test. Troubleshooting Procedure TURN POWER OFF. OPEN TOP COVER. UNPLUG COMPUTER. REPLACE KERNAL ROM (U4). RECONNECT POWER CORD. POWER UP AND TEST SYSTEM. . WORKS? YES \ NO TURN POWER OFF. UNPLUG POWER CORD. REPLACE SID AT U 18. RECONNECT POWER CORD. POWER UP AND TEST. WORKS? \ NO (Continued) YES RETURN TO FULL SERVICE. RETURN TO FULL SERVICE.

70 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE TURN OFF POWER. DISCONNECT POWER CORD. REPLACE 6510 MPU HJ7). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO TURN POWER OFF. DISCONNECT PLUG. REPLACE PLA (U17). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS139(U15). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. ^ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS257 (U13) RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS74 (U29). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. ^ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS193 (U30). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. | NO TURN POWER OFF. DISCONNECT POWER CORD.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 71 REPLACE MC4044 (U32). RECONNECT POWER CORD. POWER UP AND TEST. \ NO TURN POWER OFF. • DISCONNECT POWER CORD. 4 REPLACE VIC (U19). RECONNECT POWER CORD. POWER UP AND TEST. \ NO TURN POWER OFF. DISCONNECT POWER CORD. — REPLACE RAM ICs (U9-U12) AND (U21-U24) ONE AT A TIME, TESTING AFTER EACH. RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. Circuitry Affected (U17) PLA ROM SELECT ROM (U18) SID ». mpuC (U13) 74LS 257 7\ DATA BUS VIC (U15) RAM 74LS 239 VIDEO VIDEO ENABLE (U25) 74LS 257 RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. SERVICE CENTER ACTION. Fig. 4-5. Kernal ROM and 6510 circuitry. "snr D D o LZZ] CZZl Fig. 4-6. Chip location guide. This represents the Commodore 64 motherboard and is a guide to help you find the chips of interest.

72 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Chip designation Description Location Kernal ROM Read only memory U4 SID Sound interface device U18 6510 MPU Microprocessing unit U7 PLA Program logic array U17 VIC Video interface chip U19 4164 Random access memory U9-U12 U21-U24 MC4044 Phase frequency detector U32 74LS74 D flip-flop U29 74LS139 Dual 2/4 decoder U15 74LS193 Binary up/down counter U30 74LS257 Quad 2-input tri-state multiplexer U13 SYMPTOM: Power light on, display works, keyboard won't work Problem Possible cause Repair action No signal Bad keyboard Replace keyboard. from Bad cable Replace cable. keyboard Loose connector Check connector. Key signal Bad CIA#1 at U1 Replace and test. not getting Bad 74LS139 at U15 Replace and test. to data bus Troubleshooting Procedures TURN POWER OFF. OPEN COMPUTER. UNPLUG COMPUTER POWER CORD. REMOVE ALL PERIPHERAL DEVICES. RECONNECT MONITOR. PLUG IN POWER CORD. TURN ON AND TEST. NO ♦ TURN OFF, DISCONNECT POWER CORD. REPLACE PERIPHERALS ONE AT NO A TIME. I ^ CHECK KEYBOARD CABLE/CONNECTOR. WHEN FAILURE OCCURS, LAST PERIPHERAL IS BAD. REPAIR/REPLACE. RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. | NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE CIA# (U1). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. ^ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS139 (U15). RECONNECT POWER CORD. POWER UP AND TEST.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 73 : WORKS? YES 4 NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE KEYBOARD. RECONNECT POWER CORD. POWER UP AND TEST. YES SERVICE CENTER ACTION. Circuitry Affected Description Chip designation RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. Location CIA #1 Complex l/F adapter 74LS139 Dual 2/4 decoder U1 U15 Fis>. 4-7 Chip location guide. This represents the Commodore 64 motherboard and is a guide to help you find the chips of interest. KEYBOARD MATRIX KEYBOARD CONNECTOR (CN1) ($0277$0280) CIA #2

74 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE c»\er iltzht on, display v jir'5''-n:4e ivon'! worn Problem Possible cause Repair action Bad program Bad cartridge Signal not Bad connector getting to motherboard Game port Bad PLA at U1 7 not getting signal Replace with known good cartridge. Check connection. Replace and test. io^shooiinq Procedure SYMPTOM OCCURS. TURN POWER OFF. CHECK THAT CARTRIDGE IS GOOD. TURN ON POWER AND TEST. , WORKS? , YES ^ NO CHECK THAT CARTRIDGE CONNECTIONS ARE TIGHT. TURN ON POWER AND TEST. /\ {WORKS? > \ / YES \ / V \ NO RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. TURN POWER OFF. OPEN COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR. RECONNECT POWER CORD. TURN ON COMPUTER AND MONITOR. WORKS? > YES NO \ TURN POWER OFF DISCONNECT POWER CORD. REPLACE PLA (U17). RECONNECT POWER CORD. POWER UP AND TEST. YES \ NO SERVICE CENTER ACTION. Circuitry Affected Chip designation Description TURN SYSTEM OFF. DISCONNECT POWER CORD. REPLACE PERIPHERALS ONE AT A TIME. TURN ON POWER AND TEST. WHEN FAILURE OCCURS, LAST PERIPHERAL REPLACED IS BAD. RETURN TO FULL SERVICE. Location PLA Programmable logic array U17

SPECIFIC TROUBLESHOOTING &l REPAIR FOR THE COMMODORE 64 75 SERIAL USER PORT PORT 6510 MPU RAM f 7\ VIDEO ROM 7^ SYSTEM BUS iH> VIC II SID CIA#1 V SOUND £12: KEYBOARD GAME CONTROLS Fig. 4-9. Circuitry affected when expansion cartridge won't work. EXPANSION SLOT ENABLE PLA (U17) 0 DO Fig. 4-10. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. 2. RUN PROBLEMS This section covers those problems which you might encounter while your system is running. For example, in this case, you attempt to do something and get a response entirely different from what you expected. The following three sections will cover broad malfunctions such as display failure, keyboard failure and input/output failures, although these may also occur during the time your program is running merrily along. Symptom Categories Page Computer locks up in middle of program 75 Intermittent operation— computer hangs up, keyboard entries won't work 77 Program loads but won't run 79 SYMPTOM: Computer locks up In middle of program Problem Possible cause Repair action Programming Bad program lock up (Continued) Debug program.

76 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE No output from keyboard circuitry No ROM chip select MPU failure RAM failure Failure in keyboard Go to keyboard circuitry section. Bad PLA at U17 Bad 6510 at U7 Bad RAM ICs U9-U12, U21-U24 Replace and test. Replace and test. Replace and test. roubieshooting Procedure SYMPTOM OCCURS. TURN POWER OFF. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE INCLUDING DISK DRIVE. CONNECT MONITOR TO COMPUTER. REPLACE PROGRAM WITH KNOWN GOOD PROGRAM RECONNECT POWER CORD. POWER UP, AND TEST. WORKS? > YES TURN POWER OFF. REPLACE PLA (U1 7). VV RETURN TO FULL SERVICE. POWER UP AND TEST. YES TURN POWER OFF. REPLACE MPU (U7). bf'O POWER UP AND TEST. k WORKS? > \ NO TURN POWER OFF. REPLACE 4164 RAM ICs (U9-U12 AND U21-U24), TESTING AFTER EACH ONE IS REPLACED. YES LAST IC s ? /YES \ NO Circuitrv Affected Chip designation Description RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. GO TO KEYBOARD "NO KEYS WORKING" SECTION. Location 6510 PLA 4164 Microprocessing unit Programmable logic array Random access memory U7 U17 U9-U12 U21-U24

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 77 LORAM HIRAM CHAREN82S100 (PLA) (U17) CASRAM BASIC KERNAL i— 4164-2 RAM (U12) — 4164-2 RAM (U11) — 4164-2 RAM (U23) CHAROM 4164-2 RAM (U24) — 4164-2 RAM (U10) — 4164-2 RAM (U22) — 4164-2 RAM (U9) 4162-2 RAM (U21) 2364A (U3) BASIC ROM2364A (U4) KERNAL ROM 901227-01,02,03 2332A (U5) CHARACTER ROM 901225-01 Fig. 4-1 1 . Circuitry affected when computer lock-up occurs. D7 D6 D5 D4 D3 D2 D1 DO D0-D7 D0-D7 D0-D7 SYMPTOM: Intermittent operation — computer hangs up, keyboard entm*> won't work Problem Possible cause Repair action Programming Bad program Debug program. lock up No output Failure in keyboard Go to keyboard from circuitry section. keyboard circuitry No ROM Bad PLA at U17 Replace and test. chip select MPU failure Bad 6510 at U7 Replace and test. RAM failure Bad RAM ICs at Replace RAM ICs U9-U12, U21-U24 U9-U12, U21-U24. Troubleshooting Procedure SYMPTOM OCCURS. Chip location guide. This represents the Commodore 64 motherboard and is a guide to help you find the chips of interest. TURN POWER OFF. I (Continued)

78 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE INCLUDING DISK DRIVE. CONNECT MONITOR TO COMPUTER. REPLACE PROGRAM WITH KNOWN GOOD PROGRAM WORKS?> YES NO TURN POWER OFF. REPLACE PLA (U17). POWER UP AND TEST. YES TURN POWER OFF. REPLACE MPU (U7). / ' WORKS? > * YES \ NO r TURN POWER OFF. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. REPLACE 4164 RAM ICs (U9-U12 AND U21-U24), TESTING . AFTER EACH ONE IS REPLACED. YES RETURN TO FULL SERVICE. LAST IC. ? S YES \ NO GO TO KEYBOARD 'NO KEYS WORKING" SECTION. Circuitry Affected (See Figure 4-1 1 .) Chip designation Description 6510 PLA 4164 Microprocessing unit Programmable logic array Random access memory T3DU D DO EZZI Location U7 U17 U9-U12 U21-U24 Fig. 4-13. This represents the Commodore 64 motherboard and is a guide to help you find the chips of interest.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 79 SYMPTOM: Program loads but won't run Troubleshooting Procedure REPLACE PROGRAM WITH KNOWN GOOD PROGRAM. WORKS? > YES ^ NO TURN POWER OFF. OPEN TOP OF COMPUTER. DISCONNECT POWER PLUG. REPLACE BASIC ROM (U3). RECONNECT POWER PLUG. POWER UP AND TEST. < WORKS? > \ NO TURN POWER OFF. DISCONNECT POWER PLUG. REPLACE PLA AT U17. DEBUG ORIGINAL PROGRAM. RETURN TO FULL SERVICE. RECONNECT POWER PLUG. POWER UP AND TEST. Problem Possible cause Repair action Programming Bad program Debug program. lock up Bad RAM chip Replace and test. Bad PLA U17 Replace and test. Basic Bad BASIC ROM Replace and test. commands at U3 not working 4 WORKS? . \yy YES \f NO TURN POWER OFF. 'DISCONNECT POWER CORD. 4 REPLACE RAM ICs (U9-U12 AND U21-U24), TESTING AFTER EACH REPLACEMENT. RECONNECT POWER CORD. POWER UP AND TEST. -•V S / X WORKS? > \ / YES \ NO LAST IC ? , YES NO ircuitrv Arts* (See Figure 4-11. Chip designation Description BASIC ROM PLA MC4164 RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. SERVICE CENTER ACTION. Location Read only memory Programmed logic array Random access memory U3 U17 U9-U12, U21-U24

80 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE SYMPTOM: No video Chip location guide. This represents the Commodore 64 motherboard and is a guide to help you find the chips of interest. In this section, we cover a wide selection of the display problems experienced by computer repair technicians. ■■ ■•■r.-.n ., !-:-.. Page No video 80 No color displayed on color monitor 81 No vertical or horizontal synchronization 83 Bad cursor or no cursor 84 Bad inverse 85 No text 86 Wrong characters 88 Annoying color tint or "jitter" on fringe or border of display 89 Bad bit-map graphics or no bit-map graphics . . 89 Bad Sprites or no Sprites 90 Problem Possible cause Repair action No video Bad cable Reseat or replace. into monitor Video signal Brightness Adjust brightness. too small Bad monitor. Check or replace. No video Bad VIC (U19) Replace and test. signal being Bad RF Modulator Replace and test. generated " •Bad PN2222 (Q4) Service center action. Bad diode at CR4 Service center action. Troubleshooting Procedure CHECK VIDEO CABLE. CHECK VIDEO BRIGHTNESS. .WORKS? ' YES \ NO TURN POWER OFF. DISCONNECT POWER CORD. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. REMOVE TOP OF COMPUTER. DISCONNECT ALL PERIPHERAL HARDWARE INCLUDING DISK DRIVE. CONNECT MONITOR TO COMPUTER. REPLACE VIC (U19). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 81 WORKS?, YES RETURN TO FULL SERVICE. I NO TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION. CONCLUDE: Problem not associated with chip failure. (Could be PN2222 transistor at Q4 or diode at CR3.) jrcuitry Affected DATA BUS) ™% Chip designation Description VIC Location Video interface chip U19 fig. 4-15. Video output circuitry. Fig. 4-16. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the components of interest. SYMPTOM: No color displayed on coior monitor WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE Problem Possible cause Repair action No Color Burst signal Signal shorted Bad Color ROM (U6) Bad 74LS08 (U27) Bad VIC (U19) Bad 74LS139 (U15) Transistor Q5 shorted Transistor Q6 shorted Replace and lest ffVlH*f Replace and test. Replace and test. Replace and test. Replace Q5. Replace Q6. OPEN TOP OF COMPUTER. 3 UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE INCLUDING DISK DRIVE. ,-ubleshooting Procedure TURN POWER OFF. CONNECT MONITOR TO COMPUTER. (Continued)

82 COMMODORE 64 TROUBLESHOOTING St REPAIR GUIDE REPLACE COLOR ROM (U6). RECONNECT POWER CORD. POWER UP AND TEST. TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS08 (U27). RECONNECT POWER CORD. POWER UP AND TEST. TURN POWER OFF. DISCONNECT POWER CORD. REPLACE VIC (U19). RECONNECT POWER CORD. POWER UP AND TEST. REPLACE 74LS139 (U15). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. NO TURN POWER OFF. DISCONNECT POWER CORD. RETURN TO 1 FULL SERVICE. SERVICE CENTER ACTION CONCLUDE: Problem is likely bad transistor Q5, or Q6 Circuitry Affected RETURN TO FULL SERVICE. T3DT D D o RETURN TO FULL SERVICE. Fig. 4-17. chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chips of interest. Chip designation Description 2114-30L VIC 74LS08 74LS139 Location Color ROM (read only memory) U6 Video interface chip U19 Quad 2-input AND gate U27 Dual 2/4 decoder U15

SPECIFIC TROUBLESHOOTING & REPAIR FOR THE COMMODORE 64 83 74LS08 (U27) COLOR ROM

84 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE R19 VERTICAL AND HORIZONTAL SYNC Fig. 4-20. Synchronization circuitry affected. Chip designation Description Location VIC Video interface chip U19 Y.MPTOM: Sad cursor or no cursor Problem Possible cause Repair action Character Bad CHAR ROM (U5) Replace and test, not being Bad CIA#2 (U2) Replace and test, generated Bad RAM IC (U9-U12) Replace and test, and (U21-U24) TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. 4 REPLACE CHAR ROM (U5). RECONNECT POWER CORD. POWER UP AND TEST. % WORKS? } \ ./ YES \ - NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE CIA #2 (U2). RECONNECT POWER CORD. POWER UP AND TEST. WORKS? YES ^ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE RAM ICs (U9-U12 AND U21-U24), TESTING AFTER EACH REPLACEMENT. RECONNECT POWER CORD. POWER UP AND TEST. WORKS? YES NO LAST IC / YES \ NO RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. SERVICE CENTER ACTION. (Continued)

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 85 Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chips of interest. ►VIDEO Chip designation Description Location CHAR ROM CIA #2 MC4164 NMOS static read only memory Complex l/F adapter Random access memory T--t r-'«X. TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. REMOVE TOP OF COMPUTER. UNPLUG POWER CORD. . DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. REPLACE CIA #2 (U2) RECONNECT POWER CORD. POWER UP AND TEST. . 2. Cu rsor ci rcu itry affected . WORKS? | NO (Continued) YES U5 U2 U9-U12 U21-U24 Problem Possible cause Repair action Mode not Bad (RVS) key Replace and test. being selected No signal Bad CIA #2 (U2) Replace and test. to data bus RETURN TO FULL SERVICE.

86 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE TURN POWER OFF. DISCONNECT POWER CORD. CO TO KEYBOARD SECTION "SOME KEYS WON'T WORK." Circuitry Affected crarff Fig. 4-23. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. KEYBOARD Chip designation Description Location CIA #2 Complex l/F adapter U2 SYMPTOM: No text Problem Possible cause Repair action Text mode ' Bad VIC (U19) Replace and test. not selected No text Bad char ROM (U5) Replace and test. being Bad BASIC ROM (U3) Replace and test. generated Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. REPLACE VIC (U19). RECONNECT POWER CORD. POWER UP AND TEST. WORKS?^ YES RETURN TO FULL SERVICE. ^ NO Fig. 4-24. Circuitry for bad inverse problem.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 87 TURN POWER OFF. DISCONNECT POWER CORD. REPLACE CHARACTER ROM (U5). RECONNECT POWER CORD. POWER UP AND TEST. WORKS^ YES \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE BASIC ROM (U3). RECONNECT POWER CORD. POWER UP AND TEST. YES TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION. Circuitry Affected Chip designation Description RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. Location VIC Char ROM ROM Video interface chip Character ROM (read only memory) BASIC ROM U19 U5 U3 Fig. 4-25. Test circuitry affected. Fig. 4-26. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chips of interest.

88 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE SYMPTOM: Wrong characters Problem Possible cause Repair action Wrong charac- Bad char ROM Replace and test. ter sent to (U5) video Key matrix read wrong Wrong key signal from keyboard Bad CIA#1 (U1) Replace and test. Bad keyboard Replace and test. Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. REPLACE CHAR ROM (U5). RECONNECT POWER CORD. POWER UP AND TEST. TURN POWER OFF. DISCONNECT POWER CORD. REPLACE CIA #1 (U1). RETURN TO FULL SERVICE. RECONNECT POWER CORD. POWER UP AND TEST. , WORKS? . YES NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE KEYBOARD. RECONNECT POWER CORD. POWER UP AND TEST. YES TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION Circuitry Affected KEYBOARD RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. CHARACTER ROM

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 89 Chip designation Description Location CIA#1 Complex 1/F adapter U1 Char ROM Character ROM U5 Problem Possible cause Repair action Color signal Color trim Adjust color trim not suitable (R25) variable resistor. Circuitry Affected + Vvid VIDEO Fig. 4-2'?. Color tint circuitry affected. Fig. 4-30. Component location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the color trim resistor. SYMPTOM: 3^d bii-rrv:.p no bit-map grannies Fig. 4-28. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chips of interest. SYMPTOM: Annoying color tint or "jitter" on fringe or border of display Component designation Description Location Variable Color trim Q6 resistor (R25) Problem Possible cause Repair action No bit-map Bad VIC (U19) Replace and test. graphics produced

90 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. REPLACE VIC (U19). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. ^ NO TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION Circuitry Affected VIDEO Chip designation Description Location VIC Video interface chip U19 Fig. 4-32. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. SYMPTOM: Bad Sprites or no Sprites Problem Possible cause Repair action Sprites not Bad VIC (U19) Replace and test. being produced correctly Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. Fig. 4-31 . Circuitry for bit-map graphics.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 91 OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. REPLACE VIC (U19). RECONNECT POWER CORD. POWER UP AND TEST. "WORKS?. YES \ NO SERVICE CENTER ACTION. RETURN TO FULL SERVICE. Fig. 4-34. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. Circuitry Affected * VIDEO Fig. 4-33. SPRITE circuitry affected. Chip designation Description Location 4. KEYBOARD PROBLEMS The keyboard is your window into the computer. Its operation is vital to your successful use of the machine. This section is devoted to the most common key and keyboard problems encountered by technicians in the repair field. Symptom Category Page Bad key action No keys respond 91 Prints wrong character 92 Some keys won't work 92 SYMPTOM: Bad key action — no keys respond Problem Possible cause Repair action VIC Video interface chip U19 See start-up problem section "Power light on, display works, keyboard won't work"

92 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE SYMPTOM: Bad key action — prints n rong character Problem Possible cause Repair action See display problems section "Wrong characters" SYMPTOM: Bad key action — some keys won't work Problem Possible cause Repair action No key Dirty key contacts Clean key switches. signal Bad key on keyboard Replace and test. No signal Bad pin on CIA #1 Replace and test. getting to at location U1 data bus o u bieshooti ng Proced ure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CLEAN KEY CONTACTS. NOTE: Keys are plastic with a metal coating on the bottom. When a key is pressed, it makes contact with a small metal pad below. The metal coating is extremely sensitive to smoke and dirt. Cleaning should be conducted carefully. RECONNECT POWER CORD AND MONITOR. POWER UP AND TEST. A < WORKS?/ V™ \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE KEYBOARD. RECONNECT POWER CORD. POWER UP AND TEST. / N< WORKS? /' X / YES V \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE CIA (U1) RECONNECT POWER CORD. POWER UP AND TEST. X\ < WORKS? .* X y yes NO TURN POWER OFF. DISCONECT POWER CORD. SERVICE CENTER ACTION. CONCLUDE: Problem is not chip failure. rcuitr, r> Chip designation Description RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. Location CIA#1 Complex l/F adapter U1

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 93 KEYBOARD MATRIX KEYBOARD CONNECTOR (CN1) KERNAL RAM ROM KEYBOARD BUFFER ($0277$0280) VIDEO OUTPUT CIRCUITRY CM #2 ,\r!te (read is OK) Problem Possible cause Repair action Disk writeprotected Drive can't tell where to write No write signals to drive electronics Write-protect tab installed Bad switch Disk not formatted Disk not seated properly Cable bad or loose (Continued) Remove writeprotect tab. Replace switch. Format disk. Reseat disk. Check cable.

94 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Drive Bad disk drive electronic electronics signals improper Improper Bad 7406 (U8) signals from motherboard Head binding Rail assembly Replace and test. Replace and test. Lubricate assembly. Troubleshooting Procedure RESEAT DISK. i CHECK THAT DISK IS NOT WRITE-PROTECTED. TRY TO WRITE AGAIN. TRY SEVERAL DISKS. .WORKS? YES ^ NO RESET DISK DRIVE C@U; INITIALIZE DRIVE C@l') WORKS?> YES \ NO TURN SYSTEM POWER OFF. DISCONNECT POWER CORD. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. UNPLUG POWER CORD. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. REMOVE DISK DRIVE COVER. CHECK DRIVE CABLES TIGHTLY CONNECTED. CHECK WRITE-PROTECT SWITCH ALIGNED WITH TAB SLOT ON DISK. i LUBRICATE HEAD RAIL ASSEMBLY. (SEE APPENDIX) RECONNECT CABLE/POWER CORD. POWER UP AND TEST. ^WORKS' YES NO TURN POWER OFF. REPLACE 7406

SPECIFIC TROUBLESHOOTING & REPAIR FOR THE COMMODORE 64 95 Circuitry Affected Fig. 4-37. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. Chip designation Description Location 7406 Quad operational amplifier U8 DRIVE Fig. 4-38. Disk drive write circuitry affected. SYMPTOM: Drive won't read (get I/O error or disk just runs and runs) Problem Possible cause Repair action Data not coming from disk Bad disk Disk not seated properly Replace disk. Reseat disk. Read head not reading Data not coming out of drive No data from motherboard Bad head alignment Head binding Bad read head Cable bad or loose Bad 7414 on drive printed circuit board Bad 7406 (U8) Bad CIA #2 (U2) Service center action. Lubricate rail. Service center action. Reseat or replace. Replace and test. Replace and test. Replace and test. Troubleshooting Procedure OPEN DRIVE DOOR. REMOVE AND REINSERT DISK. CLOSE DOOR SLOWLY. ^VORKS?> \ NO REMOVE DISK. TRY ANOTHER DISK. YES ATTEMPT TO RUN 'PERFORMANCE TEST" PROGRAM ON TEST/DEMO DISK. \ NO TURN POWER OFF. DISCONNECT POWER CORD. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. RETURN TO FULL SERVICE. OLD DISK WAS BAD. RETURN TO FULL SERVICE. (Continued)

96 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. RECONNECT POWER CORD. TURN ON COMPUTER AND MONITOR. WORKS? NO YES | TURN POWER OFF. REPLACE 7406 AT U8. RECONNECT DRIVE. POWER UP AND TEST. WORKS? > YES \ NO TURN POWER OFF. REPLACE CIA #2 (U2). POWER UP AND TEST. WORKS? YES NO CO TO "START UP PROBLEMS." RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. TURN POWER OFF. DISCONNECT DISK DRIVE FROM COMPUTER. POWER UP DISK DRIVE. DRIVE JUST »SPINS?/YES REPLACE 7414 ON ANALOG CARD. TURN POWER OFF. DISCONNECT POWER CORD. RECONNECT DRIVE TO COMPUTER. CONCLUDE: Drive is bad. TEST, AND RETURN TO FULL SERVICE. SERVICE CENTER ACTION -ALIGNMENT OR OTHER REPAIR INDICATED Circuitry Affected Description Chip designation Location 7406 CIA #2 7414 Quad operational amplifier Complex l/F adapter Hex Schmidt Trigger inverter CONNECTION CABLE U8 U2 Analog Card 7406 (U8) CIA (U2) DATA BUS , Fig. 4-39. Disk drive read circuitry affected.

SPECIFIC TROUBLESHOOTING &, REPAIR FOR THE COMMODORE 64 97 ODD D D D D □ D D Analog Card Fig. 4-40. Chip location guide. This represents the Commodore 64 computer motherboard and the disk drive Analog card. They are intended as a guide to help you find the chips of interest. SYMPTOM: Cassette — can't load data Problem Possible cause Repair action Signal not Bad cable Replace cable. coming in No signal on tape Replace bad tape. from cable Dirty read head Clean head. Datasette too close Move cassette to television or deck more than monitor twelve inches away from display. Signal not Bad transistors Service center amplified Q1, Q2, Q3 action. No data to Bad CIA #1 (Uf) Replace and test. data bus D7 Cassette Bad MPU (U7) Replace and test. DATA IN port not selected Troubleshooting Procedure MAKE SURE CASSETTE DECK IS IS LOCATED TWELVE INCHES OR MORE FROM DISPLAY UNIT. 4 CHECK CABLE CONNECTIONS. 4 TRY KNOWN GOOD TAPE. 4 RETURN TO FULL SERVICE. NO ^ TURN POWER OFF. DISCONNECT POWER CORD. 4 WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. 4 DISCONNECT CASSETTE DECK FROM COMPUTER. 4 (Continued)

98 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE CHECK AND CLEAN CASSETTE READ HEAD. RECONNECT CASSETTE DECK TO COMPUTER. RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO TURN POWER OFF. DISCONNECT POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR AND 'CASSETTE DECK TO COMPUTER. REPLACE CIA #1 (U1). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE MPU (U7). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO SERVICE CENTER ACTION CONCLUDE: Problem is not caused by chip failure. Circuitry Affected Chip designation Description Location CIA#1 Complex l/F adapter U1 6510 Microprocessing unit U7 CO Fig. 4-41. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chips of interest.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 CIA #1 (U1) CASS IN Fig. 4-42. Cassette input circuitry affected. SYMPTOM: Cassette — can t write data to tape Problem Possible cause Repair action No signal Bad cable Reconnect or to tape connection replace cable. Tape not Bad tape Replace tape. working Signal not Bad MPU (U7) Replace and test. being sent Cassette Bad transistors Replace and test. control Q1, Q2, Q3 (Service center) signals not correct Troubleshooting Procedure CHECK CABLE CONNECTIONS. TRY KNOWN GOOD TAPE. WORKS?. YES RETURN TO FULL SERVICE. NO \ TURN POWER OFF. DISCONNECT POWER CORD. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. DISCONNECT ALL PERIPHERAL HARDWARE EXCEPT MONITOR AND TAPE PLAYER. RECONNECT POWER CORD. POWER UP. TEST MPU OPERATION BY WRITING AND RUNNING SIMPLE BASIC PROGRAM. WORKS?. YES NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE MPU (U7). RECONNECT POWER CORD. POWER UP AND TEST. YES TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION CONCLUDE: Problem is probably caused by a bad transistor (Q1, Q2, or Q3). RETURN TO FULL SERVICE. RETURN TO FULL SERVICE.

100 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Circuitry Affected T3T~n I 1 Motherboard Analog Card Fig. 4-43. Chip location guide. This represents the Commodore 64 computer motherboard and the Datasette Analog card. These are intended as a guide to help you find the chips of interest. Chip designation Description Location 6510 Microprocessing unit U7 TAPE PLAYER MPU

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 101 4- NO TURN POWER OFF. DISCONNECT POWER CORD. OPEN COMPUTER. REPLACE CIA#1 (U1). RECONNECT POWER CORD. POWER UP AND TEST. \WORKS?> \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE MC4066 (U28). RECONNECT POWER CORD. POWER UP AND TEST. \WORKS?> \ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE SID (U18). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. RETURN TO FULL SERVICE. < WORKS? > ^ NO SERVICE CENTER ACTION. Circuitry Affected RETURN TO FULL SERVICE. GAME CN9 PADDLE g 4066 (U28) POTX POT Y SID (U18) DATA BUS; CIA

102 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Chip designation Description Location CIA #1 Complex l/F adapter U1 Sli) SrmnH int^rra/'*** r\o\/\r & I 11 A U I O MC4066 CMOS analog switch U28 SYMPTOM: Game controller — button won't work Problem Possible cause Repair action No signal Bad push button in from button game controller Replace push button. Broken wire in cable Repair wire, (soldering) Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. UNPLUG POWER CORD. DISCONNECT GAME CONTROLLER CABLE. i DISASSEMBLE GAME HAND CONTROLLER. CHECK FOR BREAKS IN WIRES. ANY V YES CABLE J3REAKS?> REPLACE PUSH BUTTON. REASSEMBLE GAME CONTROLLER. REINSTALL GAME I/O CABLE. RECONNECT POWER CORD. POWER UP AND TEST. I OVORKS?\ ^ NO BUY ANOTHER HAND CONTROLLER. (Service center repair almost as expensive as cost of new game controller.) Circuitry Affected ■BTNA/LPPUSH BUTTON H . PBA I (CN9) REPAIR OR REPLACE CABLE. RETURN TO FULL SERVICE. 6567 TO VIC (U19) PUSH BUTTON H| PBB I I (CN8) Fig. 4-47. Push-button circuitry affected.

SPECIFIC TROUBLESHOOTING &. REPAIR FOR THE COMMODORE 64 103 SYMPTOM: Printer port CN4 (6-pin DIN) won't work Problem Possible cause Repair action Printer Bad printer Replace and test. electronics Bad cable Replace and test. not functioning Data not Bad CIA #2 (U2) Replace and test. being sent Printer not Bad 74LS139 (U15) Replace and test. enabled Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. CHECK THAT ALL CABLES ARE TIGHT. RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. \ NO TURN POWER OFF. DISCONNECT POWER CORD. CONDUCT PRINTER SELF TEST. RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. ^ NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE CIA #2 (U2). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. j. NO TURN POWER OFF. DISCONNECT POWER CORD. REPLACE 74LS139 (U15). RECONNECT POWER CORD. POWER UP AND TEST. RETURN TO FULL SERVICE. ^ NO TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION. Circuitry Affected Chip designation Description Location CIA #2 Complex l/F adapter U2 74LS139 Dual 2/4 decoder U15

104 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Troubleshooting Procedure 74 LS 139 (U15) CIA #2 (U2) 7406

SPECIFIC TROUBLESHOOTING & REPAIR FOR THE COMMODORE 64 105 Circuitry Affected SYMPTOM: Bad sound or no sound LIGHT PEN CONNECTOR Fig. 4-50. Light pen circuitry. Chip designation Description CIA#1 Complex l/F adapter on D o o I 1 an Location U1 Fig. 4-51. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. Problem Possible cause Repair action Signals not Bad speaker cable Replace and test. getting to speaker Signals not Bad SID (U18) Replace and test, being sent Bad transistor (Q8) Service center action. Bad capacitor (C37) Service center action. Troubleshooting Procedure TURN POWER OFF. WRITE DOWN WHAT SYSTEM WAS DOING AT TIME OF FAILURE. OPEN TOP OF COMPUTER. UNPLUG POWER CORD. DISCONNECT ALL PERIPHERAL HARDWARE. CONNECT MONITOR TO COMPUTER. CHECK SPEAKER CABLE. RECONNECT POWER CORD. POWER UP AND TEST. TURN POWER OFF. DISCONNECT POWER CORD. REPLACE SID (U18). I (Continued) RETURN TO FULL SERVICE.

106 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE RECONNECT POWER CORD. POWER UP AND TEST. YES TURN POWER OFF. DISCONNECT POWER CORD. SERVICE CENTER ACTION. CONCLUDE: Problem is not caused by chip failure. Circuitry Affected Description Chip designation RETURN TO FULL SERVICE. SID Sound interface device Location U18 on D o o i 1 LZZ] 2 C I — i C 1 L Fig. 4-53. Chip location guide. This represents the Commodore 64 computer motherboard and is a guide to help you find the chip of interest. EXT AUDIO IN CONTROLDATA BUS V C12 6567 6581 VIC SID (U19) ► (U18) VIDEO ■ R7 -wv R6 T I C13 RF MODULATOR VIDEO/AUDIO AUDIO OUT > C37 R38 Fig. 4-52. Audio circuitry. SUMMARY This detailed troubleshooting and repair chapter has covered most general problems experienced by owners (and repairers) of computer systems. You can take the final step (service center action) yourself, if you feel qualified. Chapter 6 is intended to provide some assistance to those of you who like to really dig into your machines; however, some cautions are appropriate. Caution: Only experienced technicians should work on power supply and monitor problems. Don't forget to absorb the information in Chapter 5, "Routine Preventive Maintenance," since the information covered there can help prevent many of the problems analyzed for repair in this chapter.

. CHAPTER 5 Routine Preventive Maintenance In Chapter 4, you stepped through detailed troubleshooting and corrective maintenance of the Commodore 64 computer. Chapter 5 discusses another type of maintenance, one that is intended not to fix a problem but rather to prevent a problem from ever happening. Preventive maintenance is in every way as important as corrective maintenance. In this chapter you'll learn what factors damage your computer and cause it to fail, and what you can do to prevent these failures. Often, the price you pay to buy your computer system is actually a small part of the overall system cost. The life-cycle cost of the equipment can be much larger than the initial purchase investment. This total cost increases dramatically as the costs for software, books, magazine subscriptions, those extra interface boards, disks, and service center repair charges are added in. Service costs can grow to be 10 to 50 percent of your system cost. Occasionally we find a repair expense that exceeds the value of the equipment that is broken. It's when we look at high repair costs that terms like mean time between failures (MTBF) and mean time to repair (MTTR) become important. While your Commodore 64 has a good reliability track record, the way you operate your machine and the environment in which you place it become important to that MTBF number. Another factor to consider is that those "bargain" interfaces and peripherals that you bought at such a low cost, probably have a less-than-excellent reliability record. You get what you pay for. Your Commodore 64 computer is sturdy, and fast, and it performs work easily and accurately. Under most operating conditions, Commodores are indeed very reliable machines. But, like other machines, they wear out and fail. As your experience with computers grows and the computer becomes more and more essential in your home and business, your need for uninterrupted computer power increases. The power of the computer can be seen in the impact it has on us when it breaks down. If you have to take your computer to a repair shop, you can expect your machine to be gone for one to three weeks, although most problems can be fixed within a day. Most large companies take steps to protect their huge computer and data processing investment. Accidents and unnecessary failures cost thousands of dollars in lost business. A small business, with a single microcomputer, two disk drives, and a printer, faces just as catastrophic a loss from system failure, yet most don't take steps to prevent such failures. 107

108 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Computers don't burn out. They wear out or are forced out by human error or adverse operating conditions. If you misuse your computer or don't protect it from the environment, you can be the cause of its failure. A few moments of care can result in many more hours of good, consistent performance. We call this care preventive maintenance, or just PM. Just as you periodically check the oil and water in your car, and lubricate, wash, and wax the body to keep it running right, so you should care for and protect your computer. Futurists today feel that there are three major kinds of items each of us will purchase in our lifetime— a house, a car, and (now) a computer. Each is a major investment. Each deserves to receive good care. You can get good, reliable operation from your computer for many months, if not years, if you provide timely and proper maintenance to keep the system in peak condition. CONTRIBUTORS TO SYSTEM FAILURE Proper PM begins with an understanding of what we are fighting. Table 5-1 shows the six factors that can influence the performance of your Commodore 64 computer (not including the disk-eating dog or the floppy-bending baby). The subjects listed in Table 5-1 are the enemies. Each acts to cause computer breakdown. This chapter tells how to successfully battle these enemies of reliable performance. Table 5-1. Contributors to System Failure Excessive temperature Dust build-up Noise interference Power line problems Corrosion Magnetic fields Heat As you learned earlier, the chips and other devices in your computer are sensitive to high temperatures. During normal operation, your Commodore 64 can generally tolerate the heat it generates. Usually, leaving your Commodore 64 on for long periods won't hurt it because the holes in the case around connector and plug slots let enough of the heat dissipate to the outside of the case. As long as the components on the motherboard are not too hot to touch, the amount of heat being produced should not cause any damage. However, heat can become a problem when you begin adding interface boards. The power supply has plenty of voltage margin and is protected against overload, but with increased power demand it also produces more heat. The design of the Commodore 64 case, with the motherboard lying flat, provides an open space for hot air to rise, but the air has a tendency to hang over the board rather than move out through the vents. Adding interfaces that connect to the motherboard, or peripheral connectors that plug into the sockets on the outside of the computer, further restricts any natural convection airflow, and the components get even warmer. The interfaces, the power supply, and the motherboard all give off heat, and the inside temperatures soar. Excessive heat within a component causes premature aging and failure. The heat produced during operation is not uniform across the device, but appears at specific locations on the chip (generally at the I/O connectors where the leads meet the chip itself). The usual effect of heating and cooling is to break down the contacts, or junctions, in the chip or other device, causing open circuit failure. The RAM chips are the components most often affected by heat. When hot, these devices can produce intermittent soft errors, with loss of or changes in data. This effect is known as thermal wipeout, and it is a chronic problem in loaded systems that aren't externally cooled. The continual heating and cooling action during normal operation also causes the socketed chips to work themselves out of their sockets. Heat can also contribute to disk failure. Disks, those inexpensive yet extremely valuable platters, act just like your stereo records when exposed to heat, especially the heat of the sun. If you leave your disks sitting in a hot car, you can be sure they will warp. If the thin disk warps too much, you will lose whatever information you stored on that floppy. You could try to set it flat in the sun and hope to warp it back into shape, but the success rate for this "repair" method isn't very high. The following suggestions should help in preventing heat-related failures: Reseat the socketed chips every six months (earlier if intermittent failures occur). Keep the cooling vents clear. Keep your system dust-free, inside and outside. Do your preventive maintenance actions (PMs) regularly. Keep disks in a cool, dry location.

ROUTINE PREVENTIVE MAINTENANCE 109 Cold The effect of cold on computers is an interesting subject. Government and industrial organizations in the United States are currently working on superfast computers that operate under supercold conditions. Electronic components operate quite well in cold temperatures, but mechanical components have trouble functioning when the temperature drops. Take disk drives, for example. The operating range for a standard floppy-disk drive is approximately 40° to 115° F. At the low end, mechanical sluggishness occurs, with an increased possibility of erratic data storage and retrieval. The floppy disk itself can become brittle as it gets cold. The rule of thumb for cold temperatures is to let the system warm up to room temperature (stabilize) before turning on the power. If the temperature is comfortable for you, it's fine for. the system. Dust and Other Particles Just like flies at a picnic, dust seems to descend on computer equipment. Interestingly, the dust is attracted to the display monitor in the same manner as it is to a television screen. If the dust isn't cleaned from the screen, it will build up, and eventually someone will rub it and mar the screen surface. The static electricity charge that builds up in the computer and the display monitor attracts dust and dirt. That's why large computer systems are kept in cool, clean computer rooms. They require special air conditioning and dust-free spaces because the large equipment generates more heat and is just as susceptible to failures caused by dust build-up. Dust and dirt build-up insulates the circuit devices and prevents the release of the heat generated during normal operation. If the devices can't dissipate this heat, the inside temperature rises higher than normal, causing the chips and other components to wear out even faster. Dust is a major contributor to memory chip failure. Dust seems to be attracted to heat. Have you ever noticed that dust builds up on light bulbs in your lamps or on the tops of stereos and televisions more than it does on cooler objects? The dust particles are charged and are attracted to the magnetic field around electrical equipment. Your computer system problems increase in direct proportion to the increase in dust buildup. Mechanical devices such as printers and disk drives fail more often than solid-state electronic devices because mechanical and electromechanical devices have moving parts that get dirty easily, causing overheating and earlier failure. Look inside your printer and you'll see the kinds of dirt and dust that are collecting. Paper sheds tiny particles as it moves through the printer. These particles become insulators to prevent the heat generated during normal operation from escaping into the air. Disk drives have more dust-related problems than printers because they are designed with read/write heads that operate on or slightly above the diskette. The space between the head and the disk is small. When the head rides on the disk surface, dust and dirt can cause major problems (Fig. 5-1). READ WRITE HEAD DISK FINGER PRINT Fig. 5-1 . With a read-head that rides on the surface of the disk, any small piece of foreign material can cause problems. Foreign particles such as dirt, smoke ash, and tiny fibers can cause catastrophic problems in diskette jackets and in disk drives themselves. The air we breathe is full of airborne particles, but most of these are too small to even be seen, let alone become a problem. The larger particles in the air cause computer system problems. Cigarette ash, for example, can settle on a disk surface and move from track to track inside the disk jacket, causing loss of data. Inside the vinyl jacket surrounding each of your disks is a special lining that traps dirt and dust as the disk spins in the drive. This doesn't mean you can get careless about dust and dirt. Dirt on a disk can be swept off by the drive read/write head and gouge out a path on the disk surface. Or it can stick on the head and cause other disks to be gouged. The dirt can also cause the head itself to corrode and wear out. Smoke from cigarettes and cigars can coat the internal surfaces of the disk drive with a gummy soot that not only can produce data transfer errors, but can also interfere with the mechanical operation, further increasing the wear on the drive. Tobacco is also believed to cause rapid oxidation on pins and connectors, increasing the likelihood of intermittent errors. Most computer centers and computer rooms are offlimits for smoking. Dust buildup can be controlled. Thoroughly cleaning your computer area every week will do much

1 10 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE to keep your system in top condition. Dirt and dust can be removed from the equipment housings using a damp cloth lightly coated with mild soap. Clean electrical equipment with the power turned off. Be careful you don't wet or moisten the electronic components. After washing the surface, I rewipe the outside of the equipment with a soft cloth dampened with a mixture of one part liquid fabric softener to three parts water. The chemical makeup of some liquid softeners is almost the same as antistatic chemical spray. Wiping the case and screen helps to keep static charges from attracting dust to the screen and tops of the hardware. The fabric softener is antimagnetic and prevents the attraction of dust. The chemicals in this inexpensive solution last longer than some antistatic sprays and help make your screens less susceptible to scratching. Another quite successful technique is blowing dust away from the screen with a pressurized can of antistatic dusting spray, as shown in Fig. 5-2. Using this kind of product means you don't have to wipe your equipment off first. Wiping a screen should be done carefully, because you could scratch the screen if some hard dust or dirt particles are on the screen or your cloth. Fig. 5-2. An antistatic spray for computer equipment. The following are some manufacturer-recommended cleaning methods: Use one part fabric softener to three parts water to clean your screen. Use mild soap and water, with a soft cloth for drying. Use a window cleaner spray. Note: Although the monitor literature from several manufacturers recommends this, be careful. Common household aerosol sprays, solvents, polishes, or cleaning agents may damage your monitor cabinet and screen. The safest cleaning solution is mild soap and water. Another way to keep dust off is to use an antistatic spray. Associated with cleaning advice, each manufacturer also includes an important safety precaution: Caution: Make sure the power is off and the plug(s) pulled out of the power socket(s). Use a damp cloth. Don't let any liquid run or get into your equipment. You can use a long plastic nozzle on the end of ■ your vacuum hose to reach in and around everything inside the hardware. Dust "and small particles can be cleaned off the circuit board inside your Commodore 64 using a soft brush. Be careful you don't damage any of the parts. Brush lightly. Another control measure is the use of dust covers. You may not have an air-conditioned, air-purified room in which to use your Commodore 64, so dust covers become of paramount importance. Plastic covers, made static-free with an antistatic aerosol or by wiping the surface with the fabric softener-water mixture, will provide good dust protection for your system. Here is a summary of ways to counter dust in your Commodore 64 system: Use dust covers. Keep windows closed. No smoking near your Commodore 64 system. No crumb-producing foods near your computer. No liquids on any equipment. Don't touch the surface of any floppy disk. Vacuum the system and the area weekly. Clean your monitor screen with static-reducing material. NOISE INTERFERENCE Your Commodore 64 computer and its peripherals are sensitive to interference noise which can affect the proper operation or transfer of information. But what is noise, and where does it come from? How can you get rid of it? Noise can be described as those unexpected or undesired random changes in voltage, current, data, or sound. Noise is sometimes called static. It can be a sudden pulse of energy, a continuous hum in the speaker, or a garbled display of characters. Three types of noise cause problems: noise that affects you, the user (acoustic), noise that affects your

ROUTINE PREVENTIVE MAINTENANCE 111 computer system, and noise that affects other electronic equipment. Acoustic noise includes, for example, the crying of a baby, the blare of an overpowered stereo, and the loud consistent tap-tapping of a computer printer. Noise that affects the computer and other equipment can be radiated, conducted, or received. It takes the form of electromagnetic radiation (EMR) which can be further classified as low-frequency or high-frequency radiation, and electromagnetic pulse (EMP) such as lightning, as shown in Fig. 5-3. If the noise occurs in the 1 hertz to 10 kilohertz (10 kHz) range, it is called electromagnetic interference (EMI). If it occurs at a frequency above 10 kHz, it is called radio frequency interference (RFI). RFI can occur in two forms: conducted RFI, and radiated RFI. If the RFI is fed back from the Commodore 64 through the power cord to the high-voltage AC power line, it is classified as conducted RFI. In this case, the power line acts as an antenna, transmitting the noise interference out. When your Commodore 64 system and its cables transmit noise, this noise source is called radiated RFI. EMI has three primary components: • Transient EMI • Internal EMI • Electrostatic Discharge (ESD) Transients include the undesirable response in electrical equipment when simply turning a device on or off causes a large voltage pulse, or spike, to occur and go smashing through the circuitry. Power line transients and electrostatic discharge from the human body are the two most severe forms of externally generated EMI. Internal EMI is the noise generated within and by the chips and other motherboard devices. With current microelectronic designs, internal noise levels are so low that other factors such as connections and the length of leads have become the main source of noise in printed circuits. Internal noise does become a problem when the components are excessively heated or when the chips begin to fail. The last form of EMI, the electrostatic discharge (ESD) is the same as the effect you get from walking across a carpet and then getting shocked upon touching a metal door knob. ESD.can cause the notorious glitch in electronic circuits. All these types of noise interference can produce undesirable or damaging effects in your Commodore systems. They can cause programs to stop in the middle of an operation, garbage to be read from or written to disks, garble to appear on the screen, cursors to freeze, diagonal lines to appear on the television or monitor screen, paper to jam in the printer, memory to wipe out, and the motherboard chips to be destroyed. Noise interference must be prevented by reducing or eliminating noise. This is not an insurmountable challenge, but it is a substantial practical and analytical task. WHERE DOES INTERFERENCE COME FROM? Noise in the computer system can originate in many places, including power supplies, fans, the computer itself, other equipment, connectors, cables, fluorescent lights, lightning, and electrostatic discharge. The use of high-powered components in ACOUSTIC NOISE Fig. 5-3. The various kinds of noise that affect computer equipment. NOISE WE MAKE LIGHTNING ELECTRONIC/ELECTRICAL NOISE TRANSIENTS ESQ INTERNAL NOISE WE HEAR EMP EMR EMI RFI CONDUCTED 1 RADIATED GLITCH

1 12 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE switching power supplies has led to widespread problems with noise being conducted back into the power lines. Switching power supplies have been found to generate EMI in the 10 to 100 kHz frequency range. Noise can even be passed or coupled to nearby equipment that's on a totally different circuit and not physically connected to your system. If two wires lie next to each other, one can pick up signals coupled across from the other. This is known as crosstalk. Just 10 volts of electricity on one wire will cause a measurable voltage (0.25 volts) on the other wire. Imagine how much crosstalk there could be if the voltage were increased to 100 volts. The induced voltage on the other wire would be 2.5 volts, which is enough to change information in a stream of data being sent through that second wire. Another noise-maker that will affect your computer is capacitance. Everything has some capacitance associated with it. Some typical capacitance values are shown in Table 5-2. Engineers have found that even 0.1 picoFarad of capacitance can produce 5-volt spikes in digital circuits such as those found in the Commodore 64. Table 5-2. Typical Capacitance Values You and I 700.0 pF A Vi Watt Resistor 1 .5 pF A Connector (Pin-to-Pin) 2.0 pF Power-line noise can feed into the computer circuits whenever it exceeds the blocking limits of the power supply. Nearby high-voltage machinery such as stamping mills, saws, air conditioning units, or clothes dryers can produce strong magnetic fields in the area around them and in their power cords. Cables that vibrate and move in a magnetic field can also cause problems. Relays and motors can produce high-voltage transients as they are turned on or off. And televisions and radios can be affected by noise coming from the computer system. Any digital circuit that uses a clock signal will emit or radiate interference off the cables connected to that circuit. The Commodore 64 MPU operates at a clock speed slightly over 1 MHz — inside the frequency range of the radio and television signals. (Recall that RFI covers all noise that occurs at frequencies above 10 kHz.) If the Commodore 64 system were not designed to correct for this type RFI, the MPU transmissions would interfere with the normal operation of nearby radios and televisions. Note: Televisions on cable service would not be affected because the shielded cable allows only the cable TV program signals to get into the TV antenna. Finally, EMI can come from industrial, medical and scientific equipment, electric motors, home appliances, drills, saws, and tool speed controls. It's important to understand noise and how it can be generated. Our computer systems must be able to operate without causing interference with other nearby electronic equipment. They must be able to function without radiating noise; and they must be able to function even in an environment that includes noise being introduced from outside sources. NOISE INTERFERENCE COUNTERMEASURES The most effective approach to noise reduction is prevention. If you can't prevent noise, you can at least take steps to minimize its impact. Five methods for dealing with noise are shown in Fig. 5-4. Usually, the approach taken is a combination of these methods, although filtering and shielding are the most widely used ways to protect electronic equipment. Filtering involves the use of capacitors and inductors. There are many kinds of filters that respond to voltage, current, and frequency. For example, one kind of filter prevents high-frequency voltage spikes from leaking out of a switching power supply into the circuitry being supported. NOISE COUNTERMEASURES BONDING CONNECTIONS SHIELDING WIRING FILTERING COMPONENT DESIGN Fig. 5-4. Five ways to counter noise interference.

ROUTINE PREVENTIVE MAINTENANCE 1 13 The following paragraphs present countermeasures used to prevent the various forms of noise interference. Audibie Noise Most microcomputer systems don't generate enough audible noise to require acoustic shielding or enclosure. The normal busy office can generate about 80 decibels (dB) of noise. The noisiest part of a computer system is the printer. Most printers don't exceed 70 dB of noise, but the type of noise (tap-tap printing) can become so irritating that many companies purchase insulated sound-trapping enclosures that fit over the printers and cut the noise output in half. In some computers, cooling fans can be another source of audible computer system noise; but your Commodore 64 system doesn't really require a fan. • Some computer users place acoustic soundabsorbing foam around their computer system area to achieve a quieter operating place. Acoustic pads placed under disk drives and printers can significantly reduce noise. Electromagnetic Interference (EMI) This is an unplanned, extraneous electrical signal that affects the performance of your Commodore 64 computer system. It can cause memory errors and data file destruction. It can appear as power supply drift, voltage ripple, unplanned logic signals, or circuit crosstalk. While circuit designers try to minimize EMI, it is a natural by-product of aging components, bad solder joints, damaged or corroded connector contacts, and loose connections. It is also produced when a burst of electromagnetic or electrostatic energy is conducted or induced through the circuitry. An externally produced EMI enters the Commodore 64 through the cable or openings in the case. Sometimes it will enter by static discharge through the case of the disk drive. The Commodore 64 case is made of injection molded plastic. It is lightweight, durable and rustproof. While these are good qualities, plastic does have some disadvantages. Plastic isn't as strong as metal, and unlike metal, plastic doesn't conduct electricity so it provides no protection against EMI or RFI, nor even ESD noise. The Federal Communications Commission (FCC) has established specifications that computer equipment must meet regarding the amount of radiated noise allowed to exit the chassis. The FCC places any devices that conduct or radiate EMI of frequency above 10 kHz into one of two categories: Class A — Industrial computing devices sold for use in commercial, business, and industrial environments and not sold to the general public. Class B — Consumer computing devices used in commercial, business, and industrial • applications plus personal computers and their associated peripherals. The Commodore 64 is considered a Class B consumer computing device, and the EMI emitted is strictly regulated, as shown in Table 5-3. Table 5-3. E v 1 Requirements for L-ic^b 3 b r •.Frequency Distance Emi Field Strength (MHz) (meters) (microvolt/meter) 30-88 3 100 88-216 3 150 216-1000 3 200 Both conducted and radiated EMI are regulated. Conducted EMI in frequencies between 450 kHz and 30 MHz must be reduced by 48 dB for levels above one microvolt. Radiated EMI must be reduced by at least 46 dB, measured three meters away from the source. To meet these requirements, Commodore Business Machines, Inc. installed metal foil shielding inside the Commodore 64 computer. While this brought the EMI within limits, EMI still leaks out of the computer, since it gets out anywhere there is an opening on the chassis — the slots at the rear of the chassis, the vent holes, the power connecter socket, and even the keyboard key holes on top of the case. The Commodore 64 molded plastic chassis could be improved by the addition of modifiers of aluminum alloy flakes or fibers to provide EMI shielding, static charge dissipation, and resistive heat conduction in the case. The improved electrical and thermal properties of the chassis to shield against EMI could eliminate the need for painting or metal spraying to provide protection. The resistive heat conduction would mean that the temperatures generated inside the Commodore 64 could be dissipated through the case, greatly aiding in component longevity. Commodore 64 design engineers have employed most of the following techniques to reduce EMI/RFI:

1 14 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Use decoupling capacitors (0.01 iaF to 0.1 ptF). Carefully lay out components. Keep traces as short as possible. Minimize transistor-transistor-logic (TTL) since it tends to generate current spikes when switching logic states. Shield sensitive circuits. Reduce noise sources. Use fewer components. Carefully route wires. Use a shielded cabinet with minimal openings. Use foil shielding Cables are a source of EMI/RFI. Both the internal cables and those external cables leading to your monitor, printer, and disk drives can radiate noise interference. How can you improve on Commodore 64's efforts to counteract EMI? Since you won't be changing the circuit board design, you reduce EMI interference in two ways: (a) prevent it from reaching the motherboard and interface card circuits, and (b) keep it contained within shielded enclosures. To do this, use shielding, grounded cables, filters, and transient absorbers. Metal enclosures make the best shields. Notice that your switching power supply, a high source of EMI, is enclosed in a metal can. The greater the shield thickness, the better the shield affect. While the plastic computer case is easy for Commodore Business Machines to shape, it's transparent to EMI, so Commodore added shielding inside the case. You can improve on the shielding by sealing all openings that aren't being used. Compressible gaskets can be used to close slot holes. Metal honeycomb ventilation screens can be used over cooling vents. Use shielded cables. A shield is a conductive coat or envelope placed around a conductor wire or group of wires to provide a barrier to electromagnetic interference. Ground the shields. Some connectors can be purchased with built-in filter pins to reduce radiated EMI count around connectors. Other EMI-reduction devices include the ferrite "shield beads" which are placed on power supply leads and connections to ground, or between stages on the circuit board. Electrostatic Discharge (ESD) It sometimes appears that a wizard with a weird sense of humor secretly loads into every computer a program that intermittently produces random errors, or glitches, to drive users wild. Chasing and catching the elusive phantom glitch is a challenge even for experienced repair technicians using expensive and complex troubleshooting equipment, but you can learn more about this intermittent problem and how to prevent it from affecting your computer operation. Glitches are electrical disturbances of short duration but often of long enough duration to cause problems in digital cjrcuitry. They are usually the result of an electrostatic discharge (ESD), one of the most severe sources of EMI. People and objects such as chairs and desks can accumulate a substantial electrical charge or potential. The human body can accumulate static charges of up to 25,000 volts. It is not unusual to build up and carry charges of 500 to 1 5,000 volts. Charged objects or people can then discharge (quickly get rid of the voltage) to a grounded surface through another object or person. Remember the times you dragged your feet across the carpet and then shocked someone nearby? This electrical charge is static. It can discharge through your computer, and when it does, all sorts of undesirable things can occur. If a program is running and a computer user carrying a large potential of electrical charge touches a key on the keyboard, the arc of discharge will find the shortest route to ground, usually through the RAM or MPU, and the program will bomb to a halt, data bits falling away everywhere. The screen can go wild and display weird characters. Sensitive components can be damaged or destroyed. Even a charge of only three volts is enough to create an erroneous bit in most logic circuits. Electrostatic charges can be of any voltage. The following is a list of some of the sources of ESD glitches: • People in motion • Overheated components • Improper grounding • Poorly shielded cables • Improperly installed shields • Missing covers and gaskets • Circuit lines too close • Poor solder connection • Low humidity We know that static occurs when two objects are rubbed together. Your movement, walking while wearing wool or polyester slacks, can cause a tremendous

ROUTINE PREVENTIVE MAINTENANCE 1 15 charge of electricity to build up on your body. When this charge reaches 10,000 volts, it is likely to discharge on any grounded metal part. Litton Systems, Inc. has developed the triboelectric series chart shown in Table 5-4. Cotton is the reference material since it absorbs moisture readily and can easily become conductive. If any material on the list above cotton is rubbed with any material on the list below cotton, the item listed above will give up electrons and become positively charged. The item listed below cotton will absorb electrons and become negatively charged. Table 5-4. The Litton Systems, Inc. Triboelectric Series Air Your Hand Asbestos Rabbit Fur Class Your Hair Nylon Wool Fur Lead Silk Aluminum Paper > Cotton Steel Wood Hard Rubber Nickel, Copper Brass, Silver Gold, Platinum Acetate, Rayon Polyester Polyurethane Polyvinyl Chloride Silicon Teflon The two oppositely charged materials will tend to cling together. If they are separated, a static charge difference occurs. If Teflon™ is rubbed in your hands, a large electrostatic charge is built up. The farther apart the materials are listed in Table 5-4, the larger the charge that can build up. Notice that hair is listed above cotton. Hard rubber is below cotton. Paper is listed just above cotton. Have you ever pulled a rubber or plastic comb through your hair and then used the comb to pick up pieces of paper just like using a magnet? This is electrostatic charge in action. Our problem occurs when this charge builds and becomes quite large. Just walking across a carpet can generate over 1000 volts of charge. If the humidity is low and the air in the room is dry, the charge can be substantially higher. (When the relative humidity is 50 percent or higher, static charges generally don't accumulate.) A built-up static charge will readily arc to any grounded metal, such as a disk-drive chassis. An ESD release on your disk-drive case won't hurt you, but it can be very damaging to the system's electronics. The discharge pulse drives through the case to the read/write head and then on to the analog card circuitry where it can burn out some of the chips. Even if no components are fried, the damage that is done by this overvoltage spike accumulates and starts to degrade the functioning of some circuit board components. Sooner or later the ohip(s) fail(s) completely. If your computer occasionally gets the shock treatment or pulls the old disappearing data trick on you, there are some things you can do. The following list offers some specific solutions to ESD problems. Use antistatic spray on your rugs, carpets, and computer equipment. The antistatic spray applied with a soft cloth works both as a static reducer and control measure. Install a static-free carpet in your computer area. Install an antistatic floor mat beneath your computer chair. (This is the most popular solution.) Mop hard floors with an antistatic solution. The antistatic floor finish works well, but this is really an expensive solution and more suited for electronic manufacturing facilities. Most antistatic floor finishes work for up to six months. Install a conductive table top. Install a humidifier to keep humidity above 50 percent. Use static-free table mats. Keep chips in conductive foam (that black styrofoam-looking material). Touch a grounded metal object (power supply case) before touching anything inside the computer. You can defeat ESD glitches by paying attention to static charge in and about the computer system. By making static charge elimination a part of your preventive maintenance program, you take one more step to extending the longevity of your computer system. Radio frequency Iruerterence (KFi) Radio frequency interference noise is much the same as EMI except it occurs at higher frequencies (above 10 kHz). RFI is what causes five other garage doors on your street to open when you operate your

1 16 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE new automatic garage door opener. You'd really rather it didn't work like that. Although RFI isn't a health hazard, it's controlled just as EMI is. FCC Rule, Part 1 5, Subpart J states that any digital product that generates timing signals or pulses at rates greater than 10 kHz must comply with FCC regulations. In fact, Class B devices like the Commodore 64 computer are tested over a range of 30 to 1,000 MHz to ensure their emissions fall below maximum field strength limits. The computer is also limited in the amount of emission that it can feed back along the power lines (250 microvolts). The same chart that applies to EMI field strength radiation also applies to RFI. The only sure way to completely block RFI emissions is to completely enclose your computer system in a shield. This is impractical, but there are other solutions to minimize or reduce the emission of RFI. The Commodore 64 enjoys some major improvements over a number of computers in handling RFI. The smaller component count in the computer reduces the number of sources for RFI and improves the system operation. The 23 unmarked devices labelled FB-1, FB-2, etc. on the Commodore's motherboard, are not inductors, but ferrite beads. These components are mounted in the circuits to help prevent signals from radiating off the board and interfering with other nearby electronic equipment. Reliability improves in direct proportion to RFI improvements. There are some actions that you can take yourself to improve your system's RFI condition. Locate your computer system at least six feet away from any television set not being used for your own display. Reposition the outside TV antenna if interference occurs. Use a directional outdoor TV antenna. Subscribe to cable TV. Connect traps or line filters on your TV. Replace the antenna twin-lead wire with 75-ohm coaxial cable. With current computer designs, and FCC direction, the RFI emissions are so low that interfering with your neighbor's TV set is no longer a problem. POWER-LINE PROBLEMS Probably the most important environmental factor for your computer system is good, clean power. If you depend on your local utility to supply this power in steady, reliable consistency, you may be disappointed. While room lighting systems can tolerate line voltage problems that momentarily dim the lights when a large power-hungry machine is switched on, computer systems cannot. Your Commodore 64 computer, like most electronic computers today, is more sensitive to power-line disturbances than other electrical equipment. Even well designed machines such as your Commodore 64 are affected by the quality of power provided. Undervoltage or overvoltage puts severe stress on computer components. The effect is an acceleration in the conditions under which devices gradually weaken, become marginal, and finally wear out. As shown in Fig. 5-5, there are four types of powerline problems that cause concern. POWER LINE PROBLEMS BROWNOUT BLACKOUT TRANSIENT NOISE rig. ^-.5. The four types of power-line problems. Brownouts Brownouts are those planned (and sometimes unplanned) voltage sags, when less voltage is available to drive your Commodore 64 power supply, display CRT, and printer motor. Brownouts are far more common than you may realize. Voltage dips are common if you operate your computer near some large electrical equipment such as air conditioners or arc welders. Your line voltage can be drawn down as much as 20 percent by the heavy momentary drain caused when this equipment is turned on. The Commodore 64 should still work with line voltages that drop and remain 20 percent below the 1 1 7 volt rating. But if the supply voltage gets too low, the regulators in your power supply won't be able to supply adequate power into your motherboard, and data can get garbled. During brownouts, computer systems can operate intermittently, overheat, or simply shut down and lock up. By the way, your power supply can handle a volt

ROUTINE PREVENTIVE MAINTENANCE 1 1 7 age "brown-up" (increased line voltage), providing proper power to your circuit, but the power supply regulators will generate a lot more heat as they handle the extra incoming voltage. Blackout Power-line blackout, a total loss of line voltage, can be caused by storms and lightning. It can be caused by vehicles accidentally knocking down power lines or even by improper switching action by a power station operator. When power is lost, whatever you had in RAM is gone. If you are writing to the disk when power fails, you will have only a partial save— the information that was still in RAM and not yet copied over to your disk is lost. If you know a power outage is planned, postpone using your computer. If the weather turns bad and thunder is echoing across the sky, don't turn on your computer. If a blackout occurs or if you see lightning, turn your machine off and pull the plug(s) until the storm passes. And when the power goes out, be careful. While the room lights are out and you're muttering under your breath as you feel around for a flashlight, remember what is sure to happen when power is restored— a tremendous voltage spike wrll be produced as lights and motors go back on all over the neighborhood. This could damage the Commodore 64 system. Always unplug your computer system when blackout occurs. Wait until power has been restored for a few minutes, then turn your system back on. Don't test your power supply filters on these kinds of spikes. Transients Other than electrostatic discharge, power-line transients are the most devastating form of noise interference in computer circuits. Transients are large, potentially damaging spikes of voltage or current that are generated in the power lines feeding electrical power to your community. Spikes can be caused by lightning striking a power line somewhere, utility company equipment failure, or the on/off switching action common to the use of any electrical tool or appliance. Most of these spikes are small and are barely noticeable, but some voltage spikes as large as 1,700 volts have been measured in home wiring. Residential areas experience more large-spike transients than commercial areas. The line filters in your Commodore 64 power supply will protect your system from most highvoltage transients, but occasionally a spike overcomes the power supply protection and gets to the logic circuitry. The general result is erased or altered data, but if the spike is too large, sensitive circuit devices can be destroyed. Your Commodore power supply is normally not affected by the transients generated by on or off switching actions. These actions can produce a short-lived spike that is five times normal line voltage. Spikes are not all generated outside the Commodore 64. When you save a program or file which you've developed, activating the disk drive produces a voltage spike inside your computer. Commodore 64 engineers have placed capacitors in strategic locations on the motherboard and in the disk-drive electronics to carry spikes harmlessly away to ground, preventing component damage. If any part of the spike reaches the circuit components, the devices are stressed and can become marginal. PREVENTING POWER- LINE PROBLEMS If you live in an area where power outages or brownouts are common, or where electrical storms occur when you aren't ready, or if your computer system occasionally hangs up, you need protection. There are two kinds of approaches to preventing power-line problems. You can condition the power being supplied, or you can provide an auxiliary, or backup, power source as shown in Table 5-5. The various forms of power-line conditioners include the isolator, the regulator, and the filter. Table 5-1. J.:r. yascVVVr,- '

1 18 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE into your system. These devices are installed across the power-line wires leading into your computer. The December, 1983, issue of Byte magazine has a good article on installation of MOV devices. Isolators cannot provide protection against brownout or complete loss of electrical power. Regulators act to maintain the line voltage within prescribed limits. They are essential if line voltage varies more than 10 percent at the computer, but they don't provide protection against voltage spikes and blackout. Fil*ers remove noise from the input power line. They short EMI/RFI signals to ground and remove highfrequency signals from thre low-frequency 60-Hz power line. Power-line filters work best when they are located immediately next to, or at the front end of, the power supply. Filters don't stop spikes. Nor are they effective during low or high voltage conditions. When power availability is in question, an auxiliary power source is a necessity. Two choices are available: an uninterruptible power supply (UPS), and a portable generator. The UPS is used to store energy when line power is present and deliver that power to the computer when a blackout occurs. These power supplies can cost between $300 and $15,000, but they are a dependable source of auxiliary power. A UPS is composed of a motor, a generator, and a battery. The motor is driven by power from the utility line while local power is available. The motor turns a generator which produces electricity to charge a battery. When local line power is lost, the battery turns on the generator to produce AC electricity that can be used by the computer. As shown in Fig. 5-6, there are four types of UPS equipment that can be used to power your computer system. UNINTERRUPTIBLE POWER SUPPLIES (UPS) CONTINUOUS SERVICE MOTOR GENERATOR REVERSE-TRANSFER UPS FORWARD-TRANSFER UPS Fig. 5-6. The four types of UPS equipment. A continuous-service UPS changes the AC line voltage to DC to charge a set of batteries. When power is lost, the batteries operate an inverter which changes the DC battery power back to AC to run your computer. Remember that UPS equipment is only intended to provide power long enough to safely shut down your computer system without experiencing damage. Portable and fixed motor generators are powered by electricity, gasoline, or diesel motors. The generator is turned by the.motor and supplies a regulated AC voltage to operate your computer system (and probably many other appliances and lights in your house or business). These devices are often used as emergency backup power for hospitals, police departments, and radio stations. Generators can be expensive, but they can provide backup power throughout the period line power is not available. A forward-trinsfer UPS supplies power to your computer system only when line power is lost. It is the classic UPS, in which the line power drives a motor that rotates a generator which charges a battery (or set of batteries). When line power is lost, the batteries take over and provide AC power to the computer through an inverter. A reverse-tr?nsfer UPS provides power to the computer from a battery most of the time, and switches to line power only if the UPS fails, or is turned off. Some UPS equipment provides much more than just a power source. One company markets a UPS that provides protection not only against total power loss but also against power transients, under and overvoltage fluctuations, brownouts, and dirty (noisy) lines. Most UPS devices can switch to battery power very quickly. One UPS makes the transfer from primary power to battery power in about 4 milliseconds. Once the transfer occurs, the next important consideration is the length of time the backup will be able to provide power. Some units will keep your computer system running long enough to save what you had in RAM and to conduct a normal system shutdown. A unit from Topaz, Inc., in San Diego, California, can provide up to an hour of reliable AC power. It sells for about $800. How important is a UPS and the time it can provide power? If you are in an area that suffers frequent power outages, consider this: What effect would losing power at the time you were updating your disk directory have on your system? Likely, you'd lose your directory and not be able to retrieve whatever you had on your disk. The problem can be much worse when you connect a hard disk into your system. If a power outage occurs when the hard disk is activated or even simply

ROUTINE PREVENTIVE MAINTENANCE 1 1 9 powered up, there is no way for you to conduct a normal power-down sequence. If your hard disk requires the read/write heads to be in a certain position, you can't achieve this unless you have a UPS that switches on instantaneously. Failure to properly position the heads can cause drive damage as well as loss of valuable data. You have some choices. What level of insurance do you need? Can you manage adequately without standby power — making backup copies of all your data, and saving to disk often during computer operation? Power line protection can prevent damage, expensive data loss, and unnecessary down-time. When selecting a power line conditioner or a backup power supply, consider these parameters: 1 . Power line conditioner Speed of response in handling voltage spikes Ability to filter out high-frequency noise Ability to handle repeated transients Amount of line power it can handle Range of input voltages it will handle for clean power out Multiple outlets to handle several devices 2. Backup power supply Total power backup required Time to switch to standby power Length of time backup will provide power Availability of built-in line conditioning Availability of under and overvoltage protection Battery life cycle To determine how much backup power you may require, add the amperage ratings on the label plates of all the Commodore 64 system equipment (computer, external display monitor, printer, drives, plotters, etc.) and multiply by 120. The result is the approximate wattage, or power, you will require to operate the entire system. Since the larger the amount of power required, the higher your cost, you may want to consider only the power required to operate the basic system (computer, monitor, and disk drives). You can leave the other peripheral equipment plugged into your standard wall socket and let these fail when power is lost. If you do this, don't forget to turn these machines off and unplug the power cords before power is restored to prevent a big transient from damaging them. How much power protection to provide is up to you. Many computer users are able to get along quite well with unprotected systems. Others prefer to operate their systems knowing that unseen environmental upheavals won't affect access to their Commodore system. CORROSION The metal connector pins on cables, interface cards, and chip pins are subject to corrosion, a chemical change in which the metal plating of the pins and sockets is gradually eaten away. Corrosion is undesirable and damaging. There are three types of corrosion that can affect the Commodore 64 system: • Direct oxidation by chemicals • Atmospheric corrosion • Galvanic electrical corrosion Direct Oxidation In direct oxidation a chemical corrosion occurs. A film of oxide forms on the metal surface, reducing the pin's contact with the socket. At high temperatures this oxidation process accelerates. The metal is slowly worn away as the electrical contact surface is converted to an oxide and the oxide crumbles. Atmospheric Corrosion Chemicals in the air attack the metals in computer system circuitry, causing pitting and a "rust" buildup. In the early stages of this corrosion, sulfur compounds in the atmosphere are converted to tiny droplets of sulfuric acid that lie on the surface of the connector pins. This acid eats away the metal causing pits to form. In the early stages of atmospheric corrosion, the contacts can be wiped clean, restoring the metal brightness, but if the sulfuric acid is allowed to remain, the long exposure converts the acid to a sulfate layer that can no longer be wiped away. The effect is to reduce electrical contact between the pins and their sockets. A layer of discolored rust that prevents any contact between the pins and their sockets causes an open circuit, and can be located. It's the in-between stage, when the almost-open condition

120 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE exists that produces those horrible intermittent failures that can be so hard to find. Near the ocean the presence of salt spray or increased levels of chlorides can cause severe pitting of some metals. Galvanic Corrosion In galvanic corrosion, a tiny crack or hole in the metal plating on a pin or connector lets an electrolyte, such as salt (sodium chloride), in moisture penetrate between the metal plating and the underlying base metal. A kind of battery forms, with a tiny electric current flowing between the two dissimilar metals. The plating surface becomes scaly and rough as the plating is slowly eroded away. The corrosive action is concentrated on the underlying metal exposed at the breaks in the scale since this is where the galvanic battery exists. The effect is the same as for the other forms of corrosion— the electrical contact between the pin and the socket decreases, causing intermittent problems, until the scale is so complete the electrical circuit is broken and signals are blocked entirely. You can actually cause this corrosive action to start if you handle your connectors and boards improperly. The wrong way to handle printed circuit boards is demonstrated in Fig. 5-7. Fig. 5-7. Handling a printed circuit board the wrong way can cause corrosion to occur. Note: Never touch contacts with your fingers. The oils on your fingers contain enough sodium chloride to begin corrosion action on those pins. CORROSION PREVENTION While metal gates and cars can be painted to prevent rust (oxidation), this is not an option for preventing corrosion on circuit pins and connectors. The best preventive action is cleaning. By keeping the contacts clean, you can deter oxidation buildup and prevent the occurrence of intermittent glitches. Clean the pins on some chips by reseating the chips periodically. .Chips have a habit of working up out of the sockets after extended use. Turning off all the power and carefully pushing these devices back down into their sockets will act to clean the pin surface, restoring (or ensuring) good electrical contact. The reseating action cleans the pins and restores optimal electrical contact. Caution: Always turn off the power and touch a grounded surface before touching anything inside the Commodore 64 case. The finger contacts of connectors on the edge of the motherboard can be cleaned of oxidation with a soft rubber eraser, a solvent wipe, or a contact cleaner spray. Caution: When rubbing to clean contacts, always rub along the pin (lengthwise). Rubbing lengthwise on the pins prevents accidentally pulling a pin contact up off the board. If you use a rubber eraser, keep eraser dust away from the computer. The best contact cleaning technique is to use solvent wipes, available individually, or as part of cleaning kits sold by many computer supply companies. These wipes can clean and lubricate the contact surface with a film that helps seal out atmospheric corrosion without interfering with signal flow. Most solvent wipes are individually wrapped in small packages, much like hand towelettes. Spraying the pins with a contact cleaner spray (available at most electronic parts stores) is also an effective corrosion preventive measure. Contact cleaner wipes and spray are the best methods for removing an oxidation layer. There is a trade-off between preventing corrosion and preventing electrostatic discharge, because corrosive action is reduced with a reduction in the relative humidity, but ESD increases. Electronic manufacturers are aware of the effects of corrosion, and most connectors are made of a combination of metals that resist corrosion but are good conductors of electrical signals. You can choose the type of connectors to use for your cables. Cables and

ROUTINE PREVENTIVE MAINTENANCE 1 2 1 connectors have either a tin alloy plating on the pins or a thin gold plating. You can imagine which type is more expensive. Although you will pay more for the gold-plated connectors, they can be "worth their weight in gold," because they provide superior contact reliability. Goldplated contacts don't wear out like tin alloy surfaces do; but even the tin surfaces take a long time to wear away, so a sound, consistent cleaning program can really help. One final note on the subject of corrosion: high temperatures will increase the corrosive action in the Commodore 64 system. It helps to keep your computer tuned-up and running cool. MAGNETISM The effects of magnetism are especially important in disk and disk drives, since these two parts of the Commodore computer system are designed to operate on magnetic principles. Each floppy disk is coated with a magnetic oxide with millions of tiny pole magnets randomly positioned on its surface. As the drive write-head passes over the disk surface, a magnetic force is induced in the head by the disk-drive electronics. This force causes the pole magnets on the disk surface to line up according to the digital information being converted to voltage pulses in the head. This is good magnetism. The voltages used in monitors and television receivers produces strong magnetic fields. These can be bad. If you accidentally place one of your disks in the field, the tiny pole magnets on your disk's tracks can change their alignment. Then when your disk drive tries to read the disk, the head cannot understand, or can misinterpret, the information on the disk and you get garbage, or UNABLE TO READ error messages. Magnetic flux is caused by the presence of a high (115 V) voltage in computer display monitors and televisions. A color television produces the strongest magnetic flux, but high voltage areas of monitors, printers, telephones and even power strips can be sources of offensive flux and can cause intermittent data loss. The strength of the flux field depends on the amount of power being required by the equipment. The moral is: keep your diskettes, and even your information cables away from power sources. PMs FOR FLOPPY DISKS Two valuable components in any Commodore system are the mass-storage media (disks) and the disk drives. Many Commodore 64 systems use 5'/4-inch floppy disks as the mass-storage medium. Technically they are called diskettes, to differentiate them from the disks used in 8-inch drives, but the terms floppy and disk are so commonly used for the 5 '/4-inch diskettes that the term disk will suffice. Since disks and disk drives are such critical components in computer systems, it makes sense to do all you can to protect and maintain them. The read/write head in the Commodore 64 disk drive rides on the most vulnerable part of the massstorage system, the floppy disk. Floppy disks are made of mylar or polyethylene terephthalate and coated with a magnetic iron {ferric) oxide. As shown in Fig. 5-8, the oxide-coated mylar disk, or cookie, is placed in a protective polyvinyl-chloride jacket. Fig. 5-8. A floppy disk with the jacket lining exposed. Disks are pretty sturdy things, but they are sensitive to magnetic and electrical fields, high temperature, low temperature, pressure, bending, and dust. Dust and little airborne fibers are particularly bad for your disks. With the drive read/write head riding on the surface of the disk, any tiny piece of dust lying on your disk looks like a huge boulder to the head. A piece of your own hair (assuming you still have some after your last computer failure experience) is about 40 microns (.001 5748 inch) thick. A hair is a huge obstruction to the disk drive head. Even dust and fingerprints on the disk surface cause obstacles to the smooth movement of the disk under the head. To protect the disk medium, and the head, each disk jacket is lined with a dust-catching synthetic fiber. As the disk is rotated inside the drive at 300 rpm, dust and other particles that may have slipped inside the jacket or settled on the disk are quickly

122 COMMODORE 64 TROUBLESHOOTING &, REPAIR GUIDE swept off the disk by the liner material. But a buildup of too many particles can overload this protective system. Another substance that is harmful to disks and disk drives is tobacco smoke. The tar and nicotine that filter up into the air from the ends of cigarettes and cigars (or out of the lungs of smokers) can settle on your computer system. These sticky chemicals form a gummy ash buildup on any exposed surface — including your disks and your disk drives. This material gums up the drive, eats into the read/write head, and scratches the surface of your disks. The effect is similar to taking a metal file to your favorite record album. Avoid smoking or allowing smoking in your computer area. If you can't do this, then clean your system more often. Disks are further protected by the paper storage envelopes, or sleeves, into which the square disk jackets are inserted. Use these envelopes. Don't let your disks lie around outside the envelope; that invites dust and dirt trouble. Not all disks are created equal. Some disks are manufactured to better standards and with thicker magnetic oxide coatings. Naturally, these disks are more expensive. Less-expensive disks have thinner oxide coatings and shed their oxide layers easily, further reducing their effective life. Compare disk specifications before you buy. Depending on the quality of your disks, the cleanliness of your computer area, and the condition of your disk drive, your disk's life could be as short as a week or as long as 17 years, or 70 million revolutions. Assuming the quality, cleanliness, and condition factors are favorable, disk life is estimated on actual rotations while the disk read/write head is in contact with the disk surface, rather than on total time of existence. As the drive head rides the disk's oxide surface, it causes tiny bits of oxide to rub off the disk. Most of these loose oxide particles are caught and held by the liner, but some of the oxide sticks to the head. Gradually an oxide layer builds up. This oxide layer has two effects on system operation: (a) it makes the head less sensitive to reading and writing data; and (b) it causes an abrasive action on the disk surface. As the oxide layer builds up, it becomes ragged. This roughness scratches even more oxide off the disk, until the oxide on the disk surface is too thin to support data storage. When oxide is missing from the surface, drop-outs, or spots, occur where data can no longer be stored. Then the disk drive fails to read or write properly, and it becomes useless. Keeping this oxide layer from building on the read/write head will help extend the life of your disks. The better .disks are less likely to spin off oxide particles, so the head stays cleaner longer, and the disks last longer. Note: Disks make different sounds in the disk drive, depending on the type of liner used. Some types of liners provide more wiping action than others. Although the disk may sound like coarse sandpaper when it spins in the drive, that doesn't mean the disk surface or the drive is being harmed. A louder disk may actually be doing a better job than a quieter disk. Toward Longer Disk Life Here is a summary of what you can do to help extend disk life. 1. Buy name-brand disks. Avoid bargain disks. The $7-disk should last seven times as long as the $1.50-disk. 2. Never touch the disk surface. 3. Never slam the disk door closed on a disk. You could press the disk centering hardware into the disk surface instead of the disk hole. 4. Store disks in their protective jackets. 5. Never write on a label that's on a disk. Ballpoint pens and pencils can cause indentations in the disk surface. Mark the label first, then put the label on the disk jacket. 6. Store disks in a cool, clean place. 7. Back up everything. 8. Store working disks and backup disks in different places. 9. Don't lay disks in the sun. They warp just like stereo records do. 10. Never allow smoking near your disks or your drive. Smoke contains tars that can settle on the disk surface (and inside the drive), gumming up the works. 1 1 . Never set disks by monitors or televisions. The magnetic fields can erase data. 12. Avoid placing disks near vacuum cleaners or large motors. Even freezers and refrigerators have compressor motors that can alter data on your disks. 13. Don't bend or fold disks. 14. Store disks vertically. Storing disks horizontally can cause them to bind in the jacket, preventing proper speed of rotation. Improper rotation

ROUTINE PREVENTIVE MAINTENANCE 123 can cause scratching of the disk surface, and result in intermittent failure. 15. Don't put disks through airport x-ray machines. Hand them to the security guard for inspection, and have them bypass the x-ray inspection process. Flipping the Floppy Before we get into PMs for disk drives, let's clear up a few misconceptions about disk use in a single-sided disk-drive system. Many people believe that you can flip your disk over, cut an additional write-protect slot into the jacket, and then use the flip side of the disk to store more programs and data. They contend that using the back side of a disk in a single-sided drive system won't cause any problems with either the disk or the drive. Some reputable magazines and Commodore 64 user groups support this idea. Disk-drive manufacturers strongly disagree. Who is correct? When the door is closed on a single-sided disk drive, a pressure pad comes in contact with the disk and pushes it against the drive read/write head, which rides on the surface of the inserted disk. The drive motor rotates the disk in only one direction, at a speed of 300 rpm. As the disk wears, tiny bits of oxide come off the disk and get swept up and held by the liner inside the disk jacket. Or, the oxide bits can build up on the drive read/write head. Some oxide even builds up on the pressure pads. Disk manufacturers test both sides of a disk, and if one side fails they often place the defective side in the disk jacket so that only the good side is exposed when the platter is marketed as a single-sided disk. The disk jacket liner, catching up most of the oxides, dust, and dirt that gets on the disk surface, functions the same way as a lint brush being used on a dark wool suit. Brushing in one direction removes the lint and hair, but brushing in the opposite direction, wipes the collected lint back onto the suit. The same thing happens with disks in lined jackets. As the drive spins the disk in one direction, the lint, dust, and whatever else is on the disk surface is wiped up by the liner. If the disk is turned over and rotated in the opposite direction, the "junk" collected by the liner gets wiped off and back onto the disk. The excess dirt in the liner scratches more oxide off the disk. You begin to experience drop-outs in the areas of the disk that no longer have enough oxide left to store digital information. Your drive's head gets dirty even faster and the pressure pad buildup increases. The act of cutting an additional write-protect notch in the disk jacket causes problems also. The polyvinylchloride jacket material shatters when cut, producing tiny shards of polyvinyl chloride that can scratch the disk surface and add to the material collected by the liner. Another problem occurs with the pressure pads themselves. When you flip your disk, you are placing the good side of your disk in contact with the rough, oxide layers built up on the pads. Rotation of the disk now causes scratches on that side of your disk. One last additional hazard caused by writing data on both sides of a disk is the potential for magnetic field bleed through from writing on one side of the disk and having the magnetic field created affect the data stored on the opposite side of the disk. This can cause alteration of data and even loss of files. The evidence seems clear. You can use both sides of a disk, but you do so at a substantial risk. PMs FOR DISK DRIVES What kinds of PMs are there for disk drives? If you owned a $100-million-a-year company using hundreds of disk drives, you could plan for and purchase a $50,000 disk-drive tester that tests four drives at a time using dual microprocessors. But you probably don't. So how can you test and maintain your own disk drive(s) without this expensive equipment? While disk drive manufacturers' representatives insist that "officially" there isn't any PM required for disk drives, bench technicians in the same companies describe head cleaning as the only routine maintenance. Here are some facts: 1. Head cleaning is a PM you can do. Headcleaning diskettes of various kinds are available. The "wet" diskette kind works with a cleaning solvent. 2. Heads need cleaning to remove the oxides that build up on the leading edge of the head (the side facing the direction of disk rotation), as shown in Fig. 5-9.

124 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE cleaned using denatured alcohol and a lint-free swab. 3. Since any cleaning disk works by rubbing action and chemical action between the disk fabric and the drive head, there is a potential for damage from abrasion. So you must be careful not to leave the disk spinning in the drive for too long. A cleaning disk can be allowed to spin in a disk drive for 30 seconds with no apparent damage. With most cleaning disk kits, 45 seconds is too long to keep the cleaning solvent in contact with the drive head. 4. New nonabrasive head cleaners are being marketd. Two examples are Verbatim's Datalife head-cleaning kit, and Innovative Computer Products' Perfect Data head-cleaning kit. Both products use fabric-covered disks which are dampened with a cleaning solvent. With one kit, you sprinkle cleaning solvent on the disk fabric and then insert the disk into your drive for spinning action head cleaning. The disk can be used as many as 13 times. The other kit has cleaning disks that are predampened and individually sealed. You can use a cleaning .disk once and then throw it away, using another the next time. Both of these products work well. 5. Drive heads can also be cleaned with denatured alcohol and a cotton swab wrapped in a lint-free material (Fig. 5-10). With manual alcohol and swab cleaning, you could accidentally scrub the pressure pads by mistake, causing more problems than you're preventing. But, if you're careful, manual cleaning can be safer and more effective than a cleaning disk. Special cleaning material such as cellularfoam swabs and chamois leather cloth are good materials to use for manual head cleaning. Or you can use a piece of bed sheet wrapped around the cotton swab. Uncovered cotton swabs are dangerous because the cotton fibers can catch or pull away and lie in the drive or on the head, becoming cotton logs on a disksurface highway, waiting to get swept into the drive head. These fibers can also catch on the ferrite chip in the middle of the ceramic head, loosening it from its mounting and ruining the head. Surgical isopropyl alcohol or methanol can be used as the cleaning solvent. The solvent used must not leave a residue when it evaporates, so most other alcohol solvents should be avoided. You can also use typewriter cleaner or trichloroethane. In all cases, use plenty of ventilation and make sure the solvent has evaporated before you operate the drive. 6. How often the head must be cleaned depends on how much the drive is used and what type of diskettes are used. A quality diskette is good for about three million passes, or rotations, against a read/write head before enough oxide is worn off so that the head needs cleaning. The bargain disks are good for one-tenth the rotational life. This means that instead of 167 hours of access time, you might get 16 hours or less before the head gets caked with oxide or the disk surface gets too worn to write to or read from. Now you know why your bargain disks don't seem to last very long. A useful rule of thumb for head cleaning is to clean the read/write head every 40 hours of rotational life if you're using standard disks. You could clean more often or even wait until you

ROUTINE PREVENTIVE MAINTENANCE 125 start getting read/write errors and then replace or clean the head. 7. Keeping the drive door closed unless you are inserting or removing a disk will help keep out dust and dirt. It also prevents unwelcome visitors (insects and even mice) from climbing into the drive. Cleaning the Drive Head with a Cleaning Disk Follow these steps: 1. Turn on power to your disk drive. Turn on power to the Commodore 64 computer. 2. Dampen the cleaning disk with the solvent supplied with the disk. 3. Insert the dampened cleaning disk in the drive. 4. Close the drive door. 5. Try to load a program named "*" from the disk. Since only the cleaning disk is inside the drive, the disk will simply spin in the drive, cleaning as it whirs along. 6. After 20 to 30 seconds, type RUN/STOP to halt the disk program load attempt. Open the drive door, remove the disk. Let the drive read/write head dry thoroughly before operating the system. Manually Cleaning the Drive Head You will need a Phillips-head screwdriver, a protective pad, something to hold loose screws, and adequate lighting. 1 . Turn power to the disk drive off. 2. Touch a grounded surface to remove any static charge. 3. Disconnect the disk-drive cable from the back of the computer. 4. Pull the power plug out of the rear of the disk drive. 5. Turn the disk drive over on a protective pad with a clean, lint-free surface. 6. Remove the four silver Phillips-head screws holding the cover tight, as shown in Fig. 5-1 1 . 7. Holding both halves of the drive case together, turn the drive right-side up. Gently lift the drive case top off the main drive mechanism case and set aside as shown in Fig. 5-12. •- 1 ; Remove the four silver-colored screws holding the disk drive cover on the drive mechanism. Note: Because the drive mechanics are attached to the base, the base will be heavy. Lift the top off carefully. 8. Set base and drive mechanics right-side up on the protective pad. 9. Set the disk drive top off to the side. 10. Remove the metal shield as shown in Fig. 5-13. 11. Remove the two Phillips-head screws securing the left side (facing the drive door) of the metal shield. 12. Gently lift the metal shield up on the left side like a swivel with a hinge on the right side of the drive. The shield will now lift off freely.

126 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Fig. 3-12. Gently lift the drive case cover off the drive mechanism. (The shield cover is made of heavy metal; be careful.) 13. Turn the drive so the drive door is facing you. 14. Carefully lift the black head load arm as shown in Fig. 5-14 and look for discoloration (buildup) on the surface of the pad or on the read/write head below. Fig. 5-13. Removing the metal drive electronics shield. 15. Using a special foam or wrapped cotton swab dampened with cleaning solvent, gently rub the head and the pad. 16. Let the surfaces dry completely before reassembling. 17. When the head and pressure pad are dry, reinstall the drive electronics as follows: (a) Carefully set the shield over the electronics card with the vent holes to the rear (be careful you don't accidentally disconnect or tear the red/black power ON wire). (b) Reinstall the two Phillips-head screws. (c) Set the empty drive case top over the drive base and mechanism section. (d) Holding the whole unit firmly, turn the Fig. 5-14. Carefully lift the head load arm to expose the read-head below.

ROUTINE PREVENTIVE MAINTENANCE 127 drive over so the four screw holes are exposed. (e) Replace the four silver Phillips-head screws in the base of the cover. 18. Turn the drive over and reconnect the drive cable to the computer. 19. Make sure all surfaces are dry then reconnect the drive and power cables and power on the drive. 20. Power up the computer. 21. Place a copy of a program disk in the cleaned drive. Have you waited until all the surfaces are dry? 22. Close the drive door. 23. Load and run a program. 24. Restore the system to full operation. Disk-Drive Head Cleaning Interval Cleaning your drive head is like changing the oil in your car. You change the oil when you feel you've driven enough miles or when the oil looks dirty. Some software manufacturers recommend cleaning heads every other week. Some repair technicians say clean every six months. Others suggest you don't clean the head until the disk drive makes mistakes trying to read or write data. Table 5-6 provides some rules of thumb. Table 5-6. Disk Drive Ht .vi d Cleaning Intervals System usage Cleaning interval Over 6 hours each clay Weekly Daily Monthly Light to moderate Twice monthly Occasionally Every 6 months If you live in an area that gets a lot of smog, you may want to clean the heads more often. In any case, it won't hurt to clean at least annually. If you begin to get read/write errors, check your operational time log to see if PMs are due. Some sample operational log sheets are included in the Appendix. Disk Speed Tests A somewhat more detailed, yet handy PM is checking and, if necessary, adjusting the disk-drive speed. Variation in speed is caused by normal mechanical drive wear or by excessive moving and reconnecting of drives. Just as automobile engines need periodic checkups and engine retuning, disk drives benefit from correctly adjusted drive-motor speed. Your Commodore 64 disk drives rotate at 300 rpm (200 milliseconds for a revolution) and work with soft-sectored disks; that is, the computer software identifies the beginning and end of each of the sectors on each of the 35 tracks. No timing holes are used as with hard-sectored disks. Using softsectored disks makes the speed of rotation critical to accurate. synchronization oHhe software with the signals stored on the disk. If the speed is off by only 10 rpm (about 3 percent), the drive may not be able to correctly read the disk. Should the speed be incorrect, the data will be written in the wrong location on the disk. The next time you access that area on the track again, the computer will hang up and give you an I/O ERROR message. While disk speeds between 291 rpm and 309 rpm should be acceptable for read/write operation, speeds outside this range can cause intermittent errors or disastrous results. If the speed is slower than 270 rpm or faster than 309 rpm, any write action will erase the synchronization timing marks on the disk, making it useless unless you reformat the disk (and wipe out the data you had stored). There are two ways to tune up your drive speed. You can adjust the speed using a disk speed test program or a fluorescent I amp. Both techniques require removing the disk cover. Disk Drive Disassembly You will need a Phillips-head screwdriver, a jeweler's screwdriver, and a protective pad. Note: |f any of this seems difficult, have a repair service shop do the speed adjustment. 1 . Turn off the power to your disk drive. 2. Pull the power cord out of the rear of the drive. 3. Touch a grounded surface to remove any electrostatic charge. 4. Disconnect the drive cable from the rear of the drive. 5. Turn the disk drive over on a protective pad with a clean, lint-free surface. 6. Remove the four Phillips-head screws as shown in Fig. 5-15. 7. Holding both halves of the drive case together, turn the drive right-side up. Gently lift the drive case top off the main drive mechanism case and set aside as shown in Fig. 5-16.

128 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Fig. 5-15. Remove the four Phillips-head screws. Note: Because the drive mechanics are attached to the base, it will be heavy. Lift off carefully. 8. Set base and drive mechanics right-side up on the protective pad. 9. Set the disk drive top off to the side. Note: The following step applies to ALPS drives. The drive mechanism doesn't have to be removed to adjust the speed on the Neuronics drive. If you have a Neutronics drive, skip to step 1 3. 10. Remove the six Phillips-head screws that hold the drive mechanism inside the base case. 1 1 . Gently lift the drive mechanism out of the case. (Be careful, it's heavy.) Fig. 5-16. Gently lift the drive cover housing off the drive mechanism. 12. Set the drive mechanism on its side crosswise on the inverted top of the drive case. 13. Reconnect the drive cable and power cord to the drive. 14. Locate the speed adjustment control potentiometer. On ALPS drives, it's in the upper left corner of the drive base just above and to the left of the speed strobe wheel as shown in Fig. 5-17. On Neutronics disk drives, this control is located on the analog board on top of the drive mechanism. You are now ready to adjust the drive speed. Using a Disk-Speed Program 1. Reconnect the power cord to computer. Caution: Be careful not to touch inside the drive mechanism or the electronics analog card with power on. 2. Turn on the power to the disk drive. 3. Turn on the power to your computer. 4. Insert the disk containing the disk-speed test program in the drive to be adjusted. Diskspeed programs can be purchased commer

ROUTINE PREVENTIVE MAINTENANCE 129 DISK SPEED TEST IPI ( CURRENT SPEED SETTING - -« > ESC CAPE) TO STOP TEST Fig. 5-17. The screw driver is inserted in the speed adjustment potentiometer. Notice the timing marks on the strobe disk. daily from companies advertising in Commodore trade magazines. 5. Close the disk drive door. 6. Boot the disk in the drive. 7. Most speed test programs display a graduated scale of the sort shown in Fig. 5-18. Using a jeweler's screwdriver, slowly turn the speed control adjustment pot screw until the speed display shows the actual rotation time as close to the ZERO reference, or 300 RPM point, as possible. (The best position is just under or to the left of the reference. This allows for creep as the system wears.) 8. Remove the disk. 9. Turn off the power to the computer. 10. Turn off the power to the disk drive. 1 1 . Pull the power cord plug from the rear of the disk drive. 12. Disconnect the disk-drive cable from the drive mechanism. 13. Reassemble the drive. Be careful not to accidentally rip loose any wires. 14. Replace the six Phillips-head screws that hold the drive mechanism inside the base case. 15. Place the top cover over the base and drive mechanism. 16. Holding the top and bottom sections firmly, turn the drive unit over, exposing the four screw holes on the bottom of the drive case. 17. Reinstall the four screws that hold the two covers together. Fig. 5-18. Sample disk speed test screen display. 18. Turn the drive unit over to its upright position. 19. Reconnect the drive cable. 20. Reconnect the disk-drive power cord plug. 21. Turn on the disk and then the computer, and test operate the drive. 22. Restore the system to full operation. Using a Tuning Lamp 1. Disassemble the drive and set it on its side as shown in Fig. 5-16. 2. Place a fluorescent light or incandescent room lamp near the drive so the light illuminates the speed strobe wheel on the bottom of the drive mechanism. 3. Locate the timing marks on the strobe disk as shown in Fig. 5-17. The outer circle of markings is used for 60-Hz electrical systems common in the United States. The inner circle of strobe markings is used with 50-Hz line power such as that found in Europe. Using a strobe disk for speed adjustment is amazingly simple, and very accurate. If you place the strobe disk in the light of a fluorescent lamp, and cause the disk to spin, you will notice that the strobe disk marks slowly rotate in one direction or another, depending on whether the disk speed is fast or slow. This action is much like the effect seen on movie film when stagecoach wheels seem to be rotating in the opposite direction to the movement of the coach. The wheels are rotating at a different speed than the film is moving through the projector so you see this strange effect. The marks on the strobe disk are spaced so they appear

130 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE stationary when the rotational speed is exactly 300 rpm. 4. Place a lighted fluorescent lamp near the drive. 5. Reconnect the disk interface cable to your computer. 6. Reconnect the disk-drive power cord plug. 7. Power up the disk drive. 8. Power up your computer. 9. Insert a blank, unformatted disk in the drive and close the drive door. 10. Command the computer to load a program, and observe the strobe wheel as the disk spins in the drive. 1 1 . Using a jeweler's screwdriver, or a tweaker (small screwdriver slightly larger than a jeweler's screwdriver, adjust the speed control potentiometer until the strobe disk seems to be sitting still. 12. Open the drive door, and remove the disk. 13. Turn off the computer power. 14. Turn off the power to the disk drive. 15. Pull the drive power cord plug. 16. Disconnect the disk-drive cable from your computer. 17. Reinstall the drive mechanism inside the base of the chassis (use the six Phillips-head screws). 18. Gently lower the top cover over the drive base and drive mechanism. 19. Holding the two sections firmly together, turn the drive unit over exposing the four screw holes in the base of the case. 20. Reinstall the four silver screws that hold the two sections of the case together. 21 . Turn the drive unit over to its upright position. 22. Reconnect the drive cable. 23. Reconnect the disk-drive power cord plug. 24. Turn on the disk and then the computer, and test operate the system. 25. Restore the system to full operation. Disk Drive Alignment This procedure is not recommended for the novice. The alignment adjustments in the Commodore 64 drives set the positioning of the read/write head correctly over the tracks on the disk, adjust the disk stop guide, or adjust the collet hub that fits in the hole in your disks. These procedures require special equipment, including a dual-trace oscilloscope, special alignment disks, and various disk alignment tools usually available only to Commodore 64 repair people. If speed adjustment and cleaning don't clear up any read/write problems you may have had, bite the bullet and take your drive into a service center for maintenance. The. most -critical alignment adjustment is the read/write head alignment or tracking. Some programs require very accurate alignment of the head over the track. If the program loads properly, but won't read data and the disk just spins, you may have a track alignment problem. If you have to replace the electronics analog card in the drive, you should have the tracking checked. Each card is tuned for the drive, and a new card could affect the head tracking. Alignment should be checked every year. The easiest way to accomplish this is to format two disks on two different drives whose speeds have been verified to be correct. Save some programs on each disk using the same drive on which formatting was done. Read and write each disk with its drive to make sure the individual drives work satisfactorily. Then switch disks and see if each disk works properly in the alternate drive. If one drive reads correctly while the other can't find the data or reads out garbage, you know you have alignment problems. Because alignment problems are the most common ailment with Commodore 64 systems, I suggest cleaning the heads and adjusting the drive speed periodically, and conducting the rest of your PMs regularly. This subject has been bandied about for 1 5 years as hobbyists, military and civilian radar operators, and, currently, word-processing operators struggle for answers to some nagging questions. Will long periods of staring at the face of a CRT screen damage the eyes? Is the radiation emitted by the CRT dangerous to the user? Let's take these questions in reverse order. First, a CRT that makes characters and shapes on its screen by sending streams of electrons toward a phosphor-coated surface (the back or inside of the screen) does produce

ROUTINE PREVENTIVE MAINTENANCE 131 radiation. Two types of radiation are produced. Light radiation which becomes the characters we look at, and low-level X-ray radiation. The United States government has placed limits on the amount of X radiation that can be allowed to escape out the face of a CRT. This limit is 0.5 milliroentgens per hour measured about two inches away from the screen. Manufacturers of CRTs added strontium and lead to the glass panels in televisions and monitors to eliminate almost all X radiation escaping out the front of a display. Many intense tests were conducted by government and civilian organizations to determine how much radiation is emitted by CRTs. The results were very encouraging. There was no evidence of damaging radiation coming out of any of the displays tested. Measuring instruments recorded more radiation in the sunlight than in the CRT display light. The overwhelming conclusion by these researchers is that radiation from video displays doesn't threaten our vision. We do have a separate problem that needs our attention. Older screens display harsh white letters. Looking at a high-contrast screen of letters and numbers for a long time can cause eye fatigue, headaches, and neck and back strain. Eye fatigue can result from looking at those bright white letters and numbers on a dark black background screen. New CRT phosphors use green and amber displays, significantly reducing eyestrain problems. Room light reflections were also linked to eyestrain, so recommendations were made that display terminal users work in a well-lighted room and use nonreflective screens applied to their CRT display screens. Neck and back strain, and even some emotional problems, have been related to long periods of using a display screen. These issues are being resolved by redesigning the operator station or desk and even the room itself. Poorly designed desks and poor working environments affect the output produced by display terminal operators. In addition, managers sometimes fail to apply good work practices for people working at a console for hours on end. To solve workers' problems, new displays are being designed and work concepts are being revised. There are more display monitors that can tilt and swivel to improve user comfort. More computers are being introduced with detachable keyboards. Monitor height positions are becoming adjustable. Glare-reducing screens have become standard in new displays. Room lighting is being redesigned for optimum display-screen viewing. Work conditions are being modified to include frequent rest breaks, and training classes are being conducted to educate management and employees in the proper use of video terminals. Business has made great strides in reducing user problems. You can learn from these experiences and act to reduce the probability of your own eye, neck or back strain. • Use a hard-back chair instead of a soft, cushy, slouch-producing recliner. • Take frequent, short rest breaks. • Take a moment to stretch. Develop some simple physical exercises to move unused muscles. • Move away from your computer system for a few minutes each hour. This gives the eyes a rest and can often clear the brain for the arrival of another great idea. • Keep the room well lighted but not harshly bright. Try a desk lamp with an incandescent bulb shining on your work and keyboard area from the side. You can also keep an overhead light on for background lighting and to cut glare. • Set your display unit at a height that feels comfortable for viewing. You'll know if it's correct after a few hours at the keyboard. Adjust the display height as necessary. • Avoid using a color television or color monitor for word processing or database applications. These displays are good for games and graphic displays, but they can produce eyestrain if you look at them for long periods as you will when working with word processing or database software. • Have your eyes examined at least annually (every 6 months is better). If you wear glasses, the doctor can prescribe lightly tinted lenses (light blue or light green), which help to reduce eye strain. • Increase your intake of foods high in Vitamin A (carrots and squash, for example — the yellow foods). • Keep your equipment clean and in good operating condition. There are over 10 million video display units in use today, and twice this many are expected to be in use within two years. As prices come down, it's time to consider trading in that old, clunky black and white display for a new green or amber unit that will serve you better.

132 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE USING HEAT TO SPOT TROUBLES A new troubleshooting and preventive maintenance technique that is gaining acceptance uses the temperature of the components to determine the condition of the system much as a mother takes the temperature of her child to see if the child is ill. One such technique is called thermal imaging, or thermography, and is proving to be a remarkably accurate preventive maintenance tool. Thermal Imaging Imagine having an infrared picture taken of your Commodore motherboard, new and shiny, and operating on a certain program. Comparing this to a second photo taken a year later, when the system has started acting up, shows you a new hot spot right in the middle of the board's RAM indicating that one of the memory chips is about to give out. Replacing this one chip will bring the system back to peak operating potential. Standard photography produces images or pictures from visible light; thermal imaging produces pictures from the invisible heat coming up off the surface of objects. It's a cost-effective maintenance procedure in many large industrial plants. Several companies sell expensive thermograph machines that produce heat images, or heat maps, in vivid color on high resolution red-green-blue (RGB) monitors. These units can measure temperatures all over a printed circuit board with a sensitivity of 0.1 degree Centigrade (C) over a temperature range of 0 200 degrees. If any board has an area on it with a temperature outside specific limits, a computer comparison of the suspected board temperature image with normal board baseline temperatures will immediately point out the fault. These faults can be shorts, opens, and even marginally defective components. These thermograph units can even diagnose failures in high density circuit boards — all without touching the board. Unfortunately, these machines cost thousands of dollars. But there's an alternative. If you own a 35-mm camera, you could try your own thermal imaging using infrared (IR), heat-sensitive film. Either color or black and white should work. A good black and white candidate is Kodak HIE-1 35-36, ASA-25 IR film. Color IR film is about 50% more expensive. A special filter (Wratten Number 87, 88A, or 89B) makes the picture more effective. With the Commodore 64 open, and running a simple program that continuously repeats, let the computer warm up for about two minutes to let the components reach operating temperatures. Then take a picture of the motherboard. Background light won't matter, because the film is sensitive to heat, not light. Take several shots. Then periodically, every six months for example, or when the system starts acting up, take another series of pictures with the same program running in the computer. A comparison of the before and after pictures will quite likely point out where your system is wearing out or has failed already. Heat-Sensitive Liquid Crystal Another useful technique for finding potential or actual troublespots in your computer is the use of liquid crystals (LCs). These organic compounds are derived from cholesterol and react to changes in temperature by changing color. This visual method for testing and evaluating the Commodore 64 circuit boards is available as a laminate (pressed layer) film or as a liquid solution. The liquid solution is recommended for circuit boards. The temperature range for measurement can be specified in increments of 1 to 50°C within an operating range up to 150°C. Two types of these liquid crystals are available today: the temperature limited-liquid crystal (TL-LC), which returns to its original shade upon cooling, and the recording temperature limit-liquid crystal (RTL-LC), which remains an ash-grey color until you brush or rub it, causing the original shade to return. The nondrying opaque liquid is applied by brushing it directly on the surface of solder joints, chips, other circuit board components, and connectors. The solution has a very high resistance, so it won't short out anything on the board. When the Commodore 64 is energized, the heat generated as the circuits function causes the liquid crystal solution to change color according to the temperature sensed by the solution. Hot spots turn indigo blue, cooling to blue, turquoise, green through yellow and orange, to red and finally gray. This LC solution is useful in testing printed circuit components for failing chips, solder shorts, and even solder connection bonds that are breaking apart. The completeness of a bond can be detected by the color changes during normal operation; air in the bond cools more slowly than the surrounding metal. A dark surface shows the color changes best, so the manufacturer adds black dye to the LC solution. Typically the surface to be tested is first cleaned of all oils and dirt, since these contaminants will give incorrect color readings. Then it is dried, and the LC

ROUTINE PREVENTIVE MAINTENANCE 133 solution is brushed or sprayed onto the components and board, leaving a thin, even coat. When the circuit is powered up, the rainbows of colors pinpoint the hot spots on the board or components. If the heat generated at one place on the board doesn't follow the normal circuit heat-up pattern, a failure in that component area can be predicted. On connectors, excessive heat generation indicates a poor connection. When the test is complete, the solution can be wiped off with a lint-free cloth. The solution won't short out or contaminate the circuit board or the components. A testing kit including sheets of film, different temperature-range liquid solutions, an aerosol can of black paint, applicator brushes, a sprayer, and solvent for surface and sprayer cleaning is available from Liquid Crystal Applications, Inc., in Clark, New Jersey, for about $250. INSURANCE Catastrophes occur in our everyday lives— the car gets hit in the shopping center parking lot; the big tree in the yard gets blown over during a storm, and lands right on top of the new roof; or the creek rises and floods out the fruit cellar. Catastrophes can also affect your computer system. Fire, flooding, or freezing, for example, can put you out of computing temporarily or even permanently, if you lose your system and cannot afford to replace it. You carry insurance on your house, your car, your kids, and even yourself. Today, insuring your computer system is an additional and practical precautionary measure. The cost for insurance is quite small compared to the comfort you will get. You can buy a computer insurance policy, or have a rider added to your current homeowner's policy to cover your computing equipment. Don't take chances with computer security. SUMMARY ' This chapter has covered every aspect of routine preventive maintenance to keep the Commodore 64 system in peak operating condition. It discussed six major contributors to computer system failures: excessive temperature, dust buildup, noise interference, power-line problems, corrosion, and magnetic fields. For each of these factors, one or more preventive countermeasures was presented. You learned that floppy disks are uniquely constructed to be protected from dust and dirt, discovered how disks and disk-drive read heads can be damaged, and, most important, learned how to extend the life of disks and disk-drive systems. You learned that eye, neck, and back strain can be prevented when using a display screen. Then, you learned two interesting ways to use heat for locating potential or existing circuit failures. Finally, you recognized the importance of insuring your computing systems.

CHAPTER 6 Advanced Troubleshooting I n earlier chapters you learned the basic techniques for troubleshooting most Commodore failures. You found there are eleven Commodore Ootimum steps to successful fault identification and correction. You learned how to recognize the various components of your computer, and you discovered three ways to find failures. 1 . The hardware approach 2. The software approach 3. The Commodore-Easy approach In the hardware approach you use troubleshooting tools such as logic probes and logic pulsers to step through a circuit. This requires test equipment and some knowledge of digital electronics. The software approach is a troubleshooting method used widely by computer repair technicians (in the retail stores). As long as the disk drive boots up properly, diagnostic software is effective at finding chip failures. The Commodore-Easy aonroach is to use the troubleshooting guides in Chapter 4 to quickly pinpoint possible potential chip failures. If you conclude that the problem is not a chip and you still want to locate the failed part, you can use the techniques discussed in Chapter 4 to test the rest of the components in the suspected failure area. Here in Chapter 6, you will iearn the advanced techniques. You'll be introduced to the repair technician's tools of the trade. Like other parts of this manual, Chapter 6 is full of "meat and potatoes" information to help you keep your Commodore system in peak operating condition. r-ims OF THE TRADE When the problem can't be solved using flowcharts and pictures, repair technicians reach for help — they reach for their tools. These tools are not only the tiny screwdrivers (tweakers), the diagonal cutters (dykes), and the soldering pencil. They also include electronic test equipment— the various measurement meters (VOM, DVM, DMM), logic probes, logic pulsers, current tracers, clips, oscilloscopes, and logic and signature analyzers. Electronic measurement equipment has improved a great deal over the years, markedly improving your ability to test and locate circuit troubles. Twenty years 135

136 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE ago, a meter called a VOM (volt-ohm-milliammeter) was used to measure the three parameters of an electric circuit— voltage, resistance, and current (Fig. 6-1). Fig. 6-1. A volt-ohm-milliammeter. (Simpson Electric Company) Then came the VTVM (vacuum-tube-voltmeter). It wasn't long before electric circuits made room for electronic circuits, where digital replaced analog, and new meters appeared for troubleshooting using some of this new capability in their design. The DVM {digital voltmeter) and DMM (digital multimeter) quickly became the preferred measurement devices for digital technicians because they offered capabilities better suited to electronic circuit testing, including increased accuracy (Fig. 6-2). These meters have characteristically high input impedances (resistances) so don't load down or draw down a digital circuit where the voltages and currents are far lower than those found in analog circuits. Two changes affected the types of tools used in troubleshooting and repair. First, vacuum tubes were 8020 B MULTIMETER V Fig. 6-2. A digital multimeter. (John Fluke Mfg. Co., Inc.) replaced by solid-state devices such as transistors and the integrated circuit (IC), or chip. Second, circuits themselves became smaller with more components packed compactly into less board area. One need only compare the early radios and televisions (standing 4 feet tall and weighing 40 pounds) with the wrist radios and the wrist televisions of today to recognize that electronic circuits are smaller, more complex, and more difficult for test-probe access. Electronic advances always lead to electronic

ADVANCED TROUBLESHOOTING 137 opportunities, and clever test equipment designers soon came up with devices that enabled digital circuit testing without fear of inaccurate readings caused by circuit overload, or circuit failure caused by bulky test probes shorting wires on a packed printed-circuit board. Logic Clip One digital circuit testing device is the logic clip shown in Fig. 6-3. This handy tool fits over an IC and has exposed pins at the top. Measuring or monitoring probes, or tiny clips, can be attached to the pins to determine the logic level on any pin of the device under test. Fig. 6-3. A popular type logic clip. (Pomona Electronics Division of International Telephone and Telegraph Corporation) Another type of logic clip has a built-in monitoring capability (Fig. 6-4). Instead of exposed pins, the top of the clip is lined with two rows of light emitting diodes (LEDs) which continuously display the logic condition of each pin on the chip. The LEDs are turned on (indicating a logic 1) by power from the circuit under test. All the pins are electrically buffered so the clip doesn't load down the circuit being tested. Caution:When using a logic clip, turn off power to the circuit, attach the clip, and then turn power on. (This helps prevent accidentally shorting out the chip.) Logic clips can be obtained in several varieties— to work with almost all logic families, including TTL and CMOS— and in voltages up to 30 volts DC. To use the clip, squeeze the top, or LED, end to spread the pin contacts, and slip the clip over the top of the chip to be tested. When power is applied to the cirFig. 6-4. This logic clip provides visual indication of the logic condition at each pin. (Hewlett Packard) cuit, the LEDs will indicate the logic level at each pin on the chip. Logic clips can be used on ICs with up to 16 pins, or 80 percent of the ICs on your Commodore 64 motherboard. Logic Probe When you want to really get into your circuit, you can use a logic probe. A blown chip can't be repaired, but the logic probe can tell you which chip has failed so you can replace it. The logic probe shown in Fig. 6-5 is the most widely used tool for this kind of analysis. It can't do many of the things complex test equipment such as logic analyzers can do. However, the high frequency of chip failures in electronic circuits, the simplicity of the probe, and the ability to rapidly troubleshoot in an energized circuit make this tool ideal for 90 percent of your fault isolation needs. When the tiny tip of the probe is placed against a pin on a suspected bad chip, a test point, or even a trace on a circuit board, an indicator light near the tip of the probe tells you the logic state (level) at that point. The metal tip on most logic probes sold today is protected against damage from accidental contact with a source of voltage higher (up to 120 volts AC for 30 seconds) than that of logic gates ( + 5 volts).

138 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE Fig, 6-5. The logic probe is the tool most widely used for circuit board analysis. Some probes have two built-in lights near their tips — one for logic HIGH and the other for logic LOW. The better probes can also tell you whether the test point has a pulsing signal present. They can also store a short pulse burst to tell you if a glitch or spike has occurred at that point. If you're planning to buy a logic probe, be sure it will work with the logic families you plan to analyze. The ability to touch a point with the probe tip and directly determine the condition at the point for diagnostic analysis, and the ability to store pulses, make this device easy to use and universally accepted as the proper diagnostic tool for all but the most complex digital troubleshooting. Other tools force you to attach the measurement probe and then look away at some display to read the condition. The logic probe displays the condition near the tip of the probe itself. The logic probe in Fig. 6-5 provides four indications: Lamp OFF for logic LOW (logic 0) Lamp ON (bright) for HIGH (logic 1) Lamp DIM for floating or tri-state Lamp flashing for pulsing signals Power for the probe comes from a clip attached to a voltage point on the circuit under test. Another clip attaches to ground, providing improved sensitivity and noise immunity. Probes are ideal for finding short-duration, low-frequency pulses difficult to see on an oscilloscope, but more often they're used to quickly locate gates whose output is hung, or locked, in a HIGH or LOW condition. A useful method of circuit analysis with the probe is to start at the center of the suspected circuit and check for the presence of a signal. (This of course assumes you have and can use a schematic of the circuit.) Move backward or forward toward the failed output as shown in Fig. 6-6. It doesn't take long to find the faulty chip whose output isn't changing. NOR PROBE NOT GOOD I GOOD MOVE I MOVE Fig. f>-6. Circuit analysis starting at the center of a suspect circuit. The only limitation of logic probes is their inability to monitor more than one line. Logic Pulser If the circuit under test doesn't have a pulsing or changing signal, you can inject controlled pulses into the circuit using a logic pulser (Fig. 6-7). These handy devices are actually portable logic generators. Fig. 6-7. A logic pulser can be used to inject a signal into a circuit. (Hewlett Packard) When activated by a push button or slide switch, the pulser will sense the logic level at the point touched by the tip and automatically generate a pulse or series of pulses of the opposite logic level. The pulses can be

ADVANCED TROUBLESHOOTING 139 seen on an LED lamp built into the handle of the pulser. The ability to introduce a changing signal into a circuit without unsoldering or cutting wires makes the logic pulser an ideal companion to the logic probe and logic clip. These tools used together permit step-by-step stimulus/response evaluation of sections of a circuit. Figure 6-8 shows several ways to test logic gates using the probe and pulser. Assume the output of the NAND gate remains HIGH. Testing inputs 1, 2, and 3, you find them all HIGH. This condition should cause the AND gate output to go HIGH, producing a LOW out of the NAND gate. Something is wrong. Placing a probe at the AND gate output, you discover the level is LOW. It should be HIGH. Now, which gate is bad? PULSER ill AND (LOW) HIGH (OUTPUT WRONG) NAND © Fig. 6-8. There are several ways to test logic gates. To find out, place the probe on the NAND (gate B) output and the pulser on the AND (gate A) output (NAND gate input) as shown in Fig. 6-9. Pulse this line. PULSER PROBE Fig. 6-9. Place the probe on the NAND gate output and the pulser on the AND gate output. The probe should blink, indicating a change at the input to the NAND. If it doesn't blink a change, the NAND may be bad. But what if the LOW was caused by a short to ground at the AND output or the NAND input? Place the probe and the pulser on the AND output trace as shown in Fig. 6-10, and pulse this line. If the pulse blinks, the NAND is bad; its input changed state, so its output should have changed state also. If the probe doesn't blink, you know this line is shorted to ground. One way you can determine which PROBE Fig. 6-10. Place the probe and the pulser on the AND gate output. chip is shorted is by touching the chip case. A shorted chip gets pretty hot, while a chip hung at one level seems to be normal but just won't change state. Current Tracer A fourth handy troubleshooting aid is the current tracer probe. This portable device lets you locate precisely shorts on your motherboard, or peripheral card. The current tracer senses the magnetic field produced by the flow of electrical current in the circuitry. The logic pulser can be used to generate a pulsing signal that will make the current tracer LED blink, indicating the presence of current. If you set the tip of the tracer on a printed circuit line and slide the tracer along the line, an LED in the tip end of the tracer will pulse as long as there is a current present. When you slide past a shorted point, the lamp will go dim or out, and you've found the short. Fig. 6-11 shows an easy way to determine which gate has the short to ground in a logic circuit. Assume gate B has a shorted input. Place the pulser and the tracer midway between the two gates. Adjust the LED in the current tracer so that it just lights. Pulse the line as you place the tracer on the output of A and then on the input to B. The gate with the short to ground will pulse brightly because most of the current is going to ground here. Therefore, the input to B causes the tracer lamp to pulse brightly, while the A side of the line doesn't cause the LED to light. Following the LED light with your tracer will lead you to where the current is going. IC Testers Advanced troubleshooting equipment is becoming very sophisticated and expensive. Today, you can buy equipment that tests almost every chip in your system

140 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Fig: b-11, Following the LED light with your tracer will lead you to the short. for between $1,000 and $2,000. For $10,000 you can even conduct your tests from a remote location. Micro Sciences, Inc., in Dallas, Texas, makes an IC tester that can test over a hundred 7400 TTL and 4000 CMOS series devices. Options for this tester include RAM and ROM tests. Microtek Lab, in Gardena, California, makes a tester that can do complete functional pin tests of all 900 devices in the 54/74 TTL series chips. This test tool displays the condition of the chip under test on a liquid crystal display (LCD). It uses LEDs to signal GO/NO GO test results. VuData Corporation, in San Diego, California, markets an in-circuit component tester that's actually a 50-MHz CRT that displays the voltage versus current characteristics for virtually all circuit components including capacitors, diodes, integrated circuits, resistors, and transistors. With this tester, the condition of the component under test is determined by the shape of the CRT display, and you can easily pick out open circuits, shorts, leaky diodes, leaky transistors, and marginal ICs. The tool is valuable because it can test a wide selection of components while they're still mounted in the circuit. For do-it-yourselfers, Gilbert Marosi of Micro Power Systems, in Santa Clara, California, has written an interesting article for the May 26, 1983, issue of EDN magazine. Marosi's article deals with constructing an IC tester using a computer as an integral part of the test system. Oscilloscope The oscilloscope, or scope, has been with us for years, although recent advances in the state of the art have added a great many capabilities to the instrument. One of the better scopes is from Nicolet (Fig. 6-12). Simply put, an oscilloscope is an electronic display Fig. 6-12. A modern digital oscilloscope. (Nicolet Oscilloscope Division) device that draws a graph of signal voltage amplitude compared to time or frequency on a CRT screen. A scope is used to analyze the quality and characteristic of an electronic signal using a probe that touches a test point in a circuit. It is also used as a measuring device to determine the voltage level of certain signals. Scopes come in all sizes, shapes, and capabilities. Prices vary between $500 and $20,000. Some scopes use a single test probe for displaying and analyzing a single trace signal. Others have two probes and display two different signals (dual trace) at the same time. As many as eight traces can be analyzed at the same time on some oscilloscopes. In fact, the November 1 7, 1983, issue of Electronic Products magazine described the newest in oscilloscope technology, a seven-color digital scope from Test & Measurement Systems Company. Colors make it possible to compare signals at different locations in the circuitry very rapidly. Besides sensitivity and trace display, one of the major advantages of oscilloscopes is that they allow a great range of frequencies to be observed on the CRT screen as frozen images. We call this bandwidth. Bandwidths vary between 5 and 300 MHz, and price is proportionate to frequency. Oscilloscopes are useful tools for freezing an analog or varying signal and displaying this static waveform on the face of a CRT screen covered with a measurement grid. While it is time consuming to learn how to use an oscilloscope, the analytical rewards are substantial. Not only can you measure voltage amplitudes and frequencies of test signals, you can also measure delay times, and signal rise and fall times, and even locate the intermittent glitch. Some scopes have built-in memories to let the machine store a signal of interest for future evaluation. If you're not trying to set the world on fire as a system designer, you can probably get along fine with a dual trace, 25-30-MHz scope. Investment in an oscillo

ADVANCED TROUBLESHOOTING 141 scope is not cost effective if you intend to use it only for analyzing your Commodore 64 motherboard when troubleshooting a component failure. You'd be better off saving the money and spending a comparatively small portion of it to have a service center fix your machine. The nice thing about dual trace, quad trace, and even eight trace, is the ability to look at different signal paths or different signals simultaneously. For example, you could look at the input and output of a gate, and actually see and be able to measure the delay time for the signal passing from input to output of the chip. Another useful technique is simultaneously displaying all or parts of the data bus, or part of the address bus to see what the logic level (HIGH = + 5 V, LOW = 0 V) is and what binary number it represents. Logic Analyzers A companion device to the oscilloscope, the logic analyzer is a multichannel oscilloscope with a memory. It captures and stores a number of digital signals, letting you view the signals simultaneously. If each signal is a bit on the data bus, you can see the entire data bus at one time. This means you can analyze the logic level for each bit on the bus for any instant in time. The bus signals are frozen for your display and analysis. The ability to freeze a single event, or data pattern, so you can determine the information present on a digital bus at any moment is a distinct advantage for troubleshooting. Logic analyzers, like oscilloscopes, cost between $500 and $20,000. They work at frequencies from 2 MHz up to 200 MHz. These analyzers can display many signals (channels of input) simultaneously. Arium Corporation, in Anaheim, California, recently announced an analyzer that handles 32 channels of input data at frequencies up to 100 MHz. Nicolet offers a 48-channel, 200-MHz analyzer with built-in microcomputer and dual, double-density floppy-disk drives. Each channel has a probe clip for connecting to some test point in the circuitry. Fortunately, the clip probes are tiny and easy to install. A sampling of the capabilities currently available in logic analyzers reveals one configuration that provides 104 channels at 25 MHz, another with 32 channels at 100 MHz, and yet another with 16 channels at 330 MHz. Another configuration has 8 channels of input and can operate at 600 MHz! (Recall that your Commodore 64 clock is slightly over 1 MHz.) Where would logic analyzers be useful? One place is in debugging software. You can read the data in machine code and trace its flow through the circuit. You could analyze the input and output of memory simultaneously for locating a bad RAM chip. Or you could uncover intermittent glitches, those phantom spikes that can raise havoc with your system. There are many more uses for logic analyzers, including analysis of disk I/O operation. The logic analyzer has been called the oscilloscope of the digital domain. It can be a valuable tool for the software, or hardware designer. But for the home or small business computer owner who simply wants to fix his or her own computer when it fails, the logic analyzer is expensive overkill. Signature Anaiyzer Logic probes can be effective in detecting logic levels and pulses at single points. Oscilloscopes can extend the number of points to be monitored even though the data pulses all tend to look alike. And logic analyzers extend the number of test points even further to include buses the size of the data and address buses. However, as the sophistication and capability of the measurement device increases, so does the expertise required to operate the test tool. Logic analyzers, in particular, can be very capable but they can also be difficult to understand and operate. The signature analyzer was developed to allow easy detection of hardware failures. Signature analysis is a comparison method of troubleshooting. It works by running a diagnostic program in the system being tested, and evaluating a coded signal at specific test points in the circuitry. If the coded signal matches the code observed when the system was running properly, the malfunction is not in that part of the circuitry. When a test point signature fails to match the baseline correct code, this indicates that you have located the faulty area. Then you can probe backwards or forwards from this point to isolate and locate the component that has failed. The first codes were developed by HewlettPackard and, with slight modification, are still being used today. The key to the success of this test technique is in the signature code. It is a 16- or 24-bit repeatable value that represents a stream of data passing a test point during an interval of time. This known stream of data, when sampled at different places on a good circuit board by a signature analyzer, produces a unique 16- or 24-bit code at each test point. These codes can be documented or stored in a PROM (programmable read only memory) and recalled later for comparison during troubleshooting. The

142 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE PROM then becomes a custom memory module containing every signature sampled from a properly working system that was being stimulated, or pulsed, with a known data stream. Signature analysis has not been a popular troubleshooting tool because it takes lots of time to identify the test points or nodes, probe the nodes, produce a signature, and then document the code. Once this task is completed, however, the task of locating a failure becomes a breeze. And the introduction of PROM modules has made the setup task much easier. More improvements in this analysis technique can be expected in the near future. One analyzer on the market uses a mode called backtrace to prompt the troubleshooter through a series of test points, guiding the tester to trace bad signatures back to the failed part. The investment for a signature analyzer is between $400 and $10,000. Signature analysis uses a simple, nontechnical approach to troubleshooting, so even untrained people can use the equipment and the technique. COM PON EN rS AND HOW THEY FAIL While the use of troubleshooting equipment makes the analysis and isolation of computer problems much easier, many failures can be found without expensive, equipment. In fact, an understanding of how electronic components fail can make troubleshooting and repair relatively simple. Other than through operator error, failures generally occur in the circuits that are used or stressed the most. This includes the RAM and ROM chips, the 6510 MPU, and the I/O chips between the motherboard and the disk drive. The MPU is a highly reliable device and doesn't fail very often. Most failures involve the other chips. Except for the ROMs which are preprogrammed by Commodore Business Systems, these other chips are standard off-the-shelf devices and are so common and they're called plain vanillas or jelly beans. Unlike the custom, preprogrammed chips, these jelly bean chips are not easy to replace because they're soldered to the motherboard. There are other components on your Commodore's motherboard which may someday require replacement. These, too, require soldering and are not as easy to replace. Now that you understand what kinds of tools are available, let's look at the kinds of components you'll be analyzing in your troubleshooting efforts and how these components can fail. integrated Circuits — Chips A chip, or integrated circuit, is constructed out of silicon with some tiny particles of metal (impurities) imbedded in specific positions in the silicon. By positioning the metals in certain ways, tiny transistors can be formed. Applying a voltage to certain places on the chip allows the device to invert a voltage level (+5 volts, logic 1, to 0 volts, logic 0), and enables all sorts of logic gates (AND, NAND, OR, NOR, etc.) to function. These chips can be made with silicon/metal junctions so • tiny that today thousands of transistors can be placed on one chip. A memory chip the size of a fingernail can hold over 470,000 transistors. The problem for chip manufacturers is how to get voltages and signals in and off such a tiny chip. Very thin wires are used as inputs and outputs to the chip. These wires are glued or bonded to tiny pads on the chip. The other end of each wire is bonded to a larger pad on a supporting material (the big part of what we call the integrated circuit as shown in Fig. 6-13). Fig. 6-13. The tiny leads from the chip to the pins of the chip package can be seen clearly in this photo. The supporting structure includes the pins which we plug into the sockets on the printed-circuit boards. These tiny silicon and metal chips are placed in environments that really put them under a lot of stress. First they heat up when you use your computer. Then they cool down when you turn off your machine. Then they heat up again. This hot-cold-hot effect is called thermal stress. It affects those tiny strands of wire, or leads, going between the chip and the supporting

ADVANCED TROUBLESHOOTING 143 structure that includes the large pins that are inserted into sockets. After a period of time, the thermal stress can cause the bonding of the wire lead to break away from the pad on the chip. This disconnect causes an input or output to become an open circuit, and chip replacement is required. Another failure in these chips is caused by a phenomenon called metal migration. The chip can be compared to an ocean of atoms. Some tiny particles of metal float about in this sea, migrating in directions perpendicular to electrical current flowing through the chip. Problems occur when these metal particles begin to collect in parts of the chip. If they concentrate in the middle of one of those microelectronic transistors, they cause the transistor to operate differently or not at all. If the resistance of these collected metals gets high enough, it causes the device to operate intermittently, or to simply refuse to work. Since a transistor is part of a logic gate, the gate malfunctions and the output may become stuck at 1 or stuck at 0, no matter what the input signal is. Theoretically, a wearout failure won't occur until after several hundred years of use. We shorten the life span of our chips by placing them in high-temperature, highvoltage, or power-cycling environments. Other problems occur outside the chip, between the chip leads and the support structure pin leads, the device inputs or outputs. These types of failures include: inputs or outputs shorted to ground, pins shorted to the +5-volt supply, pins shorted together, open pins, and connectors with intermittent defects. The most common troubles, assuming power is available, are opens or shorts to ground. Under normal use, chips finally fail with an input or output shorted to ground. An understanding of the way a standard capacitor is constructed will aid in your understanding of how these devices fail. In Chapter 3, you discovered that there are several types of capacitors on the Commodore 64 motherboard. The capacitor is constructed of two separated plates. A voltage is placed across the plates and for a short instant, current flows across the gap. But soon electrons build up on one plate and cause the current flow to stop. The capacitor is then considered charged to some voltage potential. Capacitors are used to store charge and to filter unwanted signal spikes to ground. The electrolytic capacitor (CI 7 in our example earlier) is constructed as shown in Fig. 6-14. DIELECTRIC' ALUMINUM POSITIVE PLATE (ANODE) ELECTROLYTE IN POROUS PAPER (CATHODE) , ALUMINUM NEGATIVE PLATE Fig. 6-14. The electrolytic capacitor. Two aluminum foils or plates are separated by a layer of porous paper soaked with electrolyte, a conductive liquid. On one plate (the positive plate) a thin layer of aluminum oxide is deposited. This is called the dielectric. A capacitor has an anode (the positive plate), and a cathode (the electrolyte). Electrons build up on one plate causing it to become so negative that it prevents further current flow. (Remember that electrons have a negative charge.) Another type of capacitor is the film capacitor. It is constructed of alternating layers of aluminum foil and a plastic (usually polystyrene) insulation. The metal foil acts as the plates and the plastic insulation acts as the dielectric between the plates. A film capacitor is shown in Fig. 6-15. Film capacitors are coated with epoxy and have tinned copper leads. 104 25E 0-1.5. The film capacitor. Capacitors fail open or shorted depending on the operating conditions and on their age. Electrolytic capacitors are especially susceptible to the aging process. One effect of aging is drying out of the electrolyte insulator. The capacitance value increases, and circuit performance decreases. Finally the capacitance value drops dramatically as the plates fold toward each other, and shorting of the plates can occur. Another kind of failure occurs when some of the dielectric oxide dissolves into the moist electrolyte, causing the thickness of the dielectric to shrink. This deforming usually occurs when the electrolytic capacitor sits for a long time without voltage applied. In this

144 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE case, the capacitance value increases but a high leakage of electrons occurs across the plates, making the capacitor useless. The leads of the capacitor can physically detach from its plate, causing an open circuit. Also, the plates can short together when a large area of one plate is stripped of its dielectric oxide layer by the application of too much voltage. Like resistors, however, capacitors in our Commodore digital logic circuitry will seldom fail. It takes failure in the power supply to "fry" a capacitor on your Commodore motherboard. And while excessive temperatures can also damage capacitors, they damage other components more. Resistors These current-limiting, voltage-dropping devices are quite reliable and should function properly for the life of your computer. However, the same factors that shorten the useful life of the chips also act to reduce the operational life of these resistors. High temperatures, high voltage, and power cycling all affect the materials of which the resistors are made. These stresses cause breaks in the carbon, resistive paste, or resistive layers producing an open conduction path in the circuit. Excessively high voltages can produce electrical current so large that it actually chars resistors to burnt ash. This is rare, especially in a digital circuit where the highest voltage seen is 12 volts — usually 5 volts, and the currents are very tiny — milliamps. Resistor failures are almost always associated with catastrophic failure of some other circuit component. Resistor failures, when they occur, are usually located in printer electronics rather than in the Commodore 64 computer. Inductors Inductors are used in tuning circuits. Their function is to keep the current flow at a constant level. As you learned earlier in the manual, there are several small inductors in the circuitry of your Commodore 64 motherboard. These devices are constructed of a coil of insulated wire. Inductor failure occurs very seldom, but it can happen. Wires can be shorted if the inductor or coil is subjected to high temperature or high voltage. Diodes and Transistors The diodes and transistors on your Commodore motherboard are made of solid material and act much alike. In fact, the transistor can be considered as partly constructed of two diodes. Diodes are one-way valves for electric current, allowing current flow in only one direction. Diodes are usually made of either silicon or germanium. They are used in power supplies as rectifiers and in some circuits to maintain a constant voltage level. Other diodes are made of gallium arsenide and react by giving off light when biased in a certain way. These are called lightemitting diodes or LEDs. Transistors are used in various places in your computer circuitry as amplifiers, or electronic switches. Diodes and transistors fail in the same ways and for the same reasons as chips, but chips fail far more often than diodes or transistors. One reason is that there are many more tiny transistors on a chip the same size as a single (discrete) diode or transistor. This produces more heat and hence more thermal wear in the chip. USING TOOLS TO FIND FAILED COMPONENTS Most chips on the Commodore 64 motherboard are TTL (transistor-transistor-logic). If you know the logic gates in a chip to be tested (NAND, NOR, OR, AND, etc.) you can test for opens or shorts by applying a known logic level to the inputs while monitoring the output. For example, if you were to place a slowly pulsing + 5-volt to 0-volt signal on the input to the AND gate in Fig. 6-16, with both inputs shorted, you should see the output voltage level change (pulse) along with the input. Whenever the input is a logic 1, the output becomes a logic 1 (between +5 volts and +2.4 volts). Fig. 6-16. Pulsing the input should cause a change in the output as noted on the logic probe. The tool you use on the input is a logic pulser. The monitor tool on the output is a logic probe. The pulser places a cyclical logic level on the input to the device

ADVANCED TROUBLESHOOTING 145 and the probe measures the presence or absence of a Jogic signal on the output of the chip. If the input to the AND gate becomes shorted to ground, the pulser cannot cause the gate to react to its signal and the output remains at a logic 0 or LOW (about 0 volts). Even if just one of the inputs shorts to ground, the output cannot change and remains at a logic 0. A short to the gate supply voltage ( + 5 volts) will have the effect of qualifying or enabling one input to the gate all the time. This means that each time the other input receives a logic 1, the input set is correct and causes the output to change to a logic 1, even though only one input signal was actually correct. This produces incorrect circuit operation and strange results. This is the kind of problem that shows up in memory circuits. Only one of the inputs to a particular gate is shorted or opened. Whenever this gate is used, the resulting output may or may not be correct — a difficult problem to trace down. Shorting an input pin to + 5 volts can have potentially disastrous results. When the previous gate tries to deliver a logic 0, or LOW, a huge current is produced which usually causes catastrophic fail ure of the driving chip. The same result occurs when the input pin is shorted to ground and the previous gate tries to deliver a logic 1, or HIGH. The +5-volt logic high is shorted directly to ground, producing an unusually high current with equally disastrous results. Open connections prevent logic levels from being transferred and prevent the affected gate from being able to respond. If one input of a two-input NAND gate is open at the input as shown in Fig. 6-1 7, all but one of the four possible input combinations will be correct. This means that with this type of failure, the system could operate correctly most of the time with only half of the inputs good. The failure would be intermittent. A B OPEN INPUT OUTPUT A B C L L GOOD L H BAD H L GOOD H H GOOD Fig. 6-17. An open at the input to a NAND gate is only a problem in one of four logic state cases. As shown in Fig. 6-18, if the device being tested is a NOR logic gate, the output would be a logic 1, or HIGH only when both inputs are at logic 0, or LOW. Should one of the inputs become open, it would float to logic 1 and cause none of the input conditions to produce a logic 1 or HIGH output. Thus, the output would be LOW all the time— just as though the output were shorted to ground. OPEN FLOATS HIGH INPUT AB A_ L L H H B L H L H OUTPUT C L L L L Fig. 6-18. An open at the input to a NOR gate will prevent the output from ever changing state or going HIGH. If the chip has an open pin at its output, it cannot deliver a logic 1 or 0 to the next gate. You can measure a voltage at the input to the next gate since it is providing the potential, a logic 1 or HIGH level (something around +4 volts). The key here is that any time an input to a TTL gate opens, a condition called floating, the gate will act as though a logic 1 were constantly applied to that input. The voltage on this floating input will drift between the high supply voltage of + 5 volts and a level (about 1.5 volts) somewhere between a valid HIGH and a valid LOW. (A valid HIGH is usually above +2.4 volts; a valid LOW is below +0.4 volts.) A voltmeter reading of about +1.7 volts at the output pin of a gate on a chip is a clue that the output is floating open and the voltage is actually being provided by the next chip or following gate. All these kinds of failures can be located using a logic pulser and a logic probe with backup from a VTVM for voltage measurement. Since the Commodore motherboard is flexible at certain points, a user who is replacing chips or depressing the board without supporting it from beneath could cause a break to occur, opening a trace on the circuit board. A hairline crack such as this is often difficult to find, but looking at the board with a magnifying glass and a strong light can sometimes reveal a suspected failure. A resistance test can be conducted with a VOM or VTVM by placing a probe at either side of the suspected bad trace, as shown in Fig. 6-19, and observing whether a 0-ohm reading is measured. Another way to ascertain if an open trace is present is to compare the logic states at either end of the trace. An important fact to keep in mind when testing for individual shorted or open gates in the Commodore

146 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE RX100 Fig. 6-19. A trace can be tested for an open using a ohmmeter to assess the logic states at either end of the trace. motherboard circuitry is that more than one gate may use the same input or output lines to or from another gate. This is called fan-in or fan-out. When studying the gate circuitry, remember, the failure could be located at the other end of the board. One long trace from it to the chip you are looking at may be shorted or open at that end. Use of the schematics in your Commodore 64 Programmer's Reference Manual will be of value here. OTHER TROUBLESHOOTING TECHNIQUES There are some interesting tricks you can use to aid in finding chip failures. Use Your Senses Look, smell, and feel. Sometimes failed components become discolored or develop bubbles or charred spots. Blown devices can produce some distinctive smells— the smell of a ruptured electrolytic capacitor, for example. Finally," shorted chips can get really hot. By using a "calibrated finger," you can pick out the hot spots on your board. Heat It, Cool It Heating and then cooling is a fast technique for locating the cause of intermittent failures. Frequently, as an aging device warms up under normal operation, it becomes marginal and then intermittently quits working. If you heat the area where a suspected bad chip is located until the intermittent failures begin, and then methodically cool each device with a short blast of canned coolant spray, you can quickly cause a marginally defective chip to function again. By alternately heating, cooling, heating, and cooling, you can pinpoint the trouble in short order. You can heat the area with a hair dryer or a focused warm air blower designed for electronic testing. Be careful using this technique since the thermal stress you place on the chips being tested can shorten the life of good components. A 1- or 2-second spray of freeze coolant is all you should ever need to get a heat-sensitive component working again. Most coolant sprays come with a focus applicator tube. Use this to pinpoint the spray. Avoid spraying electrolytic capacitors, because the spray soaks into the cap, destroying the electrolyte in some aluminum capacitors. Also be careful not to spray your own skin. You could get a severe frost burn. Finally, be careful with freon spray since it can develop enough static electrical charge to damage MOS and CMOS chips. Piggybacking A troubleshooting technique taught in many repair courses is piggybacking, as shown in Fig. 6-20. With piggybacking you can chase down intermittents caused by a break in a chip bond, or wire, inside the chip housing that allows good contact only when the chip is cool. Place a good chip over the top of a suspected chip and energize the circuitry. You may need to squeeze in the pins of the good chip slightly so they make good contact with the pins of the suspected device. Fig. 6-20. Some IC failures can be found by piggybacking a good device on top of a suspect device. While this technique works fine for open internal chip contacts, it can be destructive if the failure is a shorted output. The shorted chip will cause the "piggyback" chip to fail. Therefore use this approach as a last resort, and only on surface mounted chips. The Easter Egg Approach When time is of essence, take an "Easter egg" approach. Just as youngsters used to pick up and exam

ADVANCED TROUBLESHOOTING 147 ine Easter eggs one at a time to see if their name was marked on it, returning those not identified as theirs back to where it was located, you can try replacing the chips one at a time to determine if the chip replaced was causing the problem. You have a 50-50 chance of selecting the right chip first time. If it didn't work, replace the other chip. If the chips involved are inexpensive jelly beans (7400 series TTL), why not replace them both? For thirty cents more, go ahead and splurge. If the problem's gone, but you're still curious, you can always go back later and test each chip individually. Microvolt Measuring a Piece of Wire If you have a meter with microvolt sensitivity and have isolated a "stuck low" problem to two chips, you can try the technique shown in Fig. 6-21. Measure the voltage drop between input pin 1 of gate B and output pin 3 of gate A. Now this means measuring the opposite ends of the same trace or piece of wire! You're interested in determining which end of that trace is the more negative. The end nearest a bad chip will be more negative because the defective chip will short the trace voltage to ground causing this point to be more negative than at pin 3. MICROVOLT SCALE v SHORT TO GROUND Fig. 6-21. A short circuit that is sinking current can be found using a meter with microvolt sensitivity. TESTING CAPACITORS How do you check out a capacitor that you believe has failed? If the device has shorted, resulting in severe leakage of current, you can spot this easily by placing an ohmmeter across the capacitor and reading the resistance. At first you'll notice a low reading, because the capacitor acts as a short until it charges; but then, if the capacitor is working properly, it will charge, and the resistance will rise to a nominally high value. If the device is shorted, the initial low resistance reading continues and the capacitor won't charge. Should the component be open, you'll not see the instantaneous short at time Tg, the moment charge starts to build. An open circuit has infinite resistance. An in-circuit capacitance tester is helpful here. Total faHure as a short or open is pretty easy to find. But how about the device whose leakage depends on temperature or whose dielectric has weakened, changing the capacitance value? To test this capacitor requires a different level of analysis. Capacitance Measuring If you have an ohmmeter whose face has the ( number 10 in the middle of the scale, you can easily use it to approximate the capacitance of a device. Using the time constant formula T=RC, the time in seconds for a capacitor to charge to 63.2 percent of supply voltage is equal to the resistance in ohms times the capacitance in farads. Using a 22 i*F (or .000022 farad, 22 microfarad) capacitor and a 1 megohm (1,000,000 ohm) resistor, the charge time for one time constant is .000022 X 1,000,000 = 22 seconds. Transposing the formula to read: C = T/R, we can determine the value of capacitance by knowing the resistance and counting the seconds required for the charge to cause the ohmmeter needle to reach 63.2 percent of full scale (infinite resistance). This point is at about 17 on the meter's scale. To do this, disconnect one end of a capacitor from the circuit, turn on your meter, and let it warm up for a minute. Zero-adjust the ohms scale reading. Then estimate the ohms scale multiplier needed to let the capacitor charge in some acceptable time period. For microfarad capacitors use the x 100K scale because this will let the capacitor charge in less than a minute. The 17 on the scale represents 1.7 megohms on the x 100K scale. Short a low-ohm-value resistor across the two capacitor leads for several seconds to thoroughly drain off any charge. Then connect the meter's ground lead to the negative side of the capacitor (either side if the capacitor is not an electrolytic), and touch the positive meter probe to the other side of the capacitor. Using a stop watch to count seconds and tenths of a second, watch the face of the ohmmeter as the capacitor charges, moving the resistance needle up. When the needle gets to 1 7 on the scale, stop the clock and read

148 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE the time. This will give you the value of capacitance in microfarads. This technique will give you a close enough approximation of the capacitance value to determine if the device is good or should be replaced. Replacing Capacitors Always try to use the same type and value capacitor as the one being replaced. Keep the leads as short as possible and solder the capacitor into the solder connector holes with the proper iron. The solder process should not exceed 1 .5 seconds per lead or heat damage to the component may result. A good technique to use is to tin the capacitor leads just before poking them through the circuit board holes. This speeds the solder bond process. TESTING DIODES If you have a digital multimeter (DMM) with a diode test capability, you can quickly determine whether a suspected diode is bad or good. Placing the meter on the ohmmeter setting and the probes across the diode causes the meter to apply a low current through the diode if the diode is forward biased. The voltage drop across a diode is normally 0.2-0.3 volt for germanium diodes and 0.6-0.7 volt for silicon diodes. Reversing the leads should result in no current flow, so a higher voltage reading should be observed. A low voltage reading when biasing the diode in either direction indicates that the device is leaking or shorted. A high-voltage reading in both directions indicates the diode bond has opened. In either case, replace the diode immediately. In-circuit tests of diodes can also be done using the ohmmeter to check the resistance across a diode in both directions. With one polarity of the meter probes, you should get a reading different from that obtained when the probes are reversed — not just a few ohms different but several hundred ohms different. For example, in the forward -biased direction, you could read 50-80 ohms; in the reverse biased direction, 300K ohms. This difference in readings is called DE for diode effect and is useful for evaluating transistors. When both readings on a diode show low resistance, you can be sure the leaky short is present. TESTING TRANSISTORS It's no fun to desolder a transistor to test it for failure, then finding it good, solder it or a new device back into the circuit board. Fortunately, there is a way to determine the quality of silicon transistors without removing them from the circuit. In 90 percent of the tests, this procedure will accurately determine whether a device is bad. As shown in Fig. 6-22, transistors operate the same way as a configuration of diodes. PNP and NPN transistors have opposite-facing diodes. The transistor functions by biasing certain pins and applying a signal to one of the leads (usually base) while taking an output off the collector- or emitter. NPN PNP Fig. 6-22. Transistors act like a pair of diodes. These tests apply to both PNP and NPN transistors. If an ohmmeter is placed between the collector and emitter (C-E) as shown in Fig. 6-23, it effectively bridges a two-diode combination in which the diodes are opposing. You should get a high resistance reading with the leads applied both ways. (It's possible to wire the transistor in a circuit which makes the transistor collector-emitter junction act like a single diode. In this case you could get DE. Both results are O.K.) OHMMETER B Fig. 6-23. A transistor can be tested using an ohmmeter placed across the col lector-to-emitter junction. Typical C-E resistance readings for germanium transistors are as follows: Forward biased = 80 ohms Reverse biased = 8000 ohms (8K)

ADVANCED TROUBLESHOOTING 149 For silicon transistors you might read: Forward biased - 22 megohms Reverse biased - 190 megohms The high/low ratio is evident and is about the same for both types. Place the probes across the collector-to-base junction leads. Reverse the probes. You should observe a low reading in one case and a high reading with the test probe leads reversed, or DE. Try the same technique on the base-to-emitter junction leads. Look for the DE (Fig. 6-24). If DE is not present in all the above steps, you can be certain the transistor is bad and needs replacing. C OHMMETER Fig. 6-24. Check the base-to-emitter junction for diode action (DA). Another way to evaluate a transistor is to measure the bias voltage from base to emitter on an energized circuit. Confirm the correct supply voltage first; power supply problems have been known to trick troubleshooters into thinking a certain component has failed. The B-E forward bias for silicon transistors should be between 0.6 and 0.7 volt DC. If the reading is below 0.5 volt, replace the diode— the diode junction is leaking too much current. If the reading is almost 1 volt, the junction is probably open and again the device should be replaced. Table 6-1. B-E Voltage Readings B-E Voltage (Forward biased) Action 0.6-0.7 V Good, keep 0.5 Replace 0.9 Replace Although in some isolated cases some other failure could cause the low reading, the most common cause of low bias voltage is failure in the transistor itself. If the previous tests are inconclusive, there is something else you can try. Measure the voltage across the C-E junction. If tire re'ading is the same as the source supply ( + 5 volts for Q7 on the Commodore 64 motherboard) and you notice on the schematic that there's plenty of resistance in the collector-base circuit, the junction is probably open. Replace the device. If your reading is close to 0 volt, take a small length of wire and short the base to the emitter, and remove all the transistor bias. The C-E meter reading should instantly rise. If it doesn't, the transistor is shorting internally and should be replaced. If C-E voltage does rise, it suggests a failure in the bias circuitry, perhaps a leaky coupling capacitor. REMOVING SOLDER We used to call them solder suckers— those hand held vacuum pumps with the spring-driven plunger to pull the hot, melted solder off a connector (Fig. 6-25). The process involves heating the old solder until it melts, placing the spring-propelled vacuum pump in the hot solder, then quickly removing the soldering iron while releasing the vacuum pump's spring, sucking the solder up into a storage chamber in the pump. This technique works fine until you try to use it around CMOS chips. Some vacuum pumps produce static electricity, and by now you know what that can do to an MOS or CMOS chip. A safer way to remove solder is to touch the solder with the end of a strip of braided copper. Then heat the braid just a short distance from the solder (Fig. 6-26). Caution: Be sure to use a properly grounded soldering iron. The copper braid heats quickly, transferring the heat to the solder, which melts and is drawn into the braid by capillary action. Then, cut off the solder-soaked part of the braid and throw it away. If any solder remains in the circuit board hole, heat the solder and push a toothpick into the hole as the solder cools. The toothpick will keep the hole open so you can easily insert another wire lead for resoldering. Another way to remove the residual solder block

150 COMMODORE 64 TROUBLESHOOTING &, REPAIR GUIDE Fig. 6-25. The spring-driver plunger in the solder vacuum pump is used to pull hot solder off a connection. Fig. 6-26. Using solder wick is another way to remove solder from a connection. ing a hole is to drill out the hole with a tiny drill bit. Be sure to remove any debris, filings, or pieces of solder before energizing the circuit board. Use a magnifying glass to confirm that nothing unwanted remains on the board. Be careful not to overheat the board during the solder-removal process. Excessive heat can cause part of the circuitry to come away from the board. It can also damage good components nearby. The recommended method for desoldering is to use a light touch with the desoldering tip, just touching • the pad where the lead is penetrating. The tip shouldn't be in contact with the joint for longer than two or three seconds once the solder melts. The tip should be against the solder joint with light pressure. If you remove the solder from a component and a lead is still stuck on some residual solder, take a pair of needle-nose pliers and pinch the lead as you gently wiggle it to break it loose from the solder bond. Sometimes tightly soldered chips need replacing. The pins of these chips are bonded to the circuit board by a process called wave soldering. Wave soldering produces an exceptionally good bond without the added manufacturing expense of a socket. This process helps keep the fabrication costs down, but it makes it more difficult for you to replace the chip. One effective way to remove wave-soldered chips is to cut the chip leads or pins on the component side and remove the bad chip. Then remove the pieces of pin sticking through the board using a soldering iron and solder braid or a vacuum pump. Some special tools are available to help you in removing soldered components. Fig. 6-27 shows a desoldering tip that fits over all the leads of a chip or dual-in-line package (DIP) socket. Fig. 6-28 is a photograph of a spring-loaded dual-in-line extractor tool. By attaching this device to the chip and then applying the DIP tip shown in Fig. 6-27 to the soldered connections on the opposite side of the board, you can easily remove a complete chip all at one time. Press the load button downward and engage the clips, causing the extractor to place an upward spring pressure on the chip. When the solder on the reverse side melts enough, the chip will pop up and off the board. If you're removing the chip manually (without extractor tools), avoid working on adjacent pins to prevent excessive heat buildup in one area. Desolder the corner pins first, and then desolder every other pin on the chip. When you replace a chip that was soldered to the printed-circuit board, always solder in a socket and then plug the replacement chip into this socket. This will make future replacements a lot easier. Be careful to maintain the correct pin 1 alignment. SOLDERING TIPS No pun intended. Hand soldering is the most misunderstood and most often abused function in electronics repair. Not only do many people use poor soldering techniques, but they also use the wrong soldering irons.

ADVANCED TROUBLESHOOTING 151 Fig. 6-27. A desoldering tip for removing chips that are soldered to the circuit board. Fig. 6-28. A spring-loaded dual-in-line extractor tool. Solder isn't simply a Band-Aid™ adhesive making two metals stick together. It actually melts and combines with the metals to form a consistent electrical, as well as mechanical, connection. Time and temperature are critical in this process. The typical hand solder job should be accomplished in 1.5 seconds, or less if the soldering iron and tip are properly selected and then properly maintained. The nominal solder melting temperature is 361 °F. Metal combination between the solder and the metais being joined occurs at temperatures between 500 and 600°F. Most soldering jobs join the metals copper and tin, but both of these metals are easily oxidized. (Remember this from Chapter 5?) Poor or no solder connections are made if the surfaces to be connected are covered by contaminants such as oils, dirt, or even smog, so be sure to use solder with a good cleaning flux. The flux prepares the surfaces for best solder metalization. The flux melts first and flows over the metal surfaces, removing oxidation and other contaminants. Then the metal heats so that the solder melts and flows, producing a good, shallow bond. The key to successful soldiering is in the soldering iron tip. Most people selecting their first soldering iron jump right into a low-wattage iron, but this is a mistake. Instead, pick an iron whose tip operating temperature is suited for the circuit board you're to repair. If the tip temperature is too low, the tip sticks to the surface being soldered. If it's too high, it damages the board surface. The ideal working temperature for soldering on your computer's circuit board is between 600 and 700°F. The soldering iron tip is used to transfer the heat generated in the iron out to the soldering surface. The iron should heat the tip quickly, and the tip should be as large as possible yet slightly smaller than any soldering pad on the board. Tips are made of the same material as some of the contacts you're soldering— copper. Copper quickly conducts heat, but it dissolves in contact with tin. Solder is made of tin and lead. To keep the tin from destroying the copper tip, manufacturers plate a thin layer of iron over the tip. The hot iron (now you know where the term "iron" came from) still melts the solder, but now the tip lasts longer. The iron melts above 820°F, so if the heat produced by the iron stays below 700°F, the solder melts but the iron plating does not. The disadvantages of the iron plating are that it doesn't conduct heat as well as copper, and it oxidizes rapidly. To counteract this, you can melt a thin coat of solder over the tip. This is called tinning. This solder layer helps the soldering iron heat quickly and also prevents oxidation. The tip of an old soldering iron is usually black or dirty-brown with oxidation. And it doesn't conduct heat very well. These burned-out tips can be cleaned with fine emery cloth and then can be retinned and used. Wiping the hot tip with a wet sponge just before returning the iron to its holder is a mistake. This removes the protective coating, exposing the tip surface to atmospheric oxidation. It's much better to add some fresh solder to the tip instead. Keep your iron well tinned.

152 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Fig. 6-29 shows the proper way to solder a socket or connector lead. Place the tip of the iron on one side of the lead and the solder on the other side. As the solder pad heats, the tin/lead solder melts and flows evenly over the wire and the pad. Keep the solder shallow and relatively even. When you think your soldering job is complete, carefully inspect your work. Fig. 6-30 shows some examples of inadequate soldering. Sometimes, if you aren't careful, you can put too little solder on the joint, leaving insufficient solder on the top or the bottom of the connection. It's also possible to get internal voids or hollow places. Finally, large solder balls or mounds invite cold solder joints where contact is only partially made. These are a potential cause of intermittent failure. LEAD SOLDER SOLDERING IRON Fig. 6-29. Place the soldering iron on the opposite side of the lead from the solder. ~ CHIP mm® (A) NOT ENOUGH SOLDER ON BOTTOM 7= CHIP r- CHIP SI ardI /BOARD I \f I I I (B) NOT ENOUGH SOLDER ON TOP (C) HOLLOW VOID INSIDE Fig. 6-30. Examples of inadequate soldering on a printed circuit board. Good soldering takes patience, knowledge, and the right tools— a temperature-controlled soldering iron whose tip temperature is maintained in the 500-6O0°F range for optimum soldering effect. Figure 6-31 describes a soldering tool station made by Weller and marketed by Cooper Tools. This station will maintain the tip temperature to within 10°F of that selected throughout a range of 350-850°F. With any of the EC series soldering tool staFig. 6-31 . A temperature-controlled soldering iron is recommended for any repair or replacement on printed circuit boards. (The Cooper Group) tions, you can achieve the ultimate in controlled temperature hand soldering. Before You Solder It In A useful thing to do before you solder in a replacement part is to test the device in the circuit. Simply insert the chip or other device into the solder holes and wedge each lead in its hole with a toothpick. Then energize the circuit and test. After proper function is assured, remove the toothpicks and solder the component into the board. Circuit Board Repair Repairing damaged circuit boards is a lucrative business, and several companies have developed around this activity. For some board failures, you can repair your own circuitry and save some money. Before soldering in new components, check over the board for any broken traces or pads lifting off the board. If a trace is open and is starting to lift away from the board surface, jumper across the broken spot from one solder pad to another pad. Use solid wire (#18 down to #30) tinned at both ends before soldering. If a pad or trace lifts free, replace it with an adhesivebacked pad or trace overlapping the damaged area. Scrape the coating off the pad or both ends of the trace so the new pad or trace can be soldered firmly to the existing one. Remove all excess solder and redrill any lead hole that has become covered or plugged with residual solder.

ADVANCED TROUBLESHOOTING 153 RECOMMENDED TROUBLESHOOTING AND REPAIR EQUIPMENT If you're planning to tackle failures that usually require service center support, you can minimize your investment costs and yet optimize your chance of success by carefully selecting your equipment and tools. First, get a set of good screwdrivers— both flathead and Phillips-head. Get a wide selection of sizes — from the tiny tweakers to an 8-inch flat head. You might also find a set of jeweler's screwdrivers quite helpful. Then get several sizes of long-nose or needle-nose pliers. Get several sizes of diagonal cutters, or dykes, for cutting wire and pins. A good low-wattage soldering iron whose tip temperature is automatically controlled is a must if you intend to replace nonsocketed components. A simple Vh digit DVM or DMM is useful for test measurements. Another handy tool is the logic probe. If you can afford it, get a 15-25 MHz oscilloscope with dual trace and a time-base range of 200 nanoseconds to a half second. Select a scope with a vertical sensitivity of 10 millivolts per division or better. Below is an approximate price list for troubleshooting and repair equipment. Screwdrivers — 12 Pliers 4V2" short-nose 53A" long-nose Diagonal cutters 4Vi" flush 4Vi" midget DMM (3Vi digit) Logic probe Logic pulser Current tracer Logic clip Oscilloscope Logic analyzer $ 15.00 15.00 10.00 80.00 83.00 85.00 200.00 80.00 1200.00 1100.00 You can get by quite nicely for less than $500 using the probe, pulser, tracer, and DMM as your primary equipment. Prices vary from one manufacturer to another. It would also be a good idea to keep some spare chips on hand. Because of the cost involved, you will probably want to maintain a minimal stock of repair parts; yet you want to be able to fix your machine quickly when it breaks down. Since the Commodore 64 is supported at the manufacturing plant level, obtaining spare parts for the machine can become a critical issue. The optimal backup would include one each of every type of chip on your Commodore motherboard. This represents an investment of $100 to $200 in 32 chips (if you can get the chips). Currently, Commodore 64 is providing their custom chips— the MPU, PLA, SID, VID, and ROMs only on a board exchange. Your largest expense jn chips will be for these custom ICs. Some people have designed adapter sockets so they can "burn in" the 20-pip 2364A ROM information on 28-pin 2764 EPROMs and have their own backup memory chips. Several companies are marketing some of the spare parts used in the Commodore 64, but generally, parts are quite difficult to find. In the Appendix you'll find a listing of each chip in your computer including its designation, name, and location. SUMMARY There are four possible ways to optimize your computer system's operational life: 1 . Buy a highly reliable computer with a good track record of performance. 2. Buy a good on-site repair contract. 3. Buy a second identical computer to use as a backup during repair of the first. 4. Become a knowledgeable repair technician yourself. Armed with the knowledge in this manual, you'll be able to spot downright poor troubleshooting— the "tech" using a bare cotton swab with low-grade alcohol to clean a disk-drive read head; a repair person wiping the soldering iron on a wet sponge just before putting it in its holder. These are mistakes of poorly trained (or poorly motivated) people working on someone else's machine. You'll also be able to recognize the sharp, highly trained technician who uses the right tools and the right procedures to troubleshoot and repair in minimum time. Then you'll smile to yourself, knowing that you were smart enough to buy this book and do your own repair the right way— the Commodore Optimum way.

Appendix Datasheet 155 Commodore 64 Chip Information Chart 156 Commodore 64 Disassembly Instructions 158 Commodore 64 Reassembly Instructions 1 59 VIC-1541 Disk Disassembly/Reassembly Instructions .... 159 Lubrication of Head Rail Assembly 1 59 Adding Disk Drives 159 European (PAL) Video 160 Replacing Surface-Mounted Components 161 Equipment History Record 162 (Sample) Equipment History Record 162 Record of Configuration Changes 162 (Sample) Record of Configuration Changes 162 System Description 162 (Sample) System Description 163 Operational Log Sheet 1 63 Routine Preventive Maintenace 163 Summary of Notes and Cautions 164 ASCII Code Chart 165 Hexadecimal-to-Decimal Conversion Chart 165 DATA SHEET Weight: 4.1 lbs. Power Required: Less than 20 watts 8.5 watts at 5 volts DC MPU: Commodore 6510 Data Word Size: 8 bits CPU Clock Speed: 1 .023 MHz Memory Size: 64K Mass Storage Capability: Up to 4 VIC-1541 disk drives (Usual configuration — 2 disk drives) Datassette Cassette Recorder Keyboard Size: 65 keys 157 character codes Text Display: 40 uppercase characters (2 character sets) 24 lines Graphics Capability: Low resolution — 160 x 200 pixels High resolution — 320 x 200 pixels User defined Sprite graphics Color Capability: 1 6 colors Computer: Commodore 64 Manufacturer: Commodore Business Systems 1200 Wilson Drive West Chester, PA 19380 Size: 2.75" x 15.9" x 8.0" Input/Output: Cassette Input/Output 2-control port inputs for game paddles Cartridge expansion slot 24-pin user I/O port 6-pin serial I/O connection RF modulator output for TV NTSC composite color output for monitor 155

uii -t Mar 156 COMMODORE 64 TROUBLESHOOTING & REPAIR GUIDE Languages: BASIC provided (Numerous languages commercially available) COMMODORE 64 CHIP INFORMATION CHART (Refer to Fig. A-1) Integrated Circuits Location IC Number U1 6526 CIA #1 U2 6526 CIA #2 U3 901226-01 U4 901227-XX U5 901225-01 U6 211 4-30L/MCM2 1 1 4P20 U7 6510 U8 7406N/M53206P U9 4164-2/MK4564N-20 U10 4164-2/MK4564N-20 U 1 1 41 64-2/MK4564N-20 U12 4164-2/MK4565N-20 U13 74LS257 U14 74LS258 U15 74LS139 U16 4066 U17 82S100 U18 6581 SID U19 6567 VIC U20 556/MC3456 U21 4164-2 RAM U22 4164-2 RAM U23 4164-2 RAM U24 4164-2 RAM Description Complex interface adapter Complex interface adapter NMOS 8192 x 8 static BASIC ROM NMOS 8192 x 8 static Kernal ROM NMOS 4096 x 8 static Character ROM NMOS 1024 x static RAM NMOS MPU Quad operational amplifier NMOS 65,536 x 1-bit dynamic RAM NMOS 65,536 x 1-bit dynamic RAM NMOS 65,536 x 1-bit dynamic RAM NMOS 65,536 x 1-bit dynamic RAM Quad 2-input tri-state multiplexer TTL digital multiplexer Dual 2/4 decoder demultiplexer CMOS quad analog switch Field programmable PLA Sound interface device Video interface chip Dual 555 timer NMOS 65,536 x 1-bit dynamic RAM NMOS 65,536 x 1-bit dynamic RAM NMOS 65,536 x 1-bit dynamic RAM NMOS 65,536 x 1-bit dynamic RAM V U25 74LS257 U26 74LS373 U27 75LS08 U28 4066 U29 74LS74 U30 74LS193 U31 74LS629N U32 MC4044 Other Components Location Device CR1 1N4371 CR2 1N75V CR3 1N914 CR4 VM08 (P/S) CR5 1N4001 (P/S) CR6 1N4001 (P/S) Q1 2N4401 Q2 2N3904 Q3 TP29B Q4 PN2222 Q5 PN2222 Q6 PN2222 Q7 PN2222A Q8 PN2222 VR1 MD7812CT/UA7812UC VR2 MC7805CT Quad 2-input tri-state multiplexer 8-bit transparent latch Quad 2-input AND CMOS analog switch Quad D flip-flop Binary up/down counter Dual voltage controller oscillator TTL phase frequency detector Description 2.7-volt zener diode 7.5-volt zener diode Signal diode Bridge rectifier diode Power diode Power diode Transistor Transistor Transistor Transistor Transistor Transistor Transistor Transistor Fixed, positive linear voltage regulator Fixed, positive linear voltage regulator 1500 mA output Fig. A-1. Analog Card (see also opposite page).

APPENDIX 157 liliiiiiiiiiiiiiiiiiiiliHIillilli SERIAL MONITOR TV PORT VIDEO VIDEO USER PORT Q C < o 662S ssaa CO CIA CIA >Ul 11 #2 *£ m o 8 (U3> i (U4) (U5) 8 s m 661 OA MPU PLA ■n r> RF MODULATOR CARTRIDGE EXPANSION SLOT

158 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE COMMODORE 64 DISASSEMBLY INSTRUCTIONS These procedures apply to repairs on the Commodore 64 motherboard. Tools & Equipment Required — #2 Phillips-head screwdriver — Uncluttered workspace — Container to hold screws until reassembly Procedure for Motherboard Access 1. Turn the power off. 2. Unplug the power cord from the rear of the computer. 3. Disconnect all peripheral equipment including cables. 4. Lay the computer upside down on an uncluttered work surface. Rest the keyboard on a roll of paper or foam rubber. 5. Refer to Fig. A-2. Remove the three Phillips-head screws from the keyboard-end of the baseplate. (REMOVE THESE PHILLIPS HEAD SCREWS) Fig. A-2. Remove these screws to disassemble your Commodore 64 computer. 6. Hold the baseplate of the Commodore 64 chassis and turn the computer right-side up, with the keyboard facing you. 7. Lift the top of the case from the front— it's hinged in back— to expose the keyboard cable plugged into the keyboard connector socket on the motherboard, and the Power-ON light cable. (Refer to Fig. A-3.) Fig. A-3. Lift the" top front of the case, exposing the keyboard cable and Power-ON light. 8. Using a small nonmagnetic screwdriver, gently rock the keyboard connector out of the socket. 9. Lift the keyboard-case housing up off the base and set it aside. The motherboard is now fully exposed. Motherboard Removal If you are planning to repair the motherboard or replace soldered components, follow these steps: Tools and Equipment Required Phillips-head screwdriver Container to hold screws Procedure for Removing Motherboard 1 . Follow steps 1 through 1 1 in the procedure for motherboard access. 2. Remove the six Phillips-head screws around the edge of the motherboard. 3. Lift the motherboard off the baseplate. Keyboard Removal For repair or replacement of the Commodore 64 keyboard. Tools and Equipment Required Phillips-head screwdriver Container to hold screws Procedure for Removing Keyboard 1. Follow steps 1 through 10 of procedure for motherboard access. 2. Lift the keyboard case housing up off the motherboard case and set the keyboard housing down, with the keyboard resting on a support pad. 3. Remove the Phillips-head screws from around the edges of the keyboard. 4. Lift the keyboard up out of the housing.

APPENDIX 159 COMMODORE 64 REASSEMBLY INSTRUCTIONS Now that the repair is complete, follow these steps to put your system back together. Reinstalling the Motherboard 1 . Align the motherboard over the six screw holes and gently set into place. 2. Reinstall the six Phillips-head screws, securing the motherboard to the bottom case of the computer. 3. Set the keyboard housing tabs into the slots at the rear of the motherboard section of the case. 4. Reconnect the keyboard and Power-ON cables. Caution: Be certain you align pin 1 of the plug with pin 1 of the connector socket. (The keyboard cables go toward the outside of the board. The two tabs on the Power-ON light go toward the board or inside of the connector.) 5. Fold the keyboard case gently down over the motherboard housing. 6. Hold the baseplate to the keyboard chassis and turn the computer upside down, resting the keyboard on a support pad. 7. Reinstall the three Phillips-head screws in the keyboard end of the baseplate. 8. Turn the computer right-side up. 9. Reconnect power cord, energize and test. 10. Reconnect peripherals and return system to full operation . 11. Fill out equipment history record. Reinstalling the Keyboard 1. Gently align the keyboard over the securing holes in the top of the computer housing. 2. Reinstall the screws to hold the keyboard to the case. 3. Turn the keyboard housing right-side up and place it over the motherboard L-shaped baseplate section. Be sure the tabs are inserted into the bottom section, engaging the hinge action. 4. Reinstall the keyboard cable connector and Power-ON indicator cable connectors. Caution: Be certain you align pin 1 of the plug with pin 1 of the connector socket. 5. Lower the keyboard section down over the motherboard section. 6. Hold the baseplate to the keyboard chassis and turn the computer upside down, resting the keyboard on a support pad. 7. Reinstall the three Phillips-head screws in the keyboard end of the baseplate. 8. Turn the computer right side up. 9. Reconnect power cord, energize and test. 10. Reconnect peripherals and return system to full operation. 1 1 . Fill out equipment history record. VIC-1541 DISK DRIVE DISASSEMBLY/REASSEMBLY INSTRUCTIONS (These procedures are covered in Chapter 5, "Routine Preventive Maintenance." LUBRICATION OF HEAD RAIL ASSEMBLY Tools and Equipment Required Phillips-head screwdriver Heat-resistant grease Cotton swab or Q-Tip® Container to hold screws Procedure for Head Rail Lubrication Disassemble (see Page 125, Chapter 5). Remove top half of case and set aside. Locate the two rails that read/write head moves on. Lightly lubricate with swab dipped in heat resistant grease (white lithium grease works.) Reassemble (see Chapter 5). ADDING A DISK DRIVE Up to four VIC-1541 disk drives can be attached to your Commodore 64 computer as shown in Fig. A-4. COMMODORE 64 FIRST SECOND THIRD 1 o FOURTH DEVICE #8 DEVICE #9 DEVICE #10 DEVICE #11 Fig. A-4. As many as four VIC-1541 disk drives can be connected to your Commodore 64 computer. Each time you add a drive, you must configure the drives for the correct device number code (between 8 and 11). This is accomplished by opening the drive and cutting an appro

160 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE priate jumper on the VIC-1 541 disk drive electronics board, as shown in Table A-1. Table A-1. Appropriate jumper to cut when adding a disk drive. # of Drive # of Jumper to be added Device # to cut First 8 None Second 9 1 Third 10 2 Fourth 11 1.2 Tools and Equipment Required Small diagonal cutters (dykes) Phillips-head screwdriver Uncluttered workspace Container to hold screws until reassembly Procedure for Changing Disk-Drive Number 1. Turn power off. 2. Disconnect all cables from drive including power cable. 3. Turn drive over on soft, flat cushion pad. 4. Remove four screws holding drive box as shown in Fig. A-5. (REMOVE THESE PHILLIPS HEAD SCREWS) (REMOVE THESE PHILLIPS HEAD SCREWS) Fig. A-5. Remove the four screws holding the drive together. 5. Hold drive together and turn upright. 6. Remove top of case and set aside. 7. Remove the two screws on the side of the metal shield cover. 8. Lift metal housing up and away. 9. Locate device number jumpers as shown in Fig. A-4. These are halfway back on the left edge of the board. 10. Cut either, or both, jumpers 1 and 2, as determined by Fig. A-4. 1 1 . Replace housing and two screws. 1 2. Replace case top. 1 3. Hold unit together and^ turn over. 14. Replace the four screws that hold the two parts of the case together. 15. Reconnect power and connector cables as shown in Fig. A-6. CABLE TO COMMODORE CABLE TO ADDED DRIVE POWER CORD PLUGS HERE OUT ON OFF 1 IN SERIAL BUS POWER PLUG CONNECTION FUZE HOLDER OUT IN ON OFF SERIAL BUS POWER PLUG CONNECTION FUZE HOLDER LAST DRIVE Fig. A-6. Connecting power and interface cables. 1 6. Power up and test. (Remember: You must tell the computer which device you wish to access, using the device number.) EUROPEAN (PAL) VIDEO Commodore 64 computers purchased in the United States are configured for the 525-line, 30-picture-per-second NTSC (National Television System Committee) video standard. For those of you living in, or moving to, countries where the European 625-line, 25-picture-per-second PAL (Phase

APPENDIX 161 Alternate Line) video standard is used, you must convert your NTSC-configured Commodore 64 to PAL video. You must also make sure you have the correct power converter installed, if necessary. This section covers conversion of your video from NTSC to PAL. As shown in Table A-2, many of your motherboard com ponents are different depending on which type video display you're driving. Table A-2. Component Differences NTSC-PAL Video Component NTSC PAL C70 capacitor 16 pF +/- 5% N220O 15 pF +/- 5% N3300 R52 resistor 680 ohm 1/4 W, 5% 330 ohm 1/4 W, 5% R53 resistor 910 ohm 1/4 W, 5% 100 ohm 1/4 W, 5% U4 2364A ROM 2364A Kernal J IS 2364A Kernal US PAL US 2332 ROM 2332B char gen JIS 2332 char gen US PAL U17 PAL 82S100N/7700 JIS,NTSC 93459 PAL U19 VIC 6567 NTSC 6569 PAL Y1 crystal 14.31818 MHz 17.73447 MHz jumpering for European (PAL) Video Located between the RF modulator can and the video can on the motherboard is the sound carrier select jumper. With this jumper in place (shorted), the system is set for what Commodore calls G. PAL video. Cutting (opening) this connection sets up the board for I. PAL as shown in Fig. A-7. dD (n) I.PAL G.PAL Fig. A-7. Sound carrier select jumper on the motherboard. Inside the video can and off the upper right corner of the VIC chip is a set of eight holes, in two rows of four. These are the jumper holes for NTSC/PAL video. The correct position for the jumper, depending on the video display you intend to drive, is shown in Fig. A-8. E3 E2 (D O O (D CD O O d) E1 PAL (NTSC) (PAL) Fig. A-8. NTSC/PAL jumpers inside the VIC-II video can. REPLACING SURFACE-MOUNTED COMPONENTS Desoldering and soldering on the Commodore 64 motherboard is not easy— the board construction is such that you can easily damage the board traces and solder points, if you aren't extremely careful. Caution: Proceed at your own risk. — Reread the section on soldering techniques, in Chapter 6. — Be sure you're using a temperature-controlled iron. — Disassemble the machine1 and remove the motherboard. Notice that a thin brass plate covers the underside of the motherboard. Tiny tabs on the edges fold over onto the top of the board and are soldered to the motherboard's ground bus, making the complete underside a huge ground plane. This plate must be removed. — Carefully heat each tab with the iron and use braided wick to draw the solder away from the connection. — When the tab comes free from the board, bend the tab up and away from the system-ground bus. — Upon desoldering the last tab, gently lift the board up off the thin ground-plane plate. — Set the ground-plane plate aside. — Set the motherboard down with the bottom side up. Notice that an insulated separator pad was between the component underside of the board and the metal ground-plane plate. — Remove the insulated pad exposing the soldered pins of the components on the motherboard. — Place the board on its edge and locate the component to be replaced. — If possible, during chip removal, attach an extractor tool to the component to be replaced, and use a DIP tip on your iron to heat the pins and remove the chip. — Or use a vacuum solder "sucker" or braided wick and the temperature-controlled iron to heat the pins. (Start at the corners first, then desolder every other pin to avoid overheating one area of the board trace until the component comes free.) — Clean the solder holes using the techniques described in Chapter 6. — If a chip was removed, install an IC socket in its place on the motherboard. This lets you install a replacement chip into an already soldered connection, eliminating the need to solder directly to the chip pins themselves. — If a transistor is being replaced, install a transistor socket in the motherboard connection holes. — If a resistor, diode, or capacitor is being replaced, solder the leads directly in the opened holes in the board. Cut off excess leads extending through solder side of board. — Reinstall the insulated separator.

162 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE — Carefully join the motherboard to the separator/ground plane. — Set the board down on the pad, component-side up, and carefully resolder all the ground plane tabs to the ground bus trace on the top of the motherboard. — Reinstall the motherboard in the computer's housing. — Rejoin the top housing to the base plate portion. — Hold both halves together and turn the computer over, keyboard down, exposing the three holes for the securing screws. — Reinstall the three securing screws. — Turn the computer right-side up. — Reconnect the power cord and monitor cable. — Power up and test. — Return to service (or break down again to replace another possibly faulty component). Reminder: If your efforts didn't solve the problem and you've replaced all the suspected components with good components, you have little recourse— pack it up with $55 and return your machine to Commodore for a swap with a new board. EQUIPMENT HiSIORY RECORD Name of Unit Model Serial Number Card Number Manufacturer Date Installed Date Nature of trouble Cause of failure, description work done Name of Circuit part symbol (SAMPLE) EQUIPMEN i HiSTORY RECORD Name of Unit Model Serial Number Card Number Commodore Computer Commodore C-64 P00233213 1 Manufacturer Commodore Business Systems, Inc. Date Installed July 15, 1984 Cause of failure, description Name of Circuit Date Nature of trouble work done part symbol 1984 08/22 No audio 09/01 PMs 10/01 PMs No audio signal Cleaned Cleaned SID U18 RECORD OF CONFIGURATION CHANGES Name of Serial Date Card Equipment Number Model Installed Number Number Title of Change Date of Change (SAMPLE) RECORD OF CONFIGURATION CHANG ES Name of Serial Date Card Equipment Number Model Installed Number Commodore Computer P00233213 C-64 07/1 5/84 1 Number Title of Change Date of Change 1 Added CP/M interface 07/20/84 2 Added light pen interface 08/05/84 SYSTEM DESCRIPTION Hardware: Serial System: Model: Number: Memory Size: Disk Drives: Printer: Display: Modem: Software: System Utilities: Type Serial Number Languages: Data Management Applications Tools: Software: Communications software:

APPENDIX 163 (SAM PL t) SYSifcM DbSCRiPIiUN Hardware: Serial System: Commodore Computer Model: C-64 Number: P00233213 Memory Size: 64K Type Disk Drives: VIC- 1541 VIC-1541 Commodore 1525 Printer 1701 Monitor Commodore 1 600 Modem Printer: Display: Modem: Software: System Utilities: Languages: Sprite Designer LOGO Tiny FORTH Assembler 64 Communications software: SuperTerm OPERATIONAL LOG SHEET Serial Number 300000 300001 20800 11000 11270 Data Management Applications Tools: Software: Research Assistant Word Pro 3 The Manager Easy Finance EasyCalc Equipment Title: Serial Number: Configuration: DATE ON OFF DATE ON OFF DATE ON OFF ROUTINE PREVENTIVE MAINTENANCE Preventive maintenance, or PM, is one of the least-used techniques for operational cost reduction, yet the savings that result can be substantial. If the equipment doesn't fail, you can't evaluate the bottom-line savings in conducting proper PM. It's only after your first mind-boggling repair bill that the fact sinks in: You might have prevented this failure by doing some easy, routine maintenance. Eighteen months of research has revealed that many manufacturers are not sure what optimum PM should be. Some companies prefer you don't do any PMs. (The result is the need for more equipment repair by their service people.) Among those who recommend PMs, there is great variation in recommended PM schedules for similar hardware (e.g., disk drives). The listing that follows is a consensus of recommendations of manufacturers, dealers, and users, and the author's own experience. Nute: Modify the schedule below if intermittents occur frequently. Daily Log operational time. Estimate disk-drive "run-light-on" time. Estimate printer "printing" time. Estimate computer "power on" time. Monitor humidity (a measure of static electricity). Weekly Clean computer system work area. Pick up all loose trash, shelve scattered books, store magazines, toss out old printed paper, toss those "bad" disks you've been saving, wipe down hardware with antistatic, dust-absorbing cloth, wipe desk and bench space with antistatic cloth, and vacuum shelves, desk, and floor. Clean equipment housings and cases. Wipe chassis with antistatic cloth, "wash" with lightly soaped damp cloth. Clean display screens. Use antistatic "dust-off" spray or cloth dampened with antistatic solution. Clean drive read-head (after 10 hours of "run-light-on" use). Demagnetize drive read-head (after 30 hours "run-light-on" use). (Recommended by one disk-drive manufacturer.) Monthly Clean inside computer. Turn power off, open lid, touch power supply case. Use soft brush and long narrow vacuum cleaner hose nozzle (it helps to spray the nozzle with antistatic first). Clean inside printer. Use same technique as for cleaning inside computer. Check ventilation filters in equipment (if applicable). Replace if cleaning is not practical (filter becomes worn or badly soiled). Check connector contacts. Look for signs of corrosion, pitting, or discoloration. Clean if necessary. The corrosion-removing wipes that also coat the surface with a lubricating coating to protect it from atmospheric corrosion are strongly recommended. every Other Month Reconnect cable and connector plugs. This removes corrosion buildup. Apply antistatic treatment to computer work area. See Chapter 5 for details. One company recommended this PM every six months. Clean inside printer. Use nonmagnetic, plastic vacuum hose nozzle and soft camel hair brush. Spray or wipe nozzle with antistatic spray or solution first. tverv Six Months Replace vent filters. Only if you have filters. This step refers primarily to printers and equipment other than the computer because the Commodore 64 doesn't use filters.

164 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Check disk drive speed. Speed test programs can be found advertised in various computer publications. Remember the room light, strobe mark test (see Chapter 5). Check head alignment. Do this only if you suspect a disk problem. Clean connector contacts. If you haven't done this during earlier inspection checks, conduct this PM now. Do this PM more often if your computer system is used in a smoggy part of the country or near salt air. Clean disk-drive read-head. If you use your system daily, your drive heads may need cleaning about now, but this depends very much on the kind and quality of disks you use. Conduct printer routine inspection. Do this every six months or 500,000 lines of print. Check the tightness of the screws and connectors. Conduct a printer self-test as described in the printer owner's manual. Annually Take routine maintenance infrared photo (optional). (Only if you're involved in this form of PM or troubleshooting). SUMMARY OF CAUTIONS AND NOTES The following is a listing of the Caution and Note statements used in this troubleshooting and repair manual. They are repeated here so you can review them quickly. It's a good idea to review them periodically. Opening or attempting repair inside your computer may void the warranty. Never insert or remove an expansion cartridge without first turning off the power to the computer, and pulling the power plug out of the side of the computer. Beware of static electricity. Always ground yourself before touching anything inside the Commodore case. For any procedures conducted with the chassis cover removed and with the computer operating, be careful not to short out any connectors or pin leads. Use only a nonmetallic or wooden object inside an energized Commodore 64 computer. Keep out of display chassis. Stay out of power supply. Use a power strip. Plug the computer and all peripherals (except a hard disk drive) into a switch-controlled strip. Keep liquids away from computer. Handle components with care. When cleaning, make sure the power is off and the plug(s) pulled out of the power socket(s). Use a damp cloth. Don't let any liquid run or get into your equipment. When rubbing to clean contacts, always rub along the pin (lengthwise). When using a logic clip, turn the power to the circuit off, attach the clip, then turn the power on. This helps prevent accidentally shorting out the chip. In the event of a lightning storm, unplug your entire system. Don't use power tools near your computer while it's operating. Commodore optimum steps to success: 1. Don't panic. 2. Observe the conditions. 3. Use your senses. * 4. Retry. 5. Document. 6. Assume one problem. 7. Diagnose to a section. 8. Localize to a stage. 9. Isolate to.a failed part. 10. Repair. 1 1 . Test and verify. Keep cables clear and away from power cords, especially coiled power cords. Be careful not to flex the motherboard or other boards too much. It's a good idea to log the repair action in a record book to develop a history of the maintenance conducted on the machine (see pages 162/163 for sample equipment history records). Don't wait for lightning to strike before you protect your computer system investment from electrical surges. Always unplug your computer system when blackout occurs. Never touch contacts with your fingers. Keep your diskettes, and even your information cables, away from power sources. You can damage the disk-drive electronics if you attach the cable incorrectly (see your disk-drive owner's manual). Handle diskettes carefully. Don't leave the disks lying around. Keep the disks in protective jackets. Don't touch the disk surface with your fingers. Keep the disks out of the hot sun. Don't use both sides of your disks in a single-sided drive. To extend disk life: Buy name brand disks. Never touch the disk surface. Never slam the disk door closed on a disk. Store disks in their protective jackets. Never write on a label that's already on a disk. Store disks in a cool, clean place. Back up all data disks. Store working disks and backup disks in different places. Never allow smoking near your disks or your drive. Never set disks near monitors or televisions. Avoid placing disks near vacuum cleaners and large motors. Don't bend or fold disks. Don't put disks through airport X-ray machines. Clean the read/write heads every 40 hours of disk operation. Provide adequate ventilation when cleaning read heads with solvent. Make sure the solvent evaporates before you operate the drive. If speed adjustment seems difficult (see Chapter 5), have a repair service shop do it. REMINDER: If your efforts didn't solve the problem and you've replaced all the suspected components with good components, you have little recourse — pack it up with $55 and return your machine to Commodore for a new board.

APPENDIX 165 ASCII CODE CHART HexaHexaHexadecimal ASCII decimal ASCII decimal ASCII no ^A JU V * A J/ vv * R JO V A * C jy v T LJ ?F / ^A OA 7 £UJ * F in KJ JD r L Uu * F J I 1 JV_ \ 07 * G (Bell) 32 2 5D 1 J 08 A H (Baeksoace) 33 3 5E 09 * 1 (Tab) 34 4 5F OA * 1 (Linefeed) 35 5 60 OB 36 g 61 d or * L j/ 7 A? oz k u nn /VI JO n o A1 UJ C L/C IP q Ad A u f)F 1A JA UJ G 10 3B AA DO i 11 A o 3C < 67 5 12 A R 3D AH U 1 1 13 * S 3E > AO i 14 " T 3F ? AA j 15 " U 40 (it> 6B k 16 " V 41 A 6C i 17 " w 42 AD ou m 18 * X 43 r AF n 1 44 n AF or o 1 A 41; ^ j c u. 7D P 1 R 4A c r 71 / I °, 1Aj $U7 215 $08 08 $3C 60 $70 1 12 £ A A 1 C A ff no 216 $09 09 $3D 61 $71 1 1 3 tAC )Aj 1 An I OJ juy 1t7 2. 1 / {OA 10 it- n r $3E 62 $72 1 1 A 1 14 ft AA I OO ffr\A 3>UA 1 1 o $0B 1 1 $3F 63 (£"70 $73 1 15 j)A/ 1 £7 I D/ (r\n Tin $0C 12 $40 64 $74 1 16 (An $A8 1 HO lo8 $DC 220 $0D 13 It A 1 $41 65 $75 117 $A9 169 $DD 221 $0E 14 $42 66 $76 118 $AA 1 70 $DE 222 $0F 15 $43 67 $77 119 $AB 171 $DF 223 $10 16 $44 68 $78 120 $AC 172 $E0 224 $11 17 $45 69 $79 121 $AD 173 $E1 225 $12 18 $46 70 $7A 122 $AE 174 $E2 226 $13 19 $47 71 $7B 123 $AF 175 $E3 227 $14 20 $48 72 $7C 124 $B0 176 $E4 228 $15 21 $49 73 $7D 125 i d i 1 "7"7 $E5 229 $16 22 $4A 74 $7E 126 3>DZ 1 7Q $E6 230 $17 23 $4B 75 $7F 127 j 1 7Q I /y $E7 231 $18 24 $4C 76 $80 128 Jb4 ItJU $E8 232 $19 25 $4D 77 $81 129 tor 5>DJ 1 o 1 $E9 233 $1A 26 $4E 78 $82 130 (tDA IDT 1 oz $EA 234 $1B 27 $4F 79 $83 131 tDT JD/ I OJ $EB 235 $1C 28 $50 80 $84 132 5 DO I o4 $EC 236 $1D 29 $51 81 $85 133 joy lor 1 OJ $ED 237 $1E 30 $52 82 $86 134 D A 1 8b $EE 238 $1F 31 $53 83 $87 135 $BB 187 $EF 239 $20 32 $54 84 $88 136 $BC 188 $F0 240 $21 33 $55 85 $89 137 $BD 189 $F1 241 $22 34 $56 86 $8A 138 $BE 190 $F2 242 $23 35 $57 87 $8B 139 $BF 191 $F3 243 $24 36 $58 88 $8C 140 $C0 192 $F4 244 $25 37 $59 89 $8D 141 $C1 193 $F5 245 $26 38 t C A $5A 90 for $8E 142 $C2 194 $F6 246 $27 39 >jD y i tor 1 A O I 4j $C3 195 $F7 247 $28 40 $5C 92 $90 144 $C4 196 $F8 248 $29 41 $5D 93 $91 145 $C5 197 $F9 249 $2A 42 $5E 94 $92 146 $C6 198 $FA 250 $2B 43 $5F 95 $93 147 $C7 199 $FB 251 $2C 44 $60 96 $94 148 $C8 200 $FC 252 $2D 45 $61 97 $95 149 $C9 201 $FD 253 $2E 46 $62 98 $96 150 $CA 202 $FE 254 $2F 47 $63 99 $97 151 $CB 203 $FF 255 $30 48 $64 100 $98 152 $CC 204 $31 49 $65 101 $99 153 $CD 205 $32 50 $66 102 $9A 154 $CE 206 $33 51 $67 103 $9B 155 $CF 207

Glossary fv5l0: The microprocessor in the Commodore 64 computer. A Address: A number that represents a unique location in the Commodore 64 memory. Add"»«s Bus: The collection of 16 wires over which the memory address is sent by the MPU to the memory or I/O. AND: A togic gate used in the Commodore computer by which the output is HIGH or logic 1, if and only if all inputs are also logic HIGH. ASCII: A code (American Standard Code for Information Interchange) representing the character symbols possible for specific hexadecimal codes. B BASIC: An easy-to-learn high-level language. BIT: A Binary dig/7 which, when combined with other bits, forms the address and data words in the computer. Blackout: The total loss of electrical power. Bootstrap: A short loader program that loads itself into RAM memory from ROM in ever-increasing sections. The program, in effect, pulls itself to completion by its "bootstrap." 3ro

168 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Data: Computer information such as numbers, letters, or special symbols. Data Bus: The collection of wires or traces over which the 8-bit data word travels in your Commodore 64 computer. Disk: The magnetic medium on which you store computer data. Display: The device on which visual information appears in lighted images. F Firmware: Programs that are stored in hardware, such as a ROM. Flip/Flop: An electronic device (chip/IC) that can hold a given logic state until acted on by a signal on a certain input pin. H Hardware: The physical components of a computer system — the computer itself, the printer, the monitor display unit, for example. Head: The electromagnetic material through which disks are written to or read from. Hexadecimal: The numbering system based on 16 digits, whereby the values above 9 become A, B, C, D, E, and F. Each hexadecimal number can be represented as a 4-bit code. I IC: The integrated circuit, or microelectronic device, which is the building block of the basic computer. Also called a chip, although technically, the chip is the material on which the circuit itself is fabricated. I/O: The input/output media through which information is sent or received between the computer and the outside world (e.g., disk drives, keyboard, display unit, etc.). K K: Stands for Kilo and in computer jargon is equal to 1024. The symbol used to represent a unit of measure for the size of memory in your computer. The term 64K actually means 65,536. M Memory: The hardware in, or on, which programs are stored. Memory can be RAM or ROM chips, magnetic disks, or magnetic tape. Motherboard: The large printed-circuit board in the computer on which most of the electronic devices are mounted. The primary or main board in your computer. All other interfaces receive information or controlling signals from the motherboard. The primary chips in your system are mounted on the motherboard. N Noise: The electrical interference that results from the presence of an electrical field near electrical signals, such as data buses or TV/radio. P Pin: The small metal connection that protrudes down from an IC, or from the male end of the keyboard connector mounted on the Commodore 64 motherboard. R RAM: Random Access Memory, which can be read from or written to by the Commodore 64's MPU. ROM: Read Only Memory, which has information permanently stored in its solid material. The information cannot be changed by the user. S Software: The programs which determine or control the actions of your computer. Spike: A short, high burst of electrical energy that, if not bypassed (or shorted) to ground, can cause damage to electronic components. Surge: A temporary increase in electrical voltage lasting long enough to register on a meter. T Transient: Brief fluctuations in voltage. Troubleshoot: The systematic location of a computer hardware failure. Software failures are found by systematic debugging. W Warm Start: The process of restarting the computer without reloading the operating system. The warm start process returns the user to BASIC.

Bibliography Anderson, Garry J. "Designer's Guide to the CMOS STD Bus." Electronic Products, November 17, 1983, pp. 81-87. Archibald, Dale. "The Making of the Magnetic Media for Micros." Softalk, February 1982, pp. 160-164. Babcoke, Carl. "Practical Information About Testing and Replacing Capacitors." Electronic Servicing, July 1970, pp. 28-37. Babcoke, Carl. "Quick Testing of Transistors." Electronic Servicing, November 1970, pp. 26-33. Babcoke, Carl. "Simple Servicing Tips." Electronic Servicing & Technology, July 1983, pp. 44-49. Baker, Alan, and Mielke, Neal. "Detecting Quality and Reliability Defects in EPROMs." Electronic Test, November 1983, pp. 56-62. Barden, William, Jr. "Getting Your Micro Repaired." Popular Computing, May 1983, pp. 54-58. Bausell, James. "Desoldering Components From High Density PCBs." Electronics, February 1984, pp 35-37. Bayer, Barry D. "Fix Your Disks." Apple Orchard, February 1983, pp. 59-62. Belt, Forest. "1-2-3-4 Servicing Simplifies Industrial Electronic . Maintenance." Electronic Servicing, September 1979, pp. 21-27. Benyo, Richard. "Singing the Praises of Dustcovers." Popular Computing, April 1983, p. 165. Bethune, Robert W. "Getting Along With Cassette Storage." Popular Computing, June 1983, pp. 190-192. Boom, Michael. How to Use the Commodore 64. Sherman Oaks, California: Alfred Publishing Co., Inc., 1983. Brawley, Harry E., Jr. "Keep Your Cool." Call A.P.P.L.E., May 1982, pp. 57-61. Brunelle, Robert. "Meeting the New Radio Interference Standards." Digital Design, November 1982, pp. 36-38. Bulkeley, William M. "Originators of BASIC Computer Language Seek to Profit From Success of Their Work." Wall Street journal, November 15, 1983, p. 38. "Choosing and Using the Proper Soldering Iron." Electronic Servicing & Technology, December 1981, pp. 36-39. Choudhury, Margaret A. "Heat Shows Its Colors for Testing." Electronic Packaging & Production, May 1983, pp. 120,121. Commodore 64 Programmer's Reference Guide. Indianapolis, Indiana: Commodore Business Machines, Inc. and Howard W. Sams & Co., Inc., 1982. Commodore 64 Technical Manual Model C-64. Commodore Electronics Limited, 1982. Commodore 64 User's Guide. Indianapolis, Indiana: Commodore Business Machines, Inc. and Howard W. Sams, & Co., Inc., 1982, 1983. COMPUTE'S First Book of Commodore 64. Greensboro, North Carolina: COMPUTE! Publications, Inc., 1983. Crosby, Mark L. "Singin' the Disk I/O Blues." Apple Orchard, Winter 1981/82, pp. 63-68. Cunningham, John E. "Troubleshooting Digital Equipment." Electronic Servicing, September 1980, pp. 18-21. Dale, Alan. "1-2-3-4 Servicing." Electronic Servicing, December 1970, pp. 26-30. Dash, Glen "Understanding EMI Test Methods Eases Product Acceptance." EDN, May 1983, pp. 183-192. 169

170 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Davis, Dwight B. "Diagnostics Improve as Computer Systems Proliferate." Mini-Micro Systems, August 1982, pp. 115-123. Davis, Dwight B. "Manufacturers Work Out Last RFI Kinks as Final FCC Deadline Approaches." Mini-Micro Systems, September 1983, pp. 127-138. Deavenport, Joe E. "EMI Susceptibility Testing of Computer Systems." Computer Design, March 1980, pp. 145-149. DIAGNOSTIC II. Champaign, Illinois: Supersoft, Inc., 1983. Engel, George M. "Line Cleaner— A Construction Project." In Cider, August 1983, pp. 108-110. Frank, Arthur L. "Survey: Eyestrain." Government Computer News, December 1983, pp. 26-30. Freedman, David H. "Designing the Right Enclosure." MiniMicro Systems, August 1983, pp. 229-242. Freitag, Walter O. "Lubricants for Separable Connectors." IEEE Transactions on Parts, Hybrids, and Packaging, March, 1977. Friedman, Herb. "Choosing the Right Floppy Disk." Computers and Programming, September/October 1981, pp. 29-31,70. Goldblatt, Robert C. "How Computers Can Test Their Own Memories." Computer Design, July 1976, pp. 125-129. Goodman, Robert. "An Ounce of Prevention." Electronic Servicing & Technology, May 1983, pp. 24-39. Goodman, Robert L. "Techniques for Repairing Intermittents." Electronic Servicing, July 1979, pp. 33-39. Grant, Glenn. "Blackout!" The Byte Buyer, Vol. 1, No. 12, December 16, 1983, pp 7-8. Grolle, Carl G. Electronic Technician's Handbook of TimeSavers and Shortcuts. West Nyack, New York: Parker Publishing Company, Inc., 1974. Halperin, Stephen A. "Guarding Against Electrostatic Discharge." Mini-Micro Systems, August 1983, pp. 257,258. Hancock, Earle. "A Man of Letters." In Cider, December 1983, pp. 172-174. Hancock, Earle. "Do-It- Yourself Disk Drive Repair." In Cider, November 1983, pp 32-34. Harwood, Robert. "Diagnostic and Utility Software." Personal Computing, October 1981, pp. 47-54, 166-169. Heilborn, John and Talbott, Ron. Your Commodore 64. Berkeley, California: Osborne/McGraw-Hill, 1983. Henriques, Vico E. "Visual Display Unit Legislation: New Hurdle to Efficent Government." Government Executive, April 1983. Hogan, Thorn. "We're Not in Kansas Anymore." The Portable Companion, June/July 1982, pp. 11-14. Kaminer, David A. "What to Do When Your System Crashes." Popular Computing, April 1983, pp. 154-156. Kear, Fred W. "Board Warp: Causes and Prevention." Circuits Manufacturing, December 1983. Kotelly, George V. "Video Display Terminals: Help or Hazard?" Mini-Micro Systems, November 1983, p. 7. Lancaster, Don. CMOS Cookbook. Indianapolis, Indiana: Howard W. Sams & Co., Inc., 1977. Laus, David A., and Miller, Darren. "Fuse-Programmable Logic Spearheads Semicustom Revolution." Electronic Products, November 17, 1983. Lemons, Wayne. "Streamlined Tests for Transistors." Electronic Servicing, August 1977, pp. 34-39. Lewis, Gordon. "Disks, Drives, and Dirt." Pro/Files, September/October 1983, pp. 59-61. Lieberman, David. "Data Input Alternatives." Electronic Products, June 6, 1983, pp. 47-55. Lieberman, David. "The Clean Connection." Nibble, Vol.2/No.8/1981, pp. 159-165. Little, M. Andre. "System Security." In Cider, December 1983, pp. 117-121. Little, Tom. "Ins and Outs." Call A.P.P.L.E., June 1982, pp. 24-35. ■ Little, Tom. "Ins and Outs." Call A.P.P.L.E., July 1982, pp. 19-26. • Littlefield, Patti. "What to Try Before Taking Your Microcomputer Into the Repair Department." Educational Computer Magazine, May-June 1983, p 73. Mann, Timothy J. "Disk Cleaner." In Cider, October 1983, pp. 166-168. Mardiguian, Michael, and White, Donald R. J. "Electrostatic Discharge, What It Is and How to Control It." Electronic Products, September 30, 1983, pp. 111-115. Margolis, Art. Troubleshooting & Repairing Personal Computers. Blue Ridge Summit, Pennsylvania: Tab Books, Inc., 1983. Master Diagnostics. Nikrom Technical Products, Inc., Leominster, Maine 1983. Mc Cain, John. "Spikes: Pesky Voltage Transients and How to Minimize Their Effects." Byte, November 1977, pp. 54-56. McDermott, Jim. "EMI Shielding and Protective Components." EDN, September 5, 1979, pp. 165-176. McClain, Larry. "Servicing Your System: Be Prepared." Personal Computing, September 1982, pp 50-55, 148-154. Miller, Beth. "Microsystem Reliability Testing." Electronic Test, November 1983, pp. 48-54. Milner, Edward J. "Fast Memory Test Checks Individual Bits." EDN, October 13, 1983, pp. 222-229. "Need for EMI/RFI Shielding Spurs Use of Conductive Plastics. Electronic Packaging & Production. February 1984. Olivieri, Peter. "Mind Your Business." Softalk, June 1983, pp. 207-212. Pearlman, Dara. "Coping With Static Electricity." Popular Computing, January 1984, pp. 150-155. Radding, Alan. "When Your Computer Breaks Down." Popular Computing, May 1983, pp 196-198. Rampil, Ira. "A Floppy Disk Tutorial." Byte, December 1977, pp. 24-45. Rechsteiner, Emil B. "Keeping Power Clean and Steady." Mini-Micro Systems, August 1983, pp. 245-252. Riccio, Ronald. "How to Avoid Damage When Repairing PC Boards." Electronic Servicing & Technology, February 1983, pp 38-42. Rich, Alan. "Understanding EMI-Type Noise." Electronics Test, May 1983, pp. 34-46. Robinson, J. B. Modern Digital Troubleshooting. Redmond, Washington: Data I/O Corporation, 1983. Santoni, Andy. "Probes and Test Cells Simplify EMI Testing." EDN, September 5, 1979, pp. 51-54.

Schilling, Robert, Jr. "Hardware Diagnostics for the Home." Popular Computing, August 1983, pp. 204-210. Schatz, Gerald, S. "Video Terminals Do Not Threaten Vision, Concludes National Research Council." The IEEE Institute, September 1983, pp. 1,5. Scovern, John L. "No Corrosion with Antistat." Circuits Manufacturing, January 1983, pp. 51-53. Shafer, Kurt. "Diverse UPS Technologies Provide Design Alternatives." Digital Design, June 1983, pp. 81-96. Shaffer, Richard A. "Electronic Interference Rises Causing Havoc in Many Fields." Wall Street journal, November 18, 1983, p. 31. Sloop, Joe. "Troubleshooting Logic Systems Logically." Electronic Servicing & Technology, July 1983, pp. 26-37. BIBLIOGRAPHY 171 Snyder, E. J. "Engineering for EMI Compliance." Mini-Micro Systems, August 1983, pp. 254,255. Updegraff, Stephen W. "Better Than Gold — Substrate Coating Surpasses Gold in Hi-Rel Connectors." Circuits Manufacturing, December 1983, pp. 54-59. Victor, Jesse. "Low Noise Topologies, Innovative Designs to be Spotlighted at Powercon 9." EDN, June 9, 1982, pp. 75-84. Whitaker, Lewis A. "Maintenance Alternatives for Personal Computers." Byte, June 1982, pp. 452-459. Wiles, James, P., and Stewart, George. "What Happens When the Lights Go Out?" Popular Computing, August 1982, pp. 97-102.

Inde A Address bus, 31-32, 167 Analog inputs, 22 Animation graphics, 20 Arithmetic logic unit (ALU), 25, 26 ASCII character set, 38, 167 code chart, 165 B BASIC language program, 22, 47, 1 67 failures, 31 K configuration, 28 RAM storage, 31 ROM storage, 31 Binary (base 2) numbers, 21-22 Bit-mapped graphic modes, 19 bit-mapped hi-res, 19 multicolor bit-mapped hi-res, 1 9 Bits, 21, 167 Boot-up routine, 45 cold boot, 45-46, 167 failures; See Start-up failures warm boot, 46, 168 Buffer, 30 Bus structure; See specific bus Button A/LP, 22 Button B, 22 Byte, 32, 167 C Capacitor failures, 53-54, 143-144 aging process, 1 43 capacitance measuring, 147-148 dielectric oxide dissolvement, 143-144 open circuit, 144 plate short, 1 44 replacing capacitors, 148 temperature changes, 144 testing capacitors, 147-148 Capacitors, 21 capacitor (cap) value identification, 52 description, 143 electrolytic capacitor, 52, 1 43 farads, 52 film capacitor, 143 tantalum, 52 Cartridge expansion slot, 18-19 cartridge expansion slot shield, 21 Cassette expansion slot connection, 22 Cassette input/output, 35-36 cassette recorder communication, 35 read and write action, 36 Cassette input/output failures, 65, 97-100 data can't load, 97-99 data can't write to tape, 99-100 Cassette interface, 18, 19 Cassette tapes, 22, 26 archive storage, 22-23 data storing, 35 Central processing unit, 21, 26-27, 167 address bits, 26 address enable control (AEC) signal, 26 clock signals, 27 instruction decoder circuitry, 27 interrupt logic, 27 IRQ/interrupt signal, 27 NMI/interrupt signal, 27 peripheral interface buffer (PIB) output, 26 read/write (R/W) signal, 27 reset (RES/) signal, 27 sequential memory locations, 26 6510 MPU, 21, 26, 167 6510 MPU failure, 53 timing control, 27 tri-state address buffer, 26 Chapter summaries, 14-15 Character display modes, 19, 22 extended background color mode, 19 multicolor character mode, 1 9 standard character mode, 1 9 Chip failures, 53, 54, 142-143, 144 bent pins, 55 broken pins, 55 chip replacement, 59, 60-61 corrosion, 120 dust, 109 Easter egg approach, 146-147 fan-in/fan-out, 146 floating, 145 heating/cooling, 146 high voltage subjection, 54, 143 logic probe, 144-145 logic pulser, 144-145 metal migration, 143 microvolt measuring, 147 open connections, 145 open pin, 145 piggybacking, 146 power-cycling environments, 54, 143 resistance test, 1 45 sense tests, 146 shorts, 145 support structure pins, 54, 143 thermal stress, 54, 142-143 VTVM (vacuum-tube-voltmeter), 145 wearout failure, 54, 143 173

174 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE Chips, 20, 21, 167 chip information chart, 156-157 chip location scheme, 26 company logo markings, 50 description, 142 groove, 50 letter-number combinations; See Chips letter-number combinations pin number system, 50 pin 1 identifying, 50 sizes, 21 Chips letter-number combinations, 51 manufacturer's device code core number 51 manufacturer's device code prefix, 51 manufacturer's device code suffix, 51 manufacturer's identification/date, 51 Clock timing, 32-33, 167 basic clock signal, 32 crystal oscillator, 32 dot color, 32-33 failures, 33 phase color, 32 phase 2 system clock, 33 Commodore Business Machines, 17 Commodore Datassette Recorders, 17, 19, 22, 35 Commodore-Easy troubleshooting approach, 50, 58-62, 135 assume one problem, 50, 59 consult symptom index, 59 document, 50, 59 don't panic, 50, 58 fault identification, 50, 59 fault isolation, 50, 59-60 fault localization, 50, 59 log repair action, 62 observe the conditions, 50, 58 repair, 50, 60-61 retry, 50, 58 test and verify, 50 use your senses, 50, 58 verify failure, 50, 58 Commodore 1701 color monitor, 19 Commodore Optimum troubleshooting approach; See Commodore-Easy troubleshooting approach Commodore Pet, 17 Commodore RS-232 communication cartridges, 19 Commodore RS-232 interface cartridge, 19 Commodore 64, 17 add-on devices, 1 7 chassis, 18 component recognition, 20-24 digital machine, 49 disassembly, 20 expanding, 19 external connections; See specific connector minimum configuration, 23-24 operational life, 153 single-board computer, 18 system description, 155-156, 162-163 weight, 18 Commodore video cover, 21 Computer units; See specific unit Configuration changes record sheet, 162 Control bus, 31-32 Control port 1,18 analog-to-digital converter, 41 game paddle connecting, 41 game paddle pushbuttons, 41 game paddle rotary potentiometers, 41 joystick circuitry, 43 joystick direction switches, 43-44 joystick signals, 43 joystick switches, 41 light pen; See Light pen push button connecting, 42-43 push button value reading, 43 voltage, 41 Control port 2, 18 analog-to-digital converter, 41-42 game paddle connecting, 41 game paddle pushbuttons, 41 game paddle rotary potentiometers, 41 joystick circuitry, 43 joystick direction switches, 43-44 joystick signals, 43 joystick switches, 41 push button connecting, 42-43 push button value reading, 43 voltage, 41 Control unit, 25, 26 Corrosion, 119-121 atmospheric corrosion, 119-120 direct oxidation, 119 galvanic corrosion, 1 20 gold-plated connectors, 121 prevention, 120-121 Corvus Mirror, 23 CPU; See Central processing unit CRT, 130-131, 167 body strain, 131 eye fatigue, 131 light radiation, 131 x-radiation, 131 See also Monitor display unit Cursor failures, 84-85 Data bus, 31-32, 167 Diodes, 21, 53 description, 144 digital multimeter (DMM) testing, 148 diode effect (DE), 148 failures, 53, 144 identifying, 53 Disk; See Floppy disk Disk drive, VIC-1541, 17, 19, 23, 36-37 alignment adjustment, 130 cleaning disk, 124, 125 daisy chaining, 37 disassembly, 127-128 disk-drive number change, 160 disk head cleaning, 123, 124-127 disk head cleaning timetable, 127 disk speed tests, 1 27 head rail lubrication, 159 microprocessor controller, 36 power supply, 36 preventive maintenance, 123-130 RAM, 36 rotation speed, 37 serial bus connection, 36, 159-160 speed adjustment, 127, 128-129 tuning lamp, 129-130 Disk drive failures, 54, 58, 65, 93-97 cold temperatures, 109 drive rotation speed change, 54 drive won't read, 95-97 drive won't write, 93-95 dust, 54, 109 electrostatic discharge (ESD), 1 1 4 oxide layer build up, 123 read head misalignment, 54 Disk operating system; See DOS DIN jack; See Monitor audio-video connector Display; See Monitor display unit Display modes; See specific mode DOS, 31, 47 £ Equipment history record sheet, 162 European (PAL) .video, 160-161 jumpering, J 61 NTSC-PAL video component differences, 161 Failures, 55-56 cable connections, 55, 58 corroded connections, 55 device blow-ups, 55 intermittent failures, 60 liquid spillage, 55 overheating, 55, 108 solder splashes, 55 See a/so specific components; specific problem Firmware, 19, 26, 167 Floppy disk failures, 121-122 cold temperatures, 109 dust, 109, 121-122 magnetism, 121 oxide layer build up, 122 pollutants, 122 thermal stress, 108 Floppy disks, 23, 26, 36 both side use, 1 23 description, 37, 121 disk life, 122, 124 handling, 63, 122-123 preventive maintenance, 121-123 sounds, 122 storage capability, 37 Game controller failures, 100-102 button won't work, 102 won't work, 100-102 Game I/O connectors, 18, 22, 41-44 See a/so Control port 1 ; Control port 2 Hard copy, 26 Hard disks, 26 Hardware troubleshooting approach, 56, 135 Hexadecimal-to-decimal conversion chart, 165 Inductors, 53 failures, 53-54, 144

INDEX 175 L5, 53 L4, 53 microhenries, 53 Input/output (I/O) chip failure, 53 Input/output (I/O) connection; See Serial port Input/output (I/O) devices; See specific device Input/output (I/O) unit, 33-34 device identification, 34 Input unit, 25, 26 Integrated circuits; See Chips Interface adapter devices, 21 K Kernal operating system, 22, 30, 46-47 boot-up routine, 45-46 cassette read and write action, 36 K configuration, 28 keyboard operation, 38 Keyboard, 18, 26, 37-39 alphanumeric keys, 37 character sets, 18, 37 color control keys, 37 cursor control keys, 37 function keys, 37 graphics control keys, 37 Kernal program, 38-39 keyboard bounce, 39 keyboard circuitry, 38 keys, 18 keystrokes, 38 printed-circuit board connection, 37-38 reinstalling, 159 removal, 158 RESTORE key; See RESTORE key RUN/STOP key scan, 39 space bar, 18 X-Y matrix, 38 Keyboard failures, 65, 91-92 key action — some keys won't work, 92 liquid spillage, 63 L Life-cycle cost, 1 07 mean time between failures (MTBF), 107 mean time to repair (MTTR), 107 Light pen, 18, 22, 26, 41 failure, 104-105 light pen connecting, 43 Main board; See Printed-circuit board Main memory; See Random access memory Mass storage, 26 Memory unit, 25, 27-31 address range, 27-28 address-space allocation, 28 address work, 27-28 CHAREN control signal, 28, 29 default configuration, 30 HIRAM control signal, 28-29 K configuration, 28 LORAM control signal, 28 memory address, 27 memory-mapped I/O, 29 output signals, 28 primary memory allocation map, 29 Microprocessor unit; See Central processing unit Modem, 19, 26 Monitor audio-video connector, 18, 19 Monitor display unit, 19, 23, 26 See also Video interface chip (VIQ Monitor display unit failures, 54-55, 65, 80-91 bit-map graphics, 89-90 brightness problems, 55 color display, 81-83 color tint, 89 CRT aging, 54-55 CRT short, 55 dust, 109 fuzzy display, 55 horizontal synchronization, 83-84 inverse, 85-86 jitter, 89 marginal performance, 55 pollutants, 55 repairing, 55 safety precautions, 63, 106 text, 55, 86-87 vertical synchronization, 83-84 video, 55, 80-81 wrong characters, 88-89 MOS chip handling, 63 Motherboard; See Printed-circuit board MPU; See Central processing unit Music generating, 21 N Noise interference, 59-60, 110-116, 168 acoustic noise, 110-111 cable television, 1 12 cables, 114 capacitance, 1 1 2 clock signal, 112 conducted RFI, 1 1 1 countermeasures; See Noise interference countermeasures crosstalk, 112 electrical noise, 59-60 electromagnetic interference (EMI), 111, 112 electromagnetic radiation (EMR), 1 1 1 electrostatic discharge (ESD), 1 1 1 glitches, 1 1 4 internal EMI, 111 magnetic fields, 112 power-line noise, 112 radiated RFI, 1 1 1 radio frequency interference (RFI), 55, 111 sources of, 111-112 transient EMI, 1 1 1 Noise interference countermeasures, 112-116 acoustic pads, 1 1 3 audible noise, 1 13 cable shielding, 114 conducted EMI, 113 electromagnetic interference (EMI), 113-114 electrostatic discharge (ESD), 114-115 FCC EMI ratings, 1 1 3 FCC RFI ratings, 116 ferrite beads, 114, 116 filters, 112, 114 radiated EMI, 113 radio frequency interference (RFI), 115-116 shields, 114, 116 transient absorbers, 114 triboelectric series chart, 1 1 5 Operational log sheet, 1 63 Operating system, 31 See a/so Kernal operating system OS; See Kernal operating system Output unit, 25, 26 Paddle inputs, 22 Peripheral interface adapter, 35 Peripherals; See specific device Pixels, 19 Power cord converter box, 22 safety precautions, 63 Power cord socket, 18 Power-ON light, 20 Power-ON/OFF switch, 18 power strip, 63 Power supply, 33 backup power supply checklist, 119 blackout, 117, 167 brownouts, 1 16-1 17, 1 67 brown-ups, 1 1 7 continuous-service UPS, 118 failures, 22, 33, 116-119 failures prevention, 117-119 filters, 118 forward-transfer UPS, 118 generators, 1 1 8 isolators, 117-118 metal oxide varistor (MOV), 117-118 on/off cycling, 63 power line conditioner checklist, 119 regulators, 118 reverse-transfer UPS, 118 safety precautions, 106 spike transients, 117, 168 uninterruptible power supply (UPS), 118 Preventive maintenance, 107-133, 163-164 annual routines, 164 cold temperatures, 109 daily routines, 163 dust, 109-110 dust covers, 1 10 heat-sensitive liquid crystal, 132-133 insurance coverage, 133 magnetism, 121 monthly routines, 163 pollutants, 109 recording temperature limit-liquid crystal (RTL-LC), 132 safety precautions, 1 1 0 six month routines, 163-164 static electricity, 109 temperature limited-liquid crystal (TL-LC), 132 thermal imaging, 132 thermal stress, 108 weekly routines, 163 See also specific component Printed-circuit board, 20 accessing, 158 hairline crack, 145

176 COMMODORE 64 TROUBLESHOOTING &. REPAIR GUIDE mounted devices, 21 reinstalling, 159 removal, 158 repairing, 152 Revision A board, 65 Revision K board, 65 surface-mounted component replacement 161-162 timing control, 27 Printer, 19, 26 dust problems, 109 Printer port CN4 failure, 103-104 Printer, VIC-1525 graphics, 19 Programmed logic array (PLA), 21 R Radio frequency (RF) modulator, 19 RF modulator circuitry cover, 21 RF modulator port, 34 RF modulator shield, 21 Random access memory (RAM), 21-22, 25-26 DOS boot, 31 K configuration, 28 RAM chips, 27, 31 RAM memory chip failure, 53, 108, 142 soft errors, 1 08 thermal wipeout, 108 RCA jack; See TV connector Read only memory (ROM), 22, 25-26, 30 chips, 27 ROM memory chip failure, 142 Repair parts, 64 Commodore Business Machines service center, 64 diagnostic disk tests, 58 electronic parts catalogs, 53, 64 electronic parts stores, 64 recommended repair equipment, 153 Repair service checklist, 62 Resistors, 21 color band values, 52 cylindrical wirewound device, 52 DIP resistor networks, 52 failures, 54, 144 functions, 52 ohms, 52 resistor network, 52 SIP resistor networks, 52 variable resistor, 22, 52 RESTORE key, 39 warm boot, 46 ROM: See Read only memory Run failures, 65, 75-80 computer locks up in middle of program, 75-77 intermittent operation, 77-78 program loads but won't run, 79-80 Rust; See Corrosion S Safety precautions, 63, 65-66 corrosion prevention, 120 dust control, 1 10 logic clip use, 137 MOS chip handling, 63 power off, 55-56, 59 static electricity, 63 summary, 164 Serial bus, 18, 19 Signal tracing, 62 Software troubleshooting approach, 56-58, 135 Butterfield test, 57 diagnostic disk tests, 56 dual-address test, 57 memory diagnostics tests, 56-57 rotating-bit test, 57 self-diagnostic capability, 58 sequential numbers test, 57 store and read test, 57 sum test, 58 walking-bit test, 57 Soldering, 149-152 circuit test, 152 removing solder, 1 49-1 50 solder suckers, 149 surface-mounted component replacement, 161-162 technique, 150-152 tinning, 151 tip cleaning, 151 tools, 152 wave soldering, 150 working temperature, 151 Sound interface device (SID), 21, 33, 39-41 analog-to-digital converter, 40 audio oscillators, 39 audio signals, 40-41 circuitry design, 40 filters, 40 frequency level, 40 registers, 39 sound control, 40 volume control, 39-40 waveforms, 40 Speaker failures, 65, 105-106 Special character modes; See Sprite modes Sprite modes, 19-20 failures, 90-91 multicolor Sprite mode, 20 standard Sprite mode, 20 Start-up failures, 65, 66-74 no power light, nothing works, no display, 66-67 power light on, display works, cartridge won't load, 74 power light on, display works, keyboard won't work, 72-73 power light on, nothing works, garbage on screen, 69-72 power light on, nothing works, no display, 68-69 program disk copy, 58 System bus, 32 Static; See Noise interference T Tools, 135-142 current tracer, 139 DIP insertion tool, 61 DMM (digital multimeter), 136, 153 DVM (digital voltmeter), 62, 136, 153 dykes, 153 . electronic ^advances, 136-137 IC extractor, 60 IC testers, 139-140 logic analyzer, 62, 141 logic clip, 62, 137 logic probe, 62, 137-138, 153 logic pulser, 138-139 oscilloscope, 62, 140-141, 153 pliers, 153 PROM (programmable read only memory), 141-142 recommended equipment, 153 resistance test, 62 screwdrivers, 153 signature analyzer, 62, 141-142 soldering iron, 153 tweaker, 60, 1 53 voltage test, 62 VOM (volt-ohm-millimeter), 136 VTVM (vacuum-tube-voltmeter), 136 Transistors, 21 failures, 53, 144 identifying, 53 testing^ 148-149 TV connector, 1 8, 1 9 U User I/O connection, 18, 19 V VIC-MODEM, 19 VIC-20, 17 Video display; See Monitor display unit Video interface chip (VIC), 21, 33 display memory, 35 6567, 34-35 6566, 34 video matrix, 35 W Work environment, 131

sms Commodore 64 Troubleshooting & Repair Guide The Commodore 64 Troubleshooting & Repair Guide will heip you keep your microcomputer in fop operating condition. This book will guide you step by easy step through the complexities of ■ making simple repairs to your Commodore 64, • Learn to fix it yourself • Basic and advanced chapters • Make most repairs with few or no tools • .v'orih many times its cost in repair savings alone • Quickly zero in on a malfunctioning component • Easy to understand circuit diagrams • Contains schematics, block diagrams, and photos «... and much more These and many other features are explained in an easy to read, easy to understand style that makes learning an interesting and rewarding investment of precious time. The Commodore 64 Troubleshooting & Repair Guide will teach even a computer novice how to feel comfortable with the complex world of electronic troubleshooting. The fully illustrated Commodore 64 Troubleshooting & Repair Guide is highly recommended reading for anyone who uses a Commodore 64. Howard W. Sams & Co., Inc. A Publishing Subsidiary of ITT 4300 West 62ncl Street, Indianapolis, Indiana 46268 U.S.A. S18.95/22363 ISBN: 0-672-22363-5