100% found this document useful (6 votes)
22 views

PIC Microcontrollers An Introduction to Microelectronics 2nd Ed Second Edition Martin Bates download

Ebook installation

Uploaded by

yeopdelsol
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (6 votes)
22 views

PIC Microcontrollers An Introduction to Microelectronics 2nd Ed Second Edition Martin Bates download

Ebook installation

Uploaded by

yeopdelsol
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

PIC Microcontrollers An Introduction to

Microelectronics 2nd Ed Second Edition Martin


Bates pdf download

https://ebookname.com/product/pic-microcontrollers-an-
introduction-to-microelectronics-2nd-ed-second-edition-martin-
bates/

Get Instant Ebook Downloads – Browse at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Interfacing PIC Microcontrollers Embedded Design by


Interactive Simulation 1st Edition Martin P. Bates

https://ebookname.com/product/interfacing-pic-microcontrollers-
embedded-design-by-interactive-simulation-1st-edition-martin-p-
bates/

Programming 8 bit PIC Microcontrollers in C with


Interactive Hardware Simulation 1st Edition Martin P.
Bates

https://ebookname.com/product/programming-8-bit-pic-
microcontrollers-in-c-with-interactive-hardware-simulation-1st-
edition-martin-p-bates/

Introduction to particle technology 2nd ed Edition


Martin Rhodes

https://ebookname.com/product/introduction-to-particle-
technology-2nd-ed-edition-martin-rhodes/

Indigenous Methodologies Characteristics Conversations


and Contexts 2nd Edition Margaret Kovach

https://ebookname.com/product/indigenous-methodologies-
characteristics-conversations-and-contexts-2nd-edition-margaret-
kovach/
God Bless America The Surprising History of an Iconic
Song 1st Edition Sheryl Kaskowitz

https://ebookname.com/product/god-bless-america-the-surprising-
history-of-an-iconic-song-1st-edition-sheryl-kaskowitz/

Routledge Handbook of International Criminal Law 1st


Edition William A. Schabas

https://ebookname.com/product/routledge-handbook-of-
international-criminal-law-1st-edition-william-a-schabas/

Complexity Scales and Licensing in Phonology 1st


Edition Eugeniusz Cyran

https://ebookname.com/product/complexity-scales-and-licensing-in-
phonology-1st-edition-eugeniusz-cyran/

Protection from Exposure to Second hand Tobacco Smoke


Policy Recommendations 1st Edition World Health
Organization

https://ebookname.com/product/protection-from-exposure-to-second-
hand-tobacco-smoke-policy-recommendations-1st-edition-world-
health-organization/

The art of mathematics Bollobas B.

https://ebookname.com/product/the-art-of-mathematics-bollobas-b/
Pursuits of Wisdom Six Ways of Life in Ancient
Philosophy from Socrates to Plotinus John M. Cooper

https://ebookname.com/product/pursuits-of-wisdom-six-ways-of-
life-in-ancient-philosophy-from-socrates-to-plotinus-john-m-
cooper/
PIC Microcontrollers
This฀Page฀is฀Intentionally฀Left฀Blank
PIC Microcontrollers
An Introduction to
Microelectronics
Second Edition

Martin Bates

AMSTERDAM • BOSTON • HEIDELBERG • LONDON


NEW YORK • OXFORD • PARIS • SAN DIEGO
SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO
Newnes is an imprint of Elsevier
Newnes
An imprint of Elsevier
Linacre House, Jordan Hill, Oxford OX2 8DP
200 Wheeler Road, Burlington, MA 01803

First published 2000 by Arnold


Second edition 2004

Copyright © 2004, Martin Bates. All right reserved

Appendix A has been reprinted with permission of the copyright owner, Microchip Technology
Incorporated © 2001. All rights reserved. No further reprints or reproductions may be made without
Microchip Technology Inc.’s prior written consent.

Information contained in this publication regarding device applications and the like is intended as
suggestion only and may be superseded by updates. No representation or warranty is given, and
no liability is assumed by Microchip Technology Inc. with respect to the accuracy or use of such
information, or infringement of patents arising from such use or otherwise. Use of Microchip
Technology Inc. products as critical components in life support systems is not authorized except
with express written approval by Microchip Technology Inc. No licenses are conveyed implicitly
or otherwise under any intellectual property rights.

The right of Martin Bates to be identified as the author of this work has been asserted in accordance
with the Copyright, Designs and Patents Act 1988

