HelpFeedback
Deshmukh MICROCONTROLLERS
Information Center
Preface
Salient Features
Table of Contents
About the Author
Queries & Feedback
Buy the Book


Student Edition
Instructor Edition
MICROCONTROLLERS: Theory and Applications

AJAY V DESHMUKH, Asst Prof. & Head, Instrumentation Engg,VIT, PUNE

ISBN: 0070585954
Copyright year: 2005

Preface



“Success often comes to those who dare and act; it seldom goes to the timid who are ever afraid of the consequences”

Jawaharlal Nehru

THE MICROCONTROLLERS

Computational tools and computing machines were always the attraction for technology implementation in the field of automation for industrial and domestic products. Automation being one of the objectives, the computational needs were the motivation for the development of computing machines and devices. Till the inception of the first microprocessor, it was hardly possible to practically think of any of the algorithms for its use in reality. The limitations of digital electronics in the implementation of such algorithms have almost vanished today, due to the availability of powerful microprocessors and microcontrollers. Fast implementation and smaller size with effective computation are some of the issues which could further increase expectations from the computing machines.

Today, microcontrollers have become an integral part of all automatic and semi-automatic machines. Remote controllers, hand-held communication devices, dedicated controllers that use microcontrollers, have certainly improved the functional, operational and performance-based specifications. The architectural changes in instrumentation and control systems were and are due to the computing and communication capability of the microcontroller devices.

GENESIS

This text has originated from the need felt by the author to summarize his practical and design development work on microcontrollers as a hobby, as part of his project design, as experiments while teaching the undergraduate instrumentation engineering students and as the training courses conducted by him. Majority of the work summarized in this text is based on the work done by the author during the early part of his teaching career. This book puts together the working and practical aspects of microcontrollers.

The potential applications of microcontrollers in the industry attracted the author towards the subject. Microcontroller must be treated as a tool for computing and communication; knowledge of microcontrollers is meaningful and very rewarding if it is applied to design a product that is useful in the industry or for the society in general. This is a subject which has direct relevance to industrial product development and automation. This inspired the author to write this book.

SCOPE

In this book, microcontrollers and their applications are mainly focused and targeted towards the automation of industrial machines and processes. For studying their use, normally a short classroom work followed by laboratory practice lasting for a semester is sufficient. At the beginning studying only one microcontroller is good enough. However as one progresses, practice on more than one microcontroller will be required. Considering these needs many practical examples with different microcontrollers are covered in this book. The text can serve as a source and learning module for the undergraduate students of instrumentation, electronics and computer engineering. Further, it will also be helpful for practicing engineers working in the field of microcontrollers and design applications using these.

WHAT MAKES THIS TEXT DIFFERENT FROM OTHERS?

This book has been written in a very different fashion with specific objectives. Firstly, it covers both CISC and RISC processors. Secondly, it will be useful for both students and practicing engineers. Further, it will be useful for the beginners as well as experts or designers who are using microcontrollers. For the beginners it serves as a learning module whereas for the practitioners it serves as a practical guide. Part I of this book is for the beginners, who are interested in learning about microcontrollers. A background in digital systems is a prerequisite for studying this text. Coverage of more than one microcontroller is another unique feature of this book. This text considers MCS-51 as a starting point. It also covers the popular PIC microcontrollers from Microchip which use the RISC architecture. Atmel family is also discussed. Interfacing and several industrial applications of microcontrollers is another salient feature of the book.

ORGANIZATION OF THE BOOK

The book is organized into three parts. Part-I is Learning Microcontrollers, Part-II covers the PIC microcontrollers from Microchip, and Part-III covers the industrial applications of microcontrollers.

Chapter 1 covers introduction to microcontrollers, their potential in industrial applications and the history of microcontrollers. Concepts such as the CISC and RISC processors, embedded and external memory devices are covered. A brief idea about the available microcontrollers from Intel, Microchip and Atmel Corporation is given for the purpose of comparison.

Chapter 2 is mainly targeted towards learning MCS-51 products. Their architectural features along with registers are covered in this chapter.

Pin diagram, basic connections and memory organization are the topics discussed in Chapter 3. I/O port structure is also discussed in detail in this chapter. Emphasis is laid on the hardware aspect of the 8051 microcontroller.

Chapter 4 covers the addressing modes supported by MCS-51. The MCS-51 instruction set is also discussed. Call, Jump, Push, Pop, Rotate instructions have been elaborated. This chapter prepares for using the MCS-51 instructions for writing simple programs. Operations with registers, stack memory, etc. are discussed initiating programming the 8051 microcontroller.

