Migration to the new server completed.

Please add any new defect you notice here!


Die Migration auf den neuen Server ist abgeschlossen.

Bitte neue Defekte hier vermerken!

6502 Applications Book

From C64-Wiki
Jump to: navigation, search
6502 Applications Book
Titel Cover
Language English
Author(s) Rodnay Zaks
Publisher SYBEX
Year 1979, 1981
ISBN ISBN 0-89588-0-156
Original price ? U$/DM/€
Media {{{Media}}}
Pages 286
Last Edition Second Printing 1981
Genre Programming, Hardware
Information The 6502 book series:
- Vol.1: Programming the 6502
- Vol.2: 6502 Applications Book
- Vol.3: Advanced 6502 Programming
- Vol.4: 6502 Games





Contents



[edit] Description

This book continues the MOS Technology 6502 book series, giving an insight into hardware related assembly language/machine language programming for common 6502-based environments (at times of release). Starting with an introduction to 6502-based boards and computers their commonly used I/O-chips are presented. With standard techniques to access and program hardware the author covers many real-life applications for home and industrial needs. Additional exercises let the reader step deeper into the solution and find a deeper understanding for it. The applications are enriched by many electronic schematics, diagrams and program listings, even some photos are included.

[edit] Preface

  • Page 6:

This book presents pratical application technique for the 6502 microprocessor. It assumes an elementary knowledge of microprocessor programming on the level of the preceding book in this series (Reference C202: Programming the 6502). Understanding how to program the microprocessor chip itself (the 6502) is only a prerequisite for the actual programming of a microprocessor board connected to real devices. The next problem is to learn how to write actual application programs involving the input/output ports and other facilities available in a real system. This book adrdresses itself to this problem. It will present the techniques and programs required for typical applications, using the actual input-output chips available on a board.

The programs presented in this book will require a minimum of actual hardware to be effectively implemented. The user is therefore encouraged to practice the concepts and techniques presented here on actual hardware. A realistic description of possible applications boards will be presented. The programs are applicable to any 6502-based microcomputer board such as the KIM, the SYM, the AIM, or others. Many programs can be run directly on one or more of these boards while others will require some changes. However, the concepts and techniques are common to all.

The application programs presented in this book will allow the reader to build a complete home alarm system, which includes fire detection and other features, an electronic piano, a motor speed regulator, an applicance or hobbby-train controller, a time-of-day clock, a simulated traffic control system, a morse code generator, an industrial control loop for temperature control, including analog-to-digital conversion, and more.

This book is intended to teach all the basic skills required to apply the 6502 to real life applications. It is preceded in our 6502 series by "C202 - Programming the 6502," and followed by "G402 - 6502 Games."

[edit] Table of Contents

I. INTRODUCTION...............................................11

II. THE INPUT OUTPUT CHIPS....................................15
 Introduction. Basic Defintions. The 6520 PIA. The 6522.
Programming the 6522. The 6530 ROM-RAM I/O Timer (RRIOT).
The 6532. Summary.
III. 6502 SYSTEMS.............................................64 Introduction. Standard 6502 System. The KIM-1. The SYM-1.
The AIM 65. Other boards.
IV: BASIC TECHNIQUES..........................................78 Introduction SECTION 1: THE TECHNIQUES Relays. Switches. Speaker. A Morse Generator. Time of Day Clock.
A Home Control Program. A Telephone Dialer.
SECTION 2: COMBINATIONS OF TECHNIQUES Introduction. Generating a Siren Sound. Sensing an Input Pulse. Pulse
Measurement. A Simple Music Program. KIM Traffic Control. Learn the
Multiplication Table. Summary.
V. INDUSTRIAL AND HOME APPLICATIONS...........................145 Introduction. A Traffic Control System. Dot Matrix LED. Displaying
Switch Values. Tone Generation. Music. A Burglar Alarm. DC Motor
Control. Analog to Digital Conversion (A Heat Sensor). Summary
VI. THE PERIPHERALS...........................................216 Introduction. Keyboard. Paper Tape Reader or ASCII Keyboard. Micro-
printer. Summary.
VII. CONCLUSIONS..............................................241 APPENDIX A - A 6502 ASSEMBLER IN BASIC........................243 Introduction. General Description. Using the Assembler. Syntax.
HP2000F BASIC.
APPENDIX B - MULTIPLICATION GAME: THE PROGRAM.................259 APPENDIX C - PROGRAM LISTINGS (Chapter 4 Part 1)..............262 - Program 4-1: Morse - Program 4-2: Time of Day - Program 4-3: Home Control - Program 4-4: Phone Dialer APPENDIX D - HEXADECIMAL CONVERSION TABLE.....................273 APPENDIX E - ASCII CONVERSION TABLE...........................274 APPENDIX F - 6502 INSTRUCTIONS ...............................275


[edit] Reading

  • Page 129/130:

GENERATING A SIREN SOUND

The speaker is attached to the IORA register (memory address 1700), in bit position zero. It can be attached directly. For a better sound, the circuit of Fig 4-50 is recommended. The data direction register DDRA for this PIO must first be configured so that bit zero is an output:

LDA	#$01
STA	PAD	DDRA

The speaker can the be turned on. Turning the speaker on and off can be easily accomplished by a programming trick. This consists of using the INC instruction. This instruction will increment the contents of the designated register and will generate successive numbers which will be alternately odd and even. This guarantees that the right-most bit (bit 0, which the speaker is connected) will switch form the values zero to the value one. This allows turning the speaker on and off with only a single instruction, versus two if a different pattern had to be loaded in the accumulator and then transferred to the ORA.

[edit] Critics

User: "No opinion to this book !"

Personal tools
Help and Feedback
In other languages