No part of this publication may be reproduced in any material form (including photocopying or storing
in any medium by electronic means and whether or not transiently or incidentally to some other use
of this publication) without the written permission of the copyright holder except in accordance with
the provisions of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued
by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London, England WIT 4LP.
Applications for the copyright holder’s written permission to reproduce any part of this publication
should be addressed to the publisher

Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in
Oxford, UK: phone: (+44) 1865 84830, fax: (+44) 1865 853333, e-mail: permissions@elsevier.co.uk.
You may also complete your request on-line via the Elsevier homepage (http://www.elsevier.com),
by selecting ‘Customer Support’ and then ‘Obtaining Permissions’

British Library Cataloguing in Publication Data


A catalogue record for this book is available from the British Library

Library of Congress Cataloguing in Publication Data


A catalogue record for this book is available from the Library of Congress

ISBN 0 7506 6267 0

For information on all Newnes publications


visit our website at http:// books.elsevier.com

Typeset in 10/12 pt Times by Integra Software Services Pvt. Ltd, Pondicherry, India
www.integra-india.com

Printed and bound in Meppel, The Netherlands by Krips bv.


Contents

Preface to the First Edition x

Preface to the Second Edition xii

Introduction xiii

PART A MICROELECTRONIC SYSTEMS 1

Chapter 1 Computer Systems 3


1.1 The PC System 3
1.2 Wordprocessor Operation 9
1.3 PC Microprocessor System 11
1.4 PC Engineering Applications 14
1.5 The Microcontroller 15
Summary 18
Questions 18
Activities 19

Chapter 2 Information Coding 20


2.1 Number Systems 20
2.2 Machine Code Programs 25
2.3 ASCII Code 28
Summary 29
Questions 29
Answers 30
Activities 30
vi Contents

Chapter 3 Microelectronic Devices 32


3.1 Digital Devices 32
3.2 Combinational Logic 36
3.3 Sequential Logic 39
3.4 Data Devices 41
3.5 Simple Data System 43
3.6 4-Bit Data System 44
Summary 47
Questions 47
Activities 48

Chapter 4 Digital Systems 49


4.1 Encoder and Decoder 49
4.2 Multiplexer, Demultiplexer and Buffer 51
4.3 Registers and Memory 51
4.4 Memory Address Decoding 51
4.5 System Address Decoding 54
4.6 Counters and Timers 55
4.7 Serial and Shift Registers 56
4.8 Arithmetic and Logic Unit 57
4.9 Processor Control 58
Summary 59
Questions 59
Answers 60
Activities 60

Chapter 5 Microcontroller Operation 61


5.1 Microcontroller Architecture 61
5.2 Program Operations 65
Summary 73
Questions 73
Answers 74
Activities 75

PART B THE PIC MICROCONTROLLER 77

Chapter 6 A Simple PIC Application 79


6.1 Hardware Design 79
6.2 Program Execution 83
6.3 Program BIN1 85
6.4 Assembly Language 87
Contents vii

Summary 90
Questions 90
Answers 91
Activities 91

Chapter 7 PIC Program Development 92


7.1 Program Design 94
7.2 Program Editing 96
7.3 Program Structure 101
7.4 Program Analysis 101
7.5 Program Assembly 105
7.6 Program Simulation 109
7.7 Program Downloading 112
7.8 Program Testing 114
Summary 115
Questions 115
Answers 116
Activities 116

Chapter 8 PIC 16F84 Architecture 117


8.1 Block Diagram 117
8.2 Program Execution 119
8.3 Register Set 120
Summary 126
Questions 127
Activities 127

Chapter 9 Further Programming Techniques 129


9.1 Program Timing 129
9.2 Hardware Counter/Timer 131
9.3 Interrupts 135
9.4 More Register Operations 140
9.5 Special Features 144
9.6 Program Data Table 148
9.7 Assembler Directives 150
9.8 Special Instructions 153
9.9 Numerical Types 154
Summary 155
Questions 155
Answers 156
Activities 156
viii Contents

PART C APPLICATIONS 157

Chapter 10 Application Design 159


10.1 Design Requirements 160
10.2 Block Diagram 162
10.3 Hardware Design 162
10.4 Software Design 164
10.5 Program Implementation 171
10.6 Source Code Documentation 174
Summary 175
Questions 175
Activities 176

Chapter 11 Program Debugging 177


11.1 Syntax Errors 177
11.2 Logical Errors 179
11.3 MPLAB Tools 183
11.4 Test Schedule 184
11.5 Hardware Testing 186
Summary 189
Questions 189
Activities 189

Chapter 12 Prototype Hardware 191


12.1 Hardware Design 191
12.2 Hardware Construction 192
12.3 Demo Board 196
12.4 Demo Board Applications 200
Summary 210
Questions 210
Activities 211

Chapter 13 Motor Applications 213


13.1 Motor Control Methods 213
13.2 Motor Applications Board 214
13.3 Control Methods 218
13.4 Position Control 219
13.5 Closed Loop Speed Control 221
13.6 Commercial Application 231
Summary 232
Questions 232
Activities 233
Contents ix

PART D MORE CONTROLLERS 235

Chapter 14 More PIC Microcontrollers 237


14.1 Common Features of PIC Microcontrollers 237
14.2 Selecting a PIC 242
14.3 Advanced PIC Features 244
14.4 Serial Communications 251
Summary 254
Questions 255
Activities 255
Answers 255

Chapter 15 More PIC Applications and Devices 256


15.1 16F877 Application 256
15.2 16F818 Application 273
15.3 12F675 Application 274
15.4 18F452 Application 275
Summary 278
Questions 278
Answers 279
Activities 279

Chapter 16 More Control Systems 280


16.1 Other Microcontrollers 280
16.2 Microprocessor System 282
16.3 Control Technologies 288
16.4 Control System Design 298
Summary 299
Questions 301
Activities 301

Appendix A PIC 16F84 Data Sheet 302

Appendix B DIZI-2 Board and Lock Application 347

Index 367
Preface to the First Edition

The Microchip™ PIC 16F84 microcontroller is an unremarkable looking 18-pin chip – so


why write a whole book on it? The answer is that it contains within its ordinary looking
plastic case most of the technology that students of microelectronics need to know about in
order to understand microprocessor and computer systems. It also represents a significant new
development in microelectronics and, importantly, it offers an easier introduction to the world
of digital processing and control than conventional microprocessors. The microcontroller is a
self-contained, programmable device, and the student, hobbyist or engineer can put it to use
without knowing in too much detail how it works. On the other hand, we can learn a great deal
about microelectronics by looking inside.
Studying the PIC chip will give the user a valuable insight into the technology behind
the explosion in microprocessor-controlled applications which has occurred in recent years,
which has been based on cheap, mass-produced digital circuits. Mobile phones, video cameras,
digital television, satellite broadcasting and microwave cookers – there are not many current
electronic products which do not contain some kind of microprocessor. Industrial control
systems have seen similar developments, where complex computer control systems have steadily
increased productivity, quality and reliability. The key, of course, is the increase in power of
microprocessors and related technology, while the cost of these clever little chips continues to
fall.
The microcontroller is essentially a computer on one chip, which can carry out a complex
programmed sequence of actions, with the minimum of additional components. As an example,
in this book a motor control circuit will be described which allows the motion of a small
dc motor to be programmed and controlled by the PIC chip. The only additional major
components required are power transistors to provide the current drive to the motor. In the
past, equivalent control and interface circuits for such an application would have required many
more components, and been much more complicated and expensive to design and produce.
The small microcontroller also makes it easier for a device such as a motor to be individually
controlled as part of a larger system.
When I first came across the PIC chip a few years ago, it was immediately obvious that
this would be an ideal device for teaching and learning microprocessor software techniques,
especially for students with minimal prior knowledge and skills. It is relatively cheap, and, even
better, it has non-volatile program memory that is electrically reprogrammable (Flash ROM). In
addition, the manufacturers, Arizona Microchip, had the foresight to make development system
software required to develop programs for the chip widely available. Packages are available for
DOS and Windows, and the support hardware and software are being added to all the time, by
the manufacturers, independent suppliers and enthusiasts. On the other hand, a complete set of
more powerful development tools is also available for the professional user.
Both DOS and Windows versions of the PIC development system have been used to prepare
the sample applications in this book, and the programs downloaded using the PICSTART-16B
Preface to the First Edition xi

programming unit. However, there are many designs for inexpensive programmers available
in magazines and on the Internet, usually with their own software. The current Windows
version of the program development package, MPLAB, can be downloaded free of charge from
the Internet at ‘http://www.microchip.com’, along with data sheets and all the latest product
development information. The data sheet for the PIC 16F84 is reprinted in full, because it is an
excellent document which contains the definitive information on the chip, presented in a clear
and concise manner.
The objective of this book is to ensure that any beginner, student or engineer, will quickly
be able to start using this chip for their own projects and designs. When I started using it in my
teaching, I put together a teaching pack and was expecting a range of suitable reference books
to quickly appear. Indeed, the chip soon started to feature in numerous electronics magazine
projects and was clearly popular, but all the books that I obtained seemed to assume quite a lot
of prior knowledge of microprocessors. I wanted to use the PIC with students who were new
to the subject, and eventually I realised that if I wanted a suitable book, I would have to do it
myself! I hope that the reader finds the result useful.

Martin P. Bates
Lecturer in Microelectronics
Hastings College of Arts & Technology
July 1999
Preface to the Second Edition

The revisions required in the second edition of this book are mainly due to the rapid development
of microcontroller technology. As the PIC family of devices has grown, more features have been
incorporated at lower cost. So, while the focus of the first edition was the popular 16F84 chip,
and this remains a valuable reference point for the beginner, the scope has been expanded so
that a broader understanding of the range microcontroller types and applications can be gained.
One of the reasons the 16F84 was originally selected was its flash memory, which allows
easy reprogramming, making it a good choice for education and training. Flash memory is now
available in a wider range of devices, making the choice of chip less obvious. On the one hand
we now have more small 8-pin chips which can be used in simple systems requiring fewer
inputs and outputs, as well as a proliferation of more powerful devices incorporating a variety
of serial data interfaces, as well as analogue inputs and many other advanced features.
For this reason the focus has been shifted away from the 16F84. A wider selection of
devices and I/O methods is now discussed, and a more general treatment attempted. Application
development software has also moved on, and new methods of programming and debugging
introduced. I hope I have been able to reflect these developments adequately without introducing
too many complications for the beginner, to whom this text is still firmly addressed.
Part A is a general introduction to microelectronics system technology, and can be skipped if
appropriate. In Part B, the PIC microcontroller is described in detail from first principles. Part
C contains practical advice on implementing PIC projects, with examples. Part D contains new
material on the more advanced features of other PIC MCUs (Microcontroller Units) as well as
a review of a range of other control system technologies.
I have tried to incorporate a systematic approach to project development, making the design
process as explicit as possible. The book will thus support the delivery of the microelec-
tronic systems and project modules of, for example, UK BTEC electronics programmes which
incorporate an Integrated Vocational Assignment, which requires the student to develop a
specific project and document the process in detail. The PIC is a good choice for producing
interesting, but achievable, projects which incorporate a good balance between hardware and
software design, and allow the design process to be clearly documented through every stage.
Acknowledgement is due to Microchip Technology Inc. for their kind permission to reproduce
the PIC 16F84A data sheet, to Microsoft Corporation and Labcenter Electronics for the
application software used to produce documents, drawings, circuit schematics and layouts for
this book, and to all for use of their trademarks.
Finally, thanks to the following for their help, advice and tolerance: Melvyn Ball (Hastings
College), Jason Guest (General Dynamics, Hastings), Chris Garrett (University of Brighton)
and, of course, Julie at home; also, to all colleagues who commented on the first edition, and
students who bought it!

Martin Bates
December 2003
mbates@hastings.ac.uk
Introduction

Let’s admit one thing straight away – microprocessor systems are quite complicated! However,
they are now found in so many different products that all students of engineering need to know
something about how they work.
In this book we are going to look specifically at the PIC family of microcontrollers. Microcon-
trollers have all the essential features of a full-size computer, but all on a single chip. By
contrast, conventional microprocessor systems, such as the PC (personal computer), are built
with a separate processor, memory, input and output chips. The extra hardware and software
required to make these chips work together makes the system more difficult to understand than
our single chip microcontroller unit (MCU).
As well as being easier to understand, microcontrollers are important because they make
electronic circuits cheaper and easier to build. ‘Hard-wired’ circuits can be replaced with a
microcontroller and its software, reducing the number of components required. Importantly, the
software element (control program) can be reproduced at minimal cost, once it has been created.
So the development costs may be higher, but the production costs will be lower in the long
run. It is also easier to change software if the product is to be modified. In general, software
is increasingly replacing hardware in electronic designs. For example, to design a system like
a video recorder without microprocessors or microcontrollers would be very complicated and
expensive, if not impossible.
Using the PIC, we will find that we can quite quickly work out some simple, but useful,
applications. These will illustrate the universal principles of microprocessor systems that apply
to more complex computer and control systems. At first, however, we do not have to worry too
much about exactly how the chip works – we will go back to that later. The big problem with
microprocessors and microcontrollers is that in order to fully understand how the system works,
we have to understand both the hardware and the software at the same time. Therefore we have
to circle round the subject, looking at the system from different angles, until a reasonable level
of understanding is built up.
We will approach microcontroller and microprocessor systems (microsystems) step by step,
assuming very little prior knowledge. The operation of the PC will be outlined first, because
most students will be familiar with how it works from the user’s point of view. We will look
at how the hardware and software interact, and the function of the Pentium microprocessor in
controlling the input (keyboard, mouse), output (screen) and memory and disks.
Some basic microelectronic system principles will then be covered. One objective is to
understand the hardware diagrams in the PIC data sheets, so that external circuits connected
to the PIC input/output pins can be designed correctly. Also, it is necessary to understand
the internal hardware configuration of a microcontroller to fully understand the programming
of the chip. The clarity and completeness of these data sheets is an important reason for
choosing the PIC as our typical microcontroller. We can then start to look specifically at the
PIC microcontroller and develop simple applications which will illustrate the essential hardware
xiv Introduction

features and basic programming ideas. More details will then be added using further application
examples.
In the final section, the complete application design process will be described, including use of
the PIC development system and hardware design methods. The range of PIC microcontrollers
and the more advanced features of some of them will then be described, plus some other
types of control technologies which can carry out similar functions to microcontrollers, such
as programmable logic controllers.
All reference material can be downloaded from www.microchip.com and other manufac-
turers’ websites.
Part A
Microelectronic Systems

1 Computer Systems
2 Information Coding
3 Microelectronic Devices
4 Digital Systems
5 Microcontroller Operation
This฀Page฀is฀Intentionally฀Left฀Blank
Chapter 1
Computer Systems

1.1 The PC System


1.2 Wordprocessor Operation
1.3 PC Microprocessor System
1.4 PC Engineering Applications
1.5 The Microcontroller

We will begin our study of microsystems with something familiar, by looking at how the PC
(personal computer) works when running a wordprocessor. Most readers will be familiar with
using a wordprocessor and will know more or less how it functions from the user’s point of
view. Some basic microsystem concepts will be introduced by analysing how the software
operates with the computer hardware, to allow the user to enter, store and process documents.
For example, we will see why different kinds of memory are needed to support the system
operation.
It is also useful to get some idea of how a PC works because it is used as the hardware
platform for the PIC program development system. The programs for the PIC are written
using a text editor, and the machine code program created and downloaded to the PIC chip
using the PC. The PIC development system hardware can be seen connected to the PC in
Fig. 1.1(a). A simplified diagram, Fig. 1.1(b), allows us to see the main parts of the system more
clearly.
We will then have a quick look at a microcontroller system, set up to operate as a simple
equivalent of the microprocessor-based PC system, so we can see how it compares. The
microcontroller has a keypad with only 12 keys instead of a keyboard, and a seven-segment
display instead of a screen. Its memory is much smaller than the PC, yet it can carry out the
same basic tasks. In fact, it is far more versatile; the Pentium™processor used in the PC is
designed specifically for that system. The microcontroller can be used in a great variety of
circuits. Also, it is much cheaper!

1.1 The PC System


The PC hardware is based on the Intel™ series of microprocessors with Microsoft Windows™
operating system software. The standard PC hardware comprises a main unit, separate keyboard
and mouse, VDU (visual display unit) and possibly a printer and connection to a network.
The circuit board (motherboard) in the main unit carries a group of chips which work together
4 Computer Systems

(a)

(b)

Main
unit
Screen

CD ROM
Hard disk bay
Floppy disk

Power Network
Reset

Printer
Keyboard
Mouse

Figure 1.1 (a) The PC system (with PIC development system); (b) Diagram of PC system.

to provide digital processing of information and control of input and output devices. A power
supply for the motherboard and the peripheral devices is included in the main unit.
The processor must have access to software (programs) to allow useful work to be done by
the hardware. These are usually stored on a hard disk inside the main unit; this can hold large
amounts of data which is retained when the power is off. There are two main types of software
required – the operating system (Windows™) and the application (Word™). As well as the
operating system and application software, the hard disk stores the data created by the user
(document files). Documents can also be stored on floppy disk for backup or portability.
The PC System 5

The keyboard is used for data input, and the VDU displays the resulting document. The
mouse provides an additional input device, allowing operations to be selected from menus or
by clicking on icons and buttons. This is called the graphical user interface (GUI). There may
be a network card fitted in the PC to exchange information with other users, download data or
applications, or share resources such as printers over a local area network (LAN). In addition, a
modem can give direct access to a wide area network (WAN), usually the Internet. A CD ROM
drive allows large volumes of reference information stored on optical disk to be accessed, and
is also used to load application software.
If we remove the cover from the main unit, the main components can be identified fairly
easily. In the photograph, Figure 1.2(a), the power supply is top left, with the hard disk drive
below and the motherboard vertical at the back of the tower case. The disk and video interface
cards are visible at the bottom, slotted via edge connectors into the motherboard, with a modem
in the middle in the dark casing. The connections to the video board and modem are available
at the rear (left) of the case, with the floppy disk at the front (top right). In current PC designs,
some of these interfaces are built into the motherboard, so the whole package is more compact.
Block diagrams are useful for showing the main parts of a complex system, and how they
connect together, in a simplified form. Figure 1.2(b) shows the components of the PC system
and the direction of the information flow between them. In the case of the disk drives and
network it is bidirectional (flowing in both directions), representing the process of saving data
to, and retrieving data from, the hard disk or floppy disk.

1.1.1 PC Hardware
Inside the PC main unit, the motherboard has slots for expansion boards and memory modules to
be added to the system. The power supply and disk drives are fitted separately into the main unit
frame. The keyboard and mouse interfaces are usually on the motherboard. In older designs, the
expansion boards carried interface circuits for the disk drives and external peripherals such as
the display and printer, but these functions now increasingly incorporated into the motherboard
itself. Note that the functional block diagram does not show any difference between internally
and externally fitted peripherals, because it is not relevant to the overall system operation.
The PC is a modular system, which allows the hardware to be put together to meet the
individual user’s requirements, and allows subsystems, such disk drives and keyboard to be
easily replaced if faulty. The modular design also allows upgrading (for instance, fitting extra
memory chips) and also makes the PC architecture well suited to industrial applications. In
this case, the PC can be ‘ruggedised’ (put into a more robust casing) for use on the factory
floor. This modular architecture is one of the reasons for the success of the PC as a universal
hardware platform.

1.1.2 PC Motherboard
The main features of a typical motherboard are shown in Fig. 1.3. The heart of the system is the
microprocessor, a single chip, which is also called the central processing unit (CPU). This name
refers back to the days when the CPU was built from discrete components and could be the
size of a washing machine! In Fig. 1.3(a), the CPU is under the cooling fan at the lower right.
The CPU controls all the other system components, but must have access to a suitable program
in memory before it can do anything useful. The blocks of program required are provided by
the operating system software and the application software which are downloaded to memory
from the hard disk on startup.
6 Computer Systems

(b)

Disk
drives
VDU

Main
unit Printer
Keyboard

Network
Mouse

Figure 1.2 The PC system main unit. (a) View of PC main unit; (b) Block diagram of PC system.

The Intel CPU has undergone continuous development since the introduction of the PC in
1981, with the Pentium processor being the current standard. Intel processors are classified as
CISC (complex instruction set computer) devices, which means they have a relatively large
number of instructions which can be used in a number of different ways. This makes them
powerful, but relatively slow compared with more streamlined processors which have fewer
instructions. These are classified as RISC chips (reduced instruction set computer), of which
the PIC microcontroller is an example.
As stated above, CPU cannot work on its own; it needs some memory and input/output
devices for getting data in, storing it and sending it out again. The main memory block is
The PC System 7

(a)

(b)

BIOS ROM

Keyboard
controller
RAM
SIMM
slots
IC 3 IC 4

IC 2
Integrated
support chip

IC 1 CPU

Clock
generator
Adapter
card slots

Figure 1.3 PC motherboard. (a) PC motherboard in the main unit; (b) Layout of PC motherboard.
8 Computer Systems

made up of RAM (read and write memory) chips, which are mounted in SIMMs (single in-line
memory modules). Higher capacity DIMMs (dual in-line memory modules) are used currently.
These can be seen at the top of the photograph in Fig. 1.3(a). Additional peripheral interfacing
boards are fitted in the expansion card slots to connect the main board to the disk drives, VDU,
printer and network. Spare slots allow additional peripheral interfaces and more memory to be
added if required. Each peripheral interface is a sub-circuit which is built around a specific
input/output chip (or set of chips) which handles the data transfer.
The integrated support device (ISD) is a chip which provides various system control and
memory management functions in one chip, and is designed for that particular motherboard.
The motherboard itself can be represented as a block diagram (Fig. 1.4) to show how the
components are interconnected.

Keyboard Disk
interface interface
Microprocessor

VDU Printer
interface Bus interface

Mouse Network
interface RAM ROM interface
memory memory

Figure 1.4 Block diagram of PC motherboard.

The block diagram shows that the CPU is connected to the peripheral interfaces by a set of
bus lines. These are groups of connections on the motherboard which work together to transfer
the data from the inputs, such as keyboard, to the processor, and from the processor to memory.
When the data has been processed and stored, it can be sent to an output peripheral, such as
the screen. We will look at how this is achieved in more detail later.
Busses connect all the main chips in the system together, but, because they operate as shared
connections, can only pass data to or from one peripheral interface or memory location at a
time. This arrangement is used because separate connections to all the main chips would need
an impossible number of tracks on the motherboard. The disadvantage of bus connection is
that it slows down the program execution speed, because all data transfers use the same set of
lines, and only one data word can be present on the bus at any one time. To help compensate
for this, the bus connections are typically 16, 32 or more bits wide, that is, there are 16 or
32 connections working together, each carrying one bit of a data word simultaneously. This
parallel data connection is faster than a serial connection, such as the keyboard input or network
connection, which can only carry one bit at a time. In the microcontroller, these system bus
connections are hidden inside the chip, making circuit design easier.

1.1.3 PC Memory
There are two types of memory in the PC system. The main memory block is RAM, where input
data is stored before and after processing in the CPU. The operating system and application
program are also copied to RAM from disk for execution, because access to data in RAM is
Wordprocessor Operation 9

faster. Unfortunately, RAM storage is ‘volatile’, which means that the data and application
software disappear when the PC is switched off, and these have to be reloaded each time the
computer is switched back on.
This means that some ROM (read only memory), which is non-volatile, is needed to get the
system started at switch on. The BIOS (basic input/output system) ROM chip, seen at the left
of Fig. 1.3(a), contains enough code to check the system hardware and load the main operating
system (OS) software from disk. It also contains some basic hardware control routines so that
the keyboard and screen can be used before the main system has been loaded.
The hard disk is a non-volatile, read/write storage device, consisting of a set of metal disks
with a magnetic recording surface, read/write heads, motors and control hardware. It provides
a large volume of data storage for the operating system, application and user files. A number
of applications can be stored on disk and then selected as required for loading into memory;
because the disk is read and write device, user files can be stored, applications added and
software updates easily installed.

1.2 Wordprocessor Operation


In order to understand the operation of the PC microprocessor system, we will look at how the
wordprocessor application uses the hardware and software resources.

1.2.1 Starting the Computer


When the PC is switched on, the BIOS ROM program starts automatically. It checks that the
system hardware is working properly and displays messages to report the results. If there is a
problem, the BIOS program attempts to diagnose the fault, and will display an error message.
If all is well, it loads (copies) the main operating system software (Windows) from hard disk
into RAM. As you will probably have noticed, this all takes some time; this is an indication of
the amount of data transfer required, and the relatively slow access to the hard drive.

1.2.2 Starting the Application


Windows displays an initial screen with icons and menus which allows the application to
be selected using the mouse and on-screen pointer. Word is started by clicking on its icon;
Windows converts this action to a command which runs the executable file (WINWORD.EXE)
stored on disk. In older machines the operating system, MSDOS (Microsoft disk operating
system), required this command to be typed in to start the application.
The application program is transferred from disk to RAM, or as much of it as will fit in
the available memory. If necessary, application program blocks can be swapped into memory
when needed. The wordprocessor screen is displayed and a new document file can be created
or an existing one loaded by the user from disk for updating.

1.2.3 Data Input


The main data input is obviously from the keyboard, which consists of a grid of switches which
are scanned by a dedicated microcontroller within the keyboard unit. This chip detects when
a key has been pressed, and sends a corresponding code to the CPU via a serial data line in
the keyboard cable. The serial data is a sequence of high and low voltages on a single wire,
10 Computer Systems

which represent a binary code, each key generating a different code. The keyboard interface
converts this serial code to parallel form for transfer to the CPU via the system data bus. It also
signals separately to the CPU that a keycode is ready to be read into the CPU, by generating an
‘interrupt’ signal. This serial-to-parallel (or parallel-to-serial) data conversion process is required
in all the interfaces that use serial data transfer, namely, the keyboard, VDU, network and
modem. Binary coding, interrupts and other such processes will be explained in more detail later.
In Windows, and other GUIs, the mouse can be used to select commands for managing the
application and its data. It controls a pointer on the screen; when the mouse is moved, the
ball turns two rollers, which have perforated wheels attached. The holes are detected using
an opto-detector, which sends pulses representing movement in two directions. These pulse
sequences are passed to the CPU via the mouse interface and used to modify the position of
the pointer on the screen. The buttons, used to select an action, must also be input to the CPU.

1.2.4 Data Storage


Each character of the text being typed into the wordprocessor is stored as an 8-bit (one byte)
binary code, which occupies one location in RAM. Each bit of data must be stored as a charge
on small capacitor in the RAM chip. The parallel data is received by the CPU, then sent back
via the same data bus lines from the CPU to the RAM. The RAM stores the data bytes at
numbered locations; these address numbers are identified by the CPU using the system address
bus. The data is transferred on the data bus to the address in RAM selected by the CPU via the
ISD, which provides the additional logic required to handle the data transfers.

1.2.5 Data Processing


In the past, programs running on the DOS operating system required less processing power,
partly because the screen was simpler, being divided up into one space for each character. The
video interface would convert the stored character code into the pattern for the character, and
output it to the correct position on the screen.
The Windows screen is more complicated, because the text is displayed in graphics (drawing)
mode, at a higher resolution, so that the text size, style and layout appears on screen as it will
be printed. Graphics, tables and special characters can be embedded in the text. This means the
CPU has far more work to do in displaying the page, and this is one reason why Windows needs
more memory and a more powerful CPU than former DOS-based wordprocessors. The processor
must also manage the WIMP (Windows, Icons, Mouse, Pointer) interface, which allows actions
to be selected on screen. Word now has many more features than earlier wordprocessors, and
there is now little difference between a typical wordprocessor and so called desk-top publishing
(DTP) programs, which provide comprehensive page layout control.

1.2.6 Data Output


The characters must be displayed on the screen as they are typed in, so the character codes
stored in memory are also sent to the VDU via the system data bus and video interface. The
display is made up of single coloured dots (pixels) organised in lines across the screen, which
are output in sequence from a video amplifier. This is known as a scanned display. The shape
of the character on screen must be generated from its code in memory, and sent out on the
correct set of lines at the right time on the video signal. The display is therefore formed as a
two-dimensional image made up from a serial data stream which sets the colour of each pixel
on the screen in turn, line by line.
Random documents with unrelated
content Scribd suggests to you:
in the sky are in fact at distances extremely various,—some, as the
clouds, only a few miles off; others, as the moon, but a few
thousand miles; and others, as the fixed stars, innumerable millions
of miles from us,—yet, as our eye cannot distinguish these different
distances, we acquire the habit of referring all objects beyond a
moderate height to one and the same surface, namely, an imaginary
spherical surface, denominated the celestial vault. Thus, the various
objects represented in the diagram on next page, though differing
very much in shape and diameter, would all be projected upon the
sky alike, and compose a part, indeed, of the imaginary vault itself.
The place which each object occupies is determined by lines drawn
from the eye of the spectator through the extremities of the body, to
meet the imaginary concave sphere. Thus, to a spectator at O, Fig
16, the several lines A B, C D, and E F, would all be projected into
arches on the face of the sky, and be seen as parts of the sky itself,
as represented by the lines A´ B´, C´ D´, and E´ F´. And were a
body actually to move in the several directions indicated by these
lines, they would appear to the spectator to describe portions of the
celestial vault. Thus, even when moving through the crooked line,
from a to b, a body would appear to be moving along the face of the
sky, and of course in a regular curve line, from c to d.
Fig. 16.

But, although all objects, beyond a certain moderate height, are


projected on the imaginary surface of the sky, yet different
spectators will project the same object on different parts of the sky.
Thus, a spectator at A, Fig. 17, would see a body, C, at M, while a
spectator at B would see the same body at N. This change of place
in a body, as seen from different points, is called parallax, which is
thus defined: parallax is the apparent change of place which bodies
undergo by being viewed from different points.

Fig. 17.

The arc M N is called the parallactic arc, and the angle A C B, the
parallactic angle.

It is plain, from the figure, that near objects are much more
affected by parallax than distant ones. Thus, the body C, Fig. 17,
makes a much greater parallax than the more distant body D,—the
former being measured by the arc M N, and the latter by the arc O P.
We may easily imagine bodies to be so distant, that they would
appear projected at very nearly the same point of the heavens,
when viewed from places very remote from each other. Indeed, the
fixed stars, as we shall see more fully hereafter, are so distant, that
spectators, a hundred millions of miles apart, see each star in one
and the same place in the heavens.

It is by means of parallax, that astronomers


find the distances and magnitudes of the
heavenly bodies. In order fully to understand this
subject, one requires to know something of
trigonometry, which science enables us to find
certain unknown parts of a triangle from certain
Fig. 18. other parts which are known. Although you may
not be acquainted with the principles of
trigonometry, yet you will readily understand, from your knowledge
of arithmetic, that from certain things given in a problem others may
be found. Every triangle has of course three sides and three angles;
and, if we know two of the angles and one of the sides, we can find
all the other parts, namely, the remaining angle and the two
unknown sides. Thus, in the triangle A B C, Fig. 18, if we know the
length of the side A B, and how many degrees each of the angles A
B C and B C A contains, we can find the length of the side B C, or of
the side A C, and the remaining angle at A. Now, let us apply these
principles to the measurements of some of the heavenly bodies.
Fig. 19.

In Fig. 19, let A represent the earth, C H the horizon, and H Z a


quadrant of a great circle of the heavens, extending from the
horizon to the zenith; and let E, F, G, O, be successive positions of
the moon, at different elevations, from the horizon to the meridian.
Now, a spectator on the surface of the earth, at A, would refer the
moon, when at E, to h, on the face of the sky, whereas, if seen from
the centre of the earth, it would appear at H. So, when the moon
was at F, a spectator at A would see it at p, while, if seen from the
centre, it would have appeared at P. The parallactic arcs, H h, P p, R
r, grow continually smaller and smaller, as a body is situated higher
above the horizon; and when the body is in the zenith, then the
parallax vanishes altogether, for at O the moon would be seen at Z,
whether viewed from A or C.

Since, then, a heavenly body is liable to be referred to different


points on the celestial vault, when seen from different parts of the
earth, and thus some confusion be occasioned in the determination
of points on the celestial sphere, astronomers have agreed to
consider the true place of a celestial object to be that where it would
appear, if seen from the centre of the earth; and the doctrine of
parallax teaches how to reduce observations made at any place on
the surface of the earth, to such as they would be, if made from the
centre.

When the moon, or any heavenly body, is seen in the horizon, as


at E, the change of place is called the horizontal parallax. Thus, the
angle A E C, measures the horizontal parallax of the moon. Were a
spectator to view the earth from the centre of the moon, he would
see the semidiameter of the earth under this same angle; hence, the
horizontal parallax of any body is the angle subtended by the
semidiameter of the earth, as seen from the body. Please to
remember this fact.

It is evident from the figure, that the effect of parallax upon the
place of a celestial body is to depress it. Thus, in consequence of
parallax, E is depressed by the arc H h; F, by the arc P p; G, by the
arc R r; while O sustains no change. Hence, in all calculations
respecting the altitude of the sun, moon, or planets, the amount of
parallax is to be added: the stars, as we shall see hereafter, have no
sensible parallax.

It is now very easy to see how, when the parallax of a body is


known, we may find its distance from the centre of the earth. Thus,
in the triangle A C E, Fig. 19, the side A C is known, being the
semidiameter of the earth; the angle C A E, being a right angle, is
also known; and the parallactic angle, A E C, is found from
observation; and it is a well-known principle of trigonometry, that
when we have any two angles of a triangle, we may find the
remaining angle by subtracting the sum of these two from one
hundred and eighty degrees. Consequently, in the triangle A E C, we
know all the angles and one side, namely, the side A C; hence, we
have the means of finding the side C E, which is the distance from
the centre of the earth to the centre of the moon.

When the distance of a heavenly body is


known, and we can measure, with instruments,
its angular breadth, we can easily determine its
magnitude. Thus, if we have the distance of the
moon, E S, Fig. 20, and half the breadth of its
disk S C, (which is measured by the angle S E C,)
we can find the length of the line, S C, in miles.
Twice this line is the diameter of the body; and
when we know the diameter of a sphere, we can,
by well-known rules, find the contents of the
surface, and its solidity.
Fig. 20.
You will perhaps be curious to know, how the
moon's horizontal parallax is found; for it must
have been previously ascertained, before we could apply this
method to finding the distance of the moon from the earth. Suppose
that two astronomers take their stations on the same meridian, but
one south of the equator, as at the Cape of Good Hope, and another
north of the equator, as at Berlin, in Prussia, which two places lie
nearly on the same meridian. The observers would severally refer
the moon to different points on the face of the sky,—the southern
observer carrying it further north, and the northern observer further
south, than its true place, as seen from the centre of the earth. This
will be plain from the diagram, Fig. 21. If A and B represent the
positions of the spectators, M the moon, and C D an arc of the sky,
then it is evident, that C D would be the parallactic arc.

These observations furnish materials for


calculating, by the aid of trigonometry, the
moon's horizontal parallax, and we have before
seen how, when we know the parallax of a
heavenly body, we can find both its distance from
the earth and its magnitude.

Beside the change of place which these


heavenly bodies undergo, in consequence of Fig. 21.
parallax, there is another, of an opposite kind,
arising from the effect of the atmosphere, called refraction.
Refraction elevates the apparent place of a body, while parallax
depresses it. It affects alike the most distant as well as nearer
bodies.

In order to understand the nature of refraction, we must consider,


that an object always appears in the direction in which the last ray of
light comes to the eye. If the light which comes from a star were
bent into fifty directions before it reached the eye, the star would
nevertheless appear in the line described by the ray nearest the eye.
The operation of this principle is seen when an oar, or any stick, is
thrust into water. As the rays of light by which the oar is seen have
their direction changed as they pass out of water into air, the
apparent direction in which the body is seen is changed in the same
degree, giving it a bent appearance,—the part below the water
having apparently a different direction from the part above. Thus, in
Fig. 22, page 96, if S a x be the oar, S a b will be the bent
appearance, as affected by refraction. The transparent substance
through which any ray of light passes is called a medium. It is a
general fact in optics, that, when light passes out of a rarer into a
denser medium, as out of air into water, or out of space into air, it is
turned towards a perpendicular to the surface of the medium; and
when it passes out of a denser into a rarer medium, as out of water
into air, it is turned from the perpendicular. In the above case, the
light, passing out of space into air, is turned towards the radius of
the earth, this being perpendicular to the surface of the atmosphere;
and it is turned more and more towards that radius the nearer it
approaches to the earth, because the density of the air rapidly
increases near the earth.

Fig. 22.

Let us now conceive of the atmosphere as made up of a great


number of parallel strata, as A A, B B, C C, and D D, increasing
rapidly in density (as is known to be the fact) in approaching near to
the surface of the earth. Let S be a star, from which a ray of light, S
a, enters the atmosphere at a, where, being much turned towards
the radius of the convex surface, it would change its direction into
the line a b, and again into b c, and c O, reaching the eye at O.
Now, since an object always appears in the direction in which the
light finally strikes the eye, the star would be seen in the direction O
c, and, consequently, the star would apparently change its place, by
refraction, from S to S´, being elevated out of its true position.
Moreover, since, on account of the continual increase of density in
descending through the atmosphere, the light would be continually
turned out of its course more and more, it would therefore move,
not in the polygon represented in the figure, but in a corresponding
curve line, whose curvature is rapidly increased near the surface of
the earth.

When a body is in the zenith, since a ray of light from it enters the
atmosphere at right angles to the refracting medium, it suffers no
refraction. Consequently, the position of the heavenly bodies, when
in the zenith, is not changed by refraction, while, near the horizon,
where a ray of light strikes the medium very obliquely, and traverses
the atmosphere through its densest part, the refraction is greatest.
The whole amount of refraction, when a body is in the horizon, is
thirty-four minutes; while, at only an elevation of one degree, the
refraction is but twenty-four minutes; and at forty-five degrees, it is
scarcely a single minute. Hence it is always important to make our
observations on the heavenly bodies when they are at as great an
elevation as possible above the horizon, being then less affected by
refraction than at lower altitudes.

Since the whole amount of refraction near the horizon exceeds


thirty-three minutes, and the diameters of the sun and moon are
severally less than this, these luminaries are in view both before
they have actually risen and after they have set.

The rapid increase of refraction near the horizon is strikingly


evinced by the oval figure which the sun assumes when near the
horizon, and which is seen to the greatest advantage when light
clouds enable us to view the solar disk. Were all parts of the sun
equally raised by refraction, there would be no change of figure; but,
since the lower side is more refracted than the upper, the effect is to
shorten the vertical diameter, and thus to give the disk an oval form.
This effect is particularly remarkable when the sun, at his rising or
setting, is observed from the top of a mountain, or at an elevation
near the seashore; for in such situations, the rays of light make a
greater angle than ordinary with a perpendicular to the refracting
medium, and the amount of refraction is proportionally greater. In
some cases of this kind, the shortening of the vertical diameter of
the sun has been observed to amount to six minutes, or about one
fifth of the whole.

The apparent enlargement of the sun and moon, when near the
horizon, arises from an optical illusion. These bodies, in fact, are not
seen under so great an angle when in the horizon as when on the
meridian, for they are nearer to us in the latter case than in the
former. The distance of the sun, indeed, is so great, that it makes
very little difference in his apparent diameter whether he is viewed
in the horizon or on the meridian; but with the moon, the case is
otherwise; its angular diameter, when measured with instruments, is
perceptibly larger when at its culmination, or highest elevation above
the horizon. Why, then, do the sun and moon appear so much larger
when near the horizon? It is owing to a habit of the mind, by which
we judge of the magnitudes of distant objects, not merely by the
angle they subtend at the eye, but also by our impressions
respecting their distance, allowing, under a given angle, a greater
magnitude as we imagine the distance of a body to be greater. Now,
on account of the numerous objects usually in sight between us and
the sun, when he is near the horizon, he appears much further
removed from us than when on the meridian; and we unconsciously
assign to him a proportionally greater magnitude. If we view the
sun, in the two positions, through a smoked glass, no such
difference of size is observed; for here no objects are seen but the
sun himself.

Twilight is another phenomenon depending on the agency of the


earth's atmosphere. It is that illumination of the sky which takes
place just before sunrise and which continues after sunset. It is
owing partly to refraction, and partly to reflection, but mostly to the
latter. While the sun is within eighteen degrees of the horizon,
before it rises or after it sets, some portion of its light is conveyed to
us, by means of numerous reflections from the atmosphere. At the
equator, where the circles of daily motion are perpendicular to the
horizon, the sun descends through eighteen degrees in an hour and
twelve minutes. The light of day, therefore, declines rapidly, and as
rapidly advances after daybreak in the morning. At the pole, a
constant twilight is enjoyed while the sun is within eighteen degrees
of the horizon, occupying nearly two thirds of the half year when the
direct light of the sun is withdrawn, so that the progress from
continual day to constant night is exceedingly gradual. To an
inhabitant of an oblique sphere, the twilight is longer in proportion
as the place is nearer the elevated pole.

Were it not for the power the atmosphere has of dispersing the
solar light, and scattering it in various directions, no objects would
be visible to us out of direct sunshine; every shadow of a passing
cloud would involve us in midnight darkness; the stars would be
visible all day; and every apartment into which the sun had not
direct admission would be involved in the obscurity of night. This
scattering action of the atmosphere on the solar light is greatly
increased by the irregularity of temperature caused by the sun,
which throws the atmosphere into a constant state of undulation;
and by thus bringing together masses of air of different
temperatures, produces partial reflections and refractions at their
common boundaries, by which means much light is turned aside
from a direct course, and diverted to the purposes of general
illumination.[6] In the upper regions of the atmosphere, as on the
tops of very high mountains, where the air is too much rarefied to
reflect much light, the sky assumes a black appearance, and stars
become visible in the day time.

Although the atmosphere is usually so transparent, that it is


invisible to us, yet we as truly move and live in a fluid as fishes that
swim in the sea. Considered in comparison with the whole earth, the
atmosphere is to be regarded as a thin layer investing the surface,
like a film of water covering the surface of an orange. Its actual
height, however, is over a hundred miles, though we cannot assign
its precise boundaries. Being perfectly elastic, the lower portions,
bearing as they do, the weight of all the mass above them, are
greatly compressed, while the upper portions having little to oppose
the natural tendency of air to expand, diffuse themselves widely. The
consequence is, that the atmosphere undergoes a rapid diminution
of density, as we ascend from the earth, and soon becomes
exceedingly rare. At so moderate a height as seven miles, it is four
times rarer than at the surface, and continues to grow rare in the
same proportion, namely, being four times less for every seven miles
of ascent. It is only, therefore, within a few miles of the earth, that
the atmosphere is sufficiently dense to sustain clouds and vapors,
which seldom rise so high as eight miles, and are usually much
nearer to the earth than this. So rare does the air become on the top
of Mount Chimborazo, in South America, that it is incompetent to
support most of the birds that fly near the level of the sea. The
condor, a bird which has remarkably long wings, and a light body, is
the only bird seen towering above this lofty summit. The
transparency of the atmosphere,—a quality so essential to fine views
of the starry heavens,—is much increased by containing a large
proportion of water, provided it is perfectly dissolved, or in a state of
invisible vapor. A country at once hot and humid, like some portions
of the torrid zone, presents a much brighter and more beautiful view
of the moon and stars, than is seen in cold climates. Before a
copious rain, especially in hot weather, when the atmosphere is
unusually humid, we sometimes observe the sky to be remarkably
resplendent, even in our own latitude. Accordingly, this unusual
clearness of the sky, when the stars shine with unwonted brilliancy,
is regarded as a sign of approaching rain; and when, after the rain is
apparently over, the air is remarkably transparent, and distant
objects on the earth are seen with uncommon distinctness, while the
sky exhibits an unusually deep azure, we may conclude that the
serenity is only temporary, and that the rain will probably soon
return.
LETTER X.
THE SUN.
"Great source of day! best image
here below
Of thy Creator, ever pouring
wide,
From world to world, the vital
ocean round,
On Nature write, with every
beam, His praise."—
Thomson.

The subjects which have occupied the preceding Letters are by no


means the most interesting parts of our science. They constitute,
indeed, little more than an introduction to our main subject, but
comprise such matters as are very necessary to be clearly
understood, before one is prepared to enter with profit and delight
upon the more sublime and interesting field which now opens before
us.

We will begin our survey of the heavenly bodies with the sun,
which first claims our homage, as the natural monarch of the skies.
The moon will next occupy our attention; then the other bodies
which compose the solar system, namely, the planets and comets;
and, finally, we shall leave behind this little province in the great
empire of Nature, and wing a bolder flight to the fixed stars.
The distance of the sun from the earth is about ninety-five millions
of miles. It may perhaps seem incredible to you, that astronomers
should be able to determine this fact with any degree of certainty.
Some, indeed, not so well informed as yourself, have looked upon
the marvellous things that are told respecting the distances,
magnitudes, and velocities, of the heavenly bodies, as attempts of
astronomers to impose on the credulity of the world at large; but the
certainty and exactness with which the predictions of astronomers
are fulfilled, as an eclipse, for example, ought to inspire full
confidence in their statements. I can assure you, my dear friend,
that the evidence on which these statements are founded is
perfectly satisfactory to those whose attainments in the sciences
qualify them to understand them; and, so far are astronomers from
wishing to impose on the unlearned, by announcing such wonderful
discoveries as they have made among the heavenly bodies, no class
of men have ever shown a stricter regard and zeal than they for the
exact truth, wherever it is attainable.

Ninety-five millions of miles is indeed a vast distance. No human


mind is adequate to comprehend it fully; but the nearest approaches
we can make towards it are gained by successive efforts of the mind
to conceive of great distances, beginning with such as are clearly
within our grasp. Let us, then, first take so small a distance as that
of the breadth of the Atlantic ocean, and follow, in mind, a ship, as
she leaves the port of New York, and, after twenty days' steady sail,
reaches Liverpool. Having formed the best idea we are able of this
distance, we may then reflect, that it would take a ship, moving
constantly at the rate of ten miles per hour, more than a thousand
years to reach the sun.
The diameter of the sun is towards a million of miles; or, more
exactly, it is eight hundred and eighty-five thousand miles. One
hundred and twelve bodies as large as the earth, lying side by side,
would be required to reach across the solar disk; and our ship,
sailing at the same rate as before, would be ten years in passing
over the same space. Immense as is the sun, we can readily
understand why it appears no larger than it does, when we reflect,
that its distance is still more vast. Even large objects on the earth,
when seen on a distant eminence, or over a wide expanse of water,
dwindle almost to a point. Could we approach nearer and nearer to
the sun, it would constantly expand its volume, until finally it would
fill the whole vault of heaven. We could, however, approach but little
nearer to the sun without being consumed by the intensity of his
heat. Whenever we come nearer to any fire, the heat rapidly
increases, being four times as great at half the distance, and one
hundred times as great at one tenth the distance. This fact is
expressed by saying, that the heat increases as the square of the
distance decreases. Our globe is situated at such a distance from the
sun, as exactly suits the animal and vegetable kingdoms. Were it
either much nearer or much more remote, they could not exist,
constituted as they are. The intensity of the solar light also follows
the same law. Consequently, were we nearer to the sun than we are,
its blaze would be insufferable; or, were we much further off, the
light would be too dim to serve all the purposes of vision.

The sun is one million four hundred thousand times as large as


the earth; but its matter is not more than about one fourth as dense
as that of the earth, being only a little heavier than water, while the
average density of the earth is more than five times that of water.
Still, on account of the immense magnitude of the sun, its entire
quantity of matter is three hundred and fifty thousand times as great
as that of the earth. Now, the force of gravity in a body is greater, in
proportion as its quantity of matter is greater. Consequently, we
might suppose, that the weight of a body (weight being nothing else
than the measure of the force of gravity) would be increased in the
same proportion; or, that a body, which weighs only one pound at
the surface of the earth, would weigh three hundred and fifty
thousand pounds at the sun. But we must consider, that the
attraction exerted by any body is the same as though all the matter
were concentrated in the centre. Thus, the attraction exerted by the
earth and by the sun is the same as though the entire matter of
each body were in its centre. Hence, on account of the vast
dimensions of the sun, its surface is one hundred and twelve times
further from its centre than the surface of the earth is from its
centre; and, since the force of gravity diminishes as the square of
the distance increases, that of the sun, exerted on bodies at its
surface, is (so far as this cause operates) the square of one hundred
and twelve, or twelve thousand five hundred and forty-four times
less than that of the earth. If, therefore, we increase the weight of a
body three hundred and fifty-four thousand times, in consequence of
the greater amount of matter in the sun, and diminish it twelve
thousand five hundred and forty-four times, in consequence of the
force acting at a greater distance from the body, we shall find that
the body would weigh about twenty-eight times more on the sun
than on the earth. Hence, a man weighing three hundred pounds
would, if conveyed to the surface of the sun, weigh eight thousand
four hundred pounds, or nearly three tons and three quarters. A limb
of our bodies, weighing forty pounds, would require to lift it a force
of one thousand one hundred and twenty pounds, which would be
beyond the ordinary power of the muscles. At the surface of the
earth, a body falls from rest by the force of gravity, in one second,
sixteen and one twelfth feet; but at the surface of the sun, a body
would, in the same time, fall through four hundred and forty-eight
and seven tenths feet.

The sun turns on his own axis once in a little


more than twenty-five days. This fact is known by
observing certain dark places seen by the
telescope on the sun's disk, called solar spots.
These are very variable in size and number.
Sometimes, the sun's disk, when viewed with a
Fig. 23. telescope, is quite free from spots, while at other
times we may see a dozen or more distinct
clusters, each containing a great number of spots, some large and
some very minute. Occasionally, a single spot is so large as to be
visible to the naked eye, especially when the sun is near the horizon,
and the glare of his light is taken off. One measured by Dr. Herschel
was no less than fifty thousand miles in diameter. A solar spot
usually consists of two parts, the nucleus and the umbra. The
nucleus is black, of a very irregular shape, and is subject to great
and sudden changes, both in form and size. Spots have sometimes
seemed to burst asunder, and to project fragments in different
directions. The umbra is a wide margin, of lighter shade, and is
often of greater extent than the nucleus. The spots are usually
confined to a zone extending across the central regions of the sun,
not exceeding sixty degrees in breadth. Fig. 23 exhibits the
appearance of the solar spots. As these spots have all a common
motion from day to day, across the sun's disk; as they go off at one
limb, and, after a certain interval, sometimes come on again on the
opposite limb, it is inferred that this apparent motion is imparted to
them by an actual revolution of the sun on his own axis. We know
that the spots must be in contact, or very nearly so, at least, with
the body of the sun, and cannot be bodies revolving around it, which
are projected on the solar disk when they are between us and the
sun; for, in that case, they would not be so long in view as out of
view, as will be evident from inspecting the following diagram. Let S,
Fig. 24, page 106, represent the sun, and b a body revolving round
it in the orbit a b c; and let E represent the earth, where, of course,
the spectator is situated. The body would be seen projected on the
sun only while passing from b to c, while, throughout the remainder
of its orbit, it would be out of view, whereas no such inequality
exists in respect to the two periods.

If you ask, what is the cause of the solar spots,


I can only tell you what different astronomers
have supposed respecting them. They attracted
the notice of Galileo soon after the invention of
the telescope, and he formed an hypothesis
respecting their nature. Supposing the sun to
consist of a solid body embosomed in a sea of
liquid fire, he believed that the spots are
Fig. 24.
composed of black cinders, formed in the interior
of the sun by volcanic action, which rise and float
on the surface of the fiery sea. The chief objections to this
hypothesis are, first, the vast extent of some of the spots, covering,
as they do, two thousand millions of square miles, or more,—a space
which it is incredible should be filled by lava in so short a time as
that in which the spots are sometimes formed; and, secondly, the
sudden disappearance which the spots sometimes undergo, a fact
which can hardly be accounted for by supposing, as Galileo did, that
such a vast accumulation of matter all at once sunk beneath the
fiery flood. Moreover, we have many reasons for believing that the
spots are depressions below the general surface.

La Lande, an eminent French astronomer of the last century, held


that the sun is a solid, opaque body, having its exterior diversified
with high mountains and deep valleys, and covered all over with a
burning sea of liquid matter. The spots he supposed to be produced
by the flux and reflux of this fiery sea, retreating occasionally from
the mountains, and exposing to view a portion of the dark body of
the sun. But it is inconsistent with the nature of fluids, that a liquid,
like the sea supposed, should depart so far from its equilibrium and
remain so long fixed, as to lay bare the immense spaces occupied by
some of the solar spots.

Dr. Herschel's views respecting the nature and constitution of the


sun, embracing an explanation of the solar spots, have, of late
years, been very generally received by the astronomical world. This
great astronomer, after attentively viewing the surface of the sun,
for a long time, with his large telescopes, came to the following
conclusions respecting the nature of this luminary. He supposes the
sun to be a planetary body like our earth, diversified with mountains
and valleys, to which, on account of the magnitude of the sun, he
assigns a prodigious extent, some of the mountains being six
hundred miles high, and the valleys proportionally deep. He employs
in his explanation no volcanic fires, but supposes two separate
regions of dense clouds floating in the solar atmosphere, at different
distances from the sun. The exterior stratum of clouds he considers
as the depository of the sun's light and heat, while the inferior
stratum serves as an awning or screen to the body of the sun itself,
which thus becomes fitted to be the residence of animals. The
proofs offered in support of this hypothesis are chiefly the following:
first, that the appearances, as presented to the telescope, are such
as accord better with the idea that the fluctuations arise from the
motions of clouds, than that they are owing to the agitations of a
liquid, which could not depart far enough from its general level to
enable us to see its waves at so great a distance, where a line forty
miles in length would subtend an angle at the eye of only the tenth
part of a second; secondly, that, since clouds are easily dispersed to
any extent, the great dimensions which the solar spots occasionally
exhibit are more consistent with this than with any other hypothesis;
and, finally, that a lower stratum of clouds, similar to those of our
atmosphere, was frequently seen by the Doctor, far below the
luminous clouds which are the fountains of light and heat.

Such are the views of one who had, it must be acknowledged,


great powers of observation, and means of observation in higher
perfection than have ever been enjoyed by any other individual; but,
with all deference to such authority, I am compelled to think that the
hypothesis is encumbered with very serious objections. Clouds
analogous to those of our atmosphere (and the Doctor expressly
asserts that his lower stratum of clouds are analogous to ours, and
reasons respecting the upper stratum according to the same
analogy) cannot exist in hot air; they are tenants only of cold
regions. How can they be supposed to exist in the immediate vicinity
of a fire so intense, that they are even dissipated by it at the
distance of ninety-five millions of miles? Much less can they be
supposed to be the depositories of such devouring fire, when any
thing in the form of clouds, floating in our atmosphere, is at once
scattered and dissolved by the accession of only a few degrees of
heat. Nothing, moreover, can be imagined more unfavorable for
radiating heat to such a distance, than the light, inconstant matter of
which clouds are composed, floating loosely in the solar atmosphere.
There is a logical difficulty in the case: it is ascribing to things
properties which they are not known to possess; nay, more, which
they are known not to possess. From variations of light and shade in
objects seen at moderate distances on the earth, we are often
deceived in regard to their appearances; and we must distrust the
power of an astronomer to decide upon the nature of matter seen at
the distance of ninety-five millions of miles.

I think, therefore, we must confess our ignorance of the nature


and constitution of the sun; nor can we, as astronomers, obtain
much more satisfactory knowledge respecting it than the common
apprehension, namely, that it is an immense globe of fire. We have
not yet learned what causes are in operation to maintain its
undecaying fires; but our confidence in the Divine wisdom and
goodness leads us to believe, that those causes are such as will
preserve those fires from extinction, and at a nearly uniform degree
of intensity. Any material change in this respect would jeopardize the
safety of the animal and vegetable kingdoms, which could not exist
without the enlivening influence of the solar heat, nor, indeed, were
that heat any more or less intense than it is at present.

If we inquire whether the surface of the sun is in a state of actual


combustion, like burning fuel, or merely in a state of intense ignition,
like a stone heated to redness in a furnace, we shall find it most
reasonable to conclude that it is in a state of ignition. If the body of
the sun were composed of combustible matter and were actually on
fire, the material of the sun would be continually wasting away,
while the products of combustion would fill all the vast surrounding
regions, and obscure the solar light. But solid bodies may attain a
very intense state of ignition, and glow with the most fervent heat,
while none of their material is consumed, and no clouds or fumes
rise to obscure their brightness, or to impede their further emission
of heat. An ignited surface, moreover, is far better adapted than
flame to the radiation of heat. Flame, when made to act in contact
with the surfaces of solid bodies, heats them rapidly and powerfully;
but it sends forth, or radiates, very little heat, compared with solid
matter in a high state of ignition. These various considerations
render it highly probable to my mind, that the body of the sun is not
in a state of actual combustion, but merely in a state of high
ignition.

The solar beam consists of a mixture of several different sorts of


rays. First, there are the calorific rays, which afford heat, and are
entirely distinct from those which afford light, and may be separated
from them. Secondly, there are the colorific rays, which give light,
consisting of rays of seven distinct colors, namely, violet, indigo,
blue, green, yellow, orange, red. These, when separated, as they
may be by a glass prism, compose the prismatic spectrum. They
appear also in the rainbow. When united again, in due proportions,
they constitute white light, as seen in the light of the sun. Thirdly,
there are found in the solar beam a class of rays which afford
neither heat nor light, but which produce chemical changes in
certain bodies exposed to their influence, and hence are called
chemical rays. Fourthly, there is still another class, called
magnetizing rays, because they are capable of imparting magnetic
properties to steel. These different sorts of rays are sent forth from
the sun, to the remotest regions of the planetary worlds, invigorating
all things by their life-giving influence, and dispelling the darkness
that naturally fills all space.

But it was not alone to give heat and light, that the sun was
placed in the firmament. By his power of attraction, also, he serves
as the great regulator of the planetary motions, bending them
continually from the straight line in which they tend to move, and
compelling them to circulate around him, each at nearly a uniform
distance, and all in perfect harmony. I will hereafter explain to you
the manner in which the gravity of the sun thus acts, to control the
planetary motions. For the present, let us content ourselves with
reflecting upon the wonderful force which the sun must put forth, in
order to bend out of their courses, into circular orbits, such a
number of planets, some of which are more than a thousand times
as large as the earth. Were a ship of war under full sail, and it
should be required to turn her aside from her course by a rope
attached to her bow, we can easily imagine that it would take a
great force to do it, especially were it required that the force should
remain stationary and the ship be so constantly diverted from her
course, as to be made to go round the force as round a centre.
Somewhat similar to this is the action which the sun exerts on each
of the planets by some invisible influence, called gravitation. The
bodies which he thus turns out of their course, and bends into a
circular orbit around himself, are, however, many millions of times as
ponderous as the ship, and are moving many thousand times as
swiftly.
LETTER XI.
ANNUAL REVOLUTION.—SEASONS
"These, as they change, Almighty
Father, these
Are but the varied God. The
rolling year
Is full of Thee."—Thomson.

We have seen that the apparent revolution of the heavenly bodies,


from east to west, every twenty-four hours, is owing to a real
revolution of the earth on its own axis, in the opposite direction. This
motion is very easily understood, resembling, as it does, the
spinning of a top. We must, however, conceive of the top as turning
without any visible support, and not as resting in the usual manner
on a plane. The annual motion of the earth around the sun, which
gives rise to an apparent motion of the sun around the earth once a
year, and occasions the change of seasons, is somewhat more
difficult to understand; and it may cost you some reflection, before
you will settle all the points respecting the changes of the seasons
clearly in your mind. We sometimes see these two motions
exemplified in a top. When, as the string is pulled, the top is thrown
forwards on the floor, we may see it move forward (sometimes in a
circle) at the same time that it spins on its axis. Let a candle be
placed on a table, to represent the sun, and let these two motions
be imagined to be given to a top around it, and we shall have a case
somewhat resembling the actual motions of the earth around the
sun.

When bodies are at such a distance from each other as the earth
and the sun, a spectator on either would project the other body
upon the concave sphere of the heavens, always seeing it on the
opposite side of a great circle one hundred and eighty degrees from
himself.

Recollect that the path in which the earth moves round the sun is
called the ecliptic. We are not to conceive of this, or of any other
celestial circle, as having any real, palpable existence, any more than
the path of a bird through the sky. You will perhaps think it quite
superfluous for me to remind you of this; but, from the habit of
seeing the orbits of the heavenly bodies represented in diagrams
and orreries, by palpable lines and circles, we are apt inadvertently
to acquire the notion, that the orbits of the planets, and other
representations of the artificial sphere, have a real, palpable
existence in Nature; whereas, they denote the places where mere
geometrical or imaginary lines run. You might have expected to see
an orrery, exhibiting a view of the sun and planets, with their various
motions, particularly described in my Letter on astronomical
instruments and apparatus. I must acknowledge, that I entertain a
very low opinion of the utility of even the best orreries, and I cannot
recommend them as auxiliaries in the study of astronomy. The
numerous appendages usually connected with them, some to
support them in a proper position, and some to communicate to
them the requisite motions, enter into the ideas which the learner
forms respecting the machinery of the heavens; and it costs much
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like