Buy Used
Used - Very Good See details
$8.83 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Reusable Software Components (Prentice Hall Series on Programming Tools and Methodologies)
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Reusable Software Components (Prentice Hall Series on Programming Tools and Methodologies) [Hardcover]

Ted Van Sickle (Author), Truman T. Van Sickle (Author)
2.3 out of 5 stars  See all reviews (3 customer reviews)


Available from these sellers.



Book Description

Prentice Hall Series on Programming Tools and Methodologies November 1996
Shows how many object-oriented programming techniques can be used to enhance real-time embedded sytems written in C. The text shows how objects can be written in C and developed into classes. It presents useful objects and classes for microcontroller programs.

Editorial Reviews

From the Publisher

Shows how many object-oriented programming techniques can be used to enhance real-time embedded systems written in C. Reusable Software Components helps real-time embedded systems designers combine the development benefits of the widely-used C language and object-oriented techniques not normally associated with C. It introduces object-oriented programming to microcontroller programmers familiar with C, shows how objects can be written in C, and developed into classes. The book presents useful objects and classes for microcontroller programs, including a class that creates instances of an asynchronous serial port. It also shows how to implement components to handle timer functions and input capture. Data sheets are compiled for all components derived throughout the book. For programmers working with real-time embedded systems.

From the Inside Flap

This book introduces you to new and useful techniques of programming microcontrollers with the high-level language C. The concept of reusable components evolved from research aimed at object-oriented programming for microcontrollers in C. It was found that classes written in C can be packaged as components for easy reuse and modification needed to extend their capability.

In this book you will learn how to create classes in C. Instances of these classes are objects, and within the limits of the microcontroller and other peripherals, as many instances of these objects as are needed can be created. We call these classes components. Such software components have advantages over the corresponding hardware components. In the construction of components, we can apply the concepts of inheritance and polymorphism. Inheritance allows extension of the basic component to meet new requirements without modification of the basic class code. Polymorphism, or late binding, permits the program to select one of several alternative functions or methods. The choice of which to execute cannot be determined until run time. It will be found that careful application of polymorphism can allow a saving of program code.

One of the features of any high-level language is to implement an abstraction in which the underlying computer seemingly disappears. The total programmer interface with the computer is through the language. Often, the basic nature of the computer being programmed is of little concern to the programmer. True for the computer, but untrue for the peripherals. Most of the skill needed to program microcontrollers with a high-level language involves the efficient coding of the interface between the main computer and its program with the peripherals of the system. The code in this book is for an M68HC16 family part. This code is also usable on the M68300 series of components. The main difference will be that the initialization of the core computers is slightly different, and since most peripherals are common between the chips, the only header file change needed will be the basic core part header. The microcontroller code contained in this book, where possible, has been compiled and tested in an M68300 component.

Chapter 1 contains a very brief summary of object-oriented programming (OOP). The main purpose of the chapter is to introduce some of the language of OOP, how classes and objects are used, what to expect from inheritance and virtual functions, and the many limitations of C as OOP language.

Objects written in C are explored in Chapter 2. Here we start with the simplest concept of an object and develop it into a class. We make a class that can support multiple instantiations of itself in the form of different objects. Inheritance is examined and implemented. We then see how virtual functions can be implemented and used. Finally, several mechanisms to improve the appearance, maintainability, and size of the code written with these techniques are shown. All the code in Chapter 2 is written for a DOS-based machine. The code in the remainder of the book is written for the MC68HC16Y1 microcontroller.

The contents of Chapter 3 show the development of several useful objects for microcontroller programs. Here the classes cover some typical data structure classes that can be used in your programs. These data structures have been developed to meet a programming need for some embedded system.

In Chapter 4 we develop a class that creates instances of an asynchronous serial port. This serial port driver is interrupt-controlled and block-oriented. Its implementation is object-oriented. Instances of serial port objects can be created, and with proper care by the basic program, these instances can be run simultaneously. The microcontroller programmed here contains a dual-channel asynchronous serial port that is comprised of two distinct universal asynchronous receiver-transmitters (UARTs). Although this application might seem to be a perfect example where it is possible to merge the software drivers for these two on-board devices into a single class, it is a case where the merging of the two programs will essentially double the total code, and it will increase the complexity of the software driver considerably. It was decided that the natural integration of multiple devices into a single object-oriented interface would best be demonstrated with the on-board general-purpose timer described in Chapters 5 and 6.

Several timer functions are developed in Chapters 5 and 6. These timers are based on the timers in the general-purpose timer (GPT). The GPT contains both output compare operations and input capture functions. You will find development of components to make use of the output compare systems in Chapter 5. There are four output compare systems on board the chip. Object-oriented interfaces to these output compare systems are created in a single class. Mechanizations are provided to attach a delay object to any timer. When needed, multiple operations can be controlled by each timer through the use of a linked list of object-oriented drivers that are executed with each output compare interrupt. Input capture operations are used to measure time between events. An object-oriented interface to the several on-board input capture systems is completed, and applications to make precision time measurements are shown in Chapter 6.

Chapter 7 is a data manual. The test is on components, and most components that we encounter in hardware have an associated data sheet. Data sheets for all the components derived in this book have been collected together and placed in Chapter 7. Here you can find how to use each software component, its parameters, and the essential items needed to use the class as a super class for the derivation of another class. I suspect that this chapter will be a well-used chapter of the book.