The programming aspects of 8051 microcontrollers are covered in detail in Chapter 5. This chapter also discusses the programming tools available for 8051 microcontroller and the use of programming template for writing the programs clearly and effectively. Use of assemblers, linkers, simulators of 8051 is also explained.

Chapter 6 is devoted to the interrupt, timer counting and serial communication facilities supported by 8051. Hardware aspects and several programming examples are the major highlights of this chapter.

From the Atmel family of microcontrollers, 89C20XX and 89C51 microcontrollers are introduced in Chapter 7. The background on 8051 from the previous chapters will be helpful in simplifying the understanding of these microcontrollers. It covers the architecture, pin out, and connections for the test circuit for these microcontroller devices. Uses of precision comparator for ADC and power saving options are discussed.

Chapter 8 focuses on the applications of Atmel 89C51 and 89C2051 microcontrollers. Waveform generation, measurement applications for frequency and pulse width are covered with programming examples.

PIC microcontrollers from Microchip are discussed in Chapter 9. 16C6X and 16C7X are covered to explain the architecture and hardware aspects of these microcontrollers. Practicing the RISC processor is something different, which starts from this chapter. Readers interested in directly learning the PIC microcontrollers may start from this chapter.

Chapter 10 covers the flash microcontroller PIC 16F877 from Microchip. Architectural features, hardware details, registers, memory organization, simple programs are covered. This chapter explains the high-end utilities in PIC microcontrollers. The reader may appreciate the programming aspects of these blocks that are covered in the next chapter.

Chapter 11 is devoted to CCP module, MSSP module SPI and I2C buses, USART. Simple programming examples give a better understanding of these blocks available in PIC 16F877 microcontrollers.

In Chapter 12, interfacing and design applications are covered. This is to penetrate the design issues in general. Therefore, interfacing data input and presentation devices are the issues discussed in this chapter and LCD, keyboard, ADC applications are focused. The whole idea is to emphasise the hardware interfacing and programming issues of all MCS-51, Atmel and PIC microcontrollers.

Industrial applications of microcontrollers are covered in detail in Chapter 13. Measurement applications, driving power-controlling devices, stepper motor control, signal conditioning, data acquisition and transmission applications are elaborated along with programming examples.

Chapter 14 is devoted to the computational part and programming on these application modules. Representation of numbers and simple calculations are covered along with the programming examples. Both, floating point and fixed-point numbers and their use in programming are discussed. The chapter also gives some idea about writing programs with advanced math calculations.

ACKNOWLEDGEMENTS

I take this opportunity to thank the teachers and senior authorities whose constant encouragement made it possible for me to take up the challenge of writing a book. Specifically, thanks are due to Prof. H K Abhyankar, Prof. C B Deshpande and Prof. V M Gadre who contributed a lot in shaping me during my student life as well as professional career. Prof. C B Deshpande taught me microprocessors and many other subjects in instrumentation during my undergraduate and postgraduate studies. My very first document, my M E dissertation, was the first stage for me to learn documentation.

The words of Prof. B M Naik, the then Principal of SGGSCE & T, Nanded (1998) inspired me to write the book. During a Short Term Training Programme (STTP) on Digital Signal Processing at SGGSCE&T, Nanded (1998), Prof. Naik addressed the participants and during the course of his speech, one of his statements was “write a book”. It has become a reality now, though after a long time. I am very much grateful to him for his encouragement for book and research publications.

Listening to a lecture by Prof. V M Gadre of IIT, Bombay was an exciting moment for me. It was a special lecture on wavelets that became a turning point in my research career when I decided to do my doctoral research in the field of Signal and Image Processing in Magnetic Resonance Imaging at IIT Bombay. It is a great achievement for me to get an opportunity to work under his guidance as his student. I am grateful to him for all that he has taught me as my guide.

I am grateful to Prof. H K Abhyankar, Principal VIT Pune, for his guidance and consistent help in developing as an individual as well as a teacher. He is a constant source of inspiration to me. I consider myself fortunate to come across such an eminent personality.

Last but not the least, I am thankful to Prof. M D Gangal for his valuable help in encouraging my work on microcontrollers.

Next, it is my pleasure to acknowledge the various individuals who contributed in the completion of this book. Vibha Mahajan, Biju Ganesan, Mini Narayanan, Somomita and the team of Tata McGraw-Hill, India, including Mr Uday S Panchpor, are the key persons to take this book to its final stage. Although the names of the reviewers are not known, the author would like to thank the reviewers for giving suggestions for the improvement of this book.

Finally, I am thankful to my daughters Anagha and Asavari for allowing me to write this book in the time which rightfully belonged to them.

Ajay V Deshmukh

Small cover

To obtain a lecturer login to the Online Learning Centres, ask your local sales representative. If you're a lecturer thinking about adopting this textbook, request a complimentary copy for review.