In Appendix A you will find a very brief description of the Cosmic C compiler used to develop code for the M68HC16 series of components. Appendix B includes several important header files needed to compile code for this chip family.

A CD-ROM is included with this book for your convenience. The contents of the CD-ROM should be installed on your hard drive. A command like:
x: > install y:
where x: is the volume of your CD-ROM drive and y: is the volume of the destination drive. This install command will create three directories on your hard drive: programs, html, and Cosmic.

The directory Programs contains all the executable code contained in the book. It is organized by chapter to help you find what you need. The directory Cosmic contains a demonstration C compiler from Cosmic software. This fine product will compile all the code contained in this book. The directory HTML contains a complete copy of the book. You are about to use one of the fine developments that has come from the World Wide Web. The language used to generate Web pages is called html for Hypertext Markup Language. This language allows you to create data pages that are formatted by the language rather than by the author. Look into any of the *.htm files in this directory to see what HTML files look like.

To access an HTML file you must use a Web Browser such as Netscape or any of the other popular programs. Once you get the program running, you can bring up the text with a command like:
file://localhost/c://contents.htm
where is the path of your html files. From that point on, it is merely point and click to move through the book.

I would like to take this opportunity to extend my thanks to the Semiconductor Products Sector of Motorola, Inc. for their support in the production of this book. Neil Krohn, my manager, is always there with encouragement to try new business ideas. This, my second book, has been written with his support and blessing. I could not have completed it without his help. My associates Lou Pagnuccon and A. J. Pohlmeyer have provided me with many interesting discussions that have shaped the contents of this book. Finally, I would also like to thank Brian Wilkie, Corporate Vice President and General Manager of the Advanced Microcontroller Division.

Ted Van Sickle



Product Details

  • Hardcover: 288 pages
  • Publisher: Prentice Hall (November 1996)
  • Language: English
  • ISBN-10: 0136136885
  • ISBN-13: 978-0136136880
  • Product Dimensions: 9.1 x 6.1 x 2.3 inches
  • Shipping Weight: 14.4 ounces
  • Average Customer Review: 2.3 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Best Sellers Rank: #2,856,150 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

3 Reviews
5 star:
 (1)
4 star:    (0)
3 star:    (0)
2 star:    (0)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
2.3 out of 5 stars (3 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

7 of 8 people found the following review helpful:
5.0 out of 5 stars Helps You Add OOP to your Embedded Project, May 30, 2000
By A Customer
This review is from: Reusable Software Components (Prentice Hall Series on Programming Tools and Methodologies) (Hardcover)
This book provides a method of utilizing the advantages of Object-Oriented Programing (OOP) by using C rather than C++. This isn't of much use for people who program PC's where C++ compiliers are abundant. But if there are no C++ compiliers available or the cost is prohibited for the project, this book teaches an excellent way of adding OOP to you code. Like Van Sickle's other book "Programming Microcontrollers in C", the book is well written and easy to read. Concepts are clearly explained and examples are given to clarify the meaning. As an added bonus, you will gain understanding of what C++ compiliers do to your code when compiling objects since some of that work must now be coded by hand.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


5 of 6 people found the following review helpful:
1.0 out of 5 stars No thanks., May 29, 2001
By A Customer
This review is from: Reusable Software Components (Prentice Hall Series on Programming Tools and Methodologies) (Hardcover)
I'm an experienced OO programmer and an experienced embedded programmer who understands the need to "drop down to" 'C' instead of C++.

The contortions the author goes through to provide OO style inheritance are more appropriate for an academic exercise than real world code. The development cost, maintainance cost, & runtime overhead easily outweighs the benefits. It's ugly. At some point you just have to admit your stuck with 'C' and stop trying to turn a crescent wrench into a socket set.

The technique (which totally writes off data hiding, btw) is laid out in chapter one. The rest of the book consists of classes built with the technique. Since I couldn't buy into Chapter 1's technique, the rest of the book wasn't very useful.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


1.0 out of 5 stars Horrible book, September 19, 2005
This review is from: Reusable Software Components (Prentice Hall Series on Programming Tools and Methodologies) (Hardcover)
I ordered this book expecting to find some good resources on OO design using C and how to use those methods to write embedded code. What I actually got though was a hardware engineer who was teaching terrible coding practices which I feel should not be followed by anyone. The way the author tried to make the OO design pattern with C code seemed backwards to the simple way I have seen in the past.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Only search this product's reviews



Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organize and find favorite items.
Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Discussion Replies Latest Post
Is Space Something? Is Time Something? Or are they Nothing? When Did Space First Begun? When Did Time First Begin? 236 49 seconds ago
A Falsifiable Scientific Creationist theory? 9897 2 minutes ago
Global warming is nothing but a hoax and a scare tactic 8063 4 minutes ago
was the moon landing real or fake, and why? 1531 18 minutes ago
Why are people here so scientifically illiterate 6673 30 minutes ago
What is the difference between Lorentz Transformation and the Theory of Special Relativity? 144 33 minutes ago
Layman question regarding time? 24 56 minutes ago
Radical Theory Explains the Origin, Evolution, and Nature of Life, Challenges Conventional Wisdom 21 2 hours ago
Search Customer Discussions
Search all Amazon discussions
   
Related forums


Listmania!


Create a Listmania! list

So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject