Object-Oriented Programming
Every programmer knows that ten small programs are easier to debug that one program that is ten times larger. Several advancements have been made towards this concept. Subroutines, Sub-functions and now Objects. Object-Oriented programming will not, to be honest, live up to all the hype that you have probably heard. If you think it will make all programming automatic, and all problems and bugs a thing of the past, you’ll be disappointed. Object-Oriented programming is, however, a significant advancement, and every programmer, that gains an understanding of Object-orientation, will become better and more productive.

The Object-Oriented Concept

An automobile is a very good example of the Object-Oriented Concept. As humans, it is our natural tendency to think of an automobile as a single "thing", and not as a large group of several thousand small "things". Thinking of the automobile as a single "thing" helps us deal with the overwhelming complexity of the whole machine. We would say simple statements like; "Fill her up." or "How fast are we going?" or "I have a Blue car." ... and everyone would understand how those statements apply to our car.

Using an automobile as an example of an Object, the following program shows an example of Object Oriented programming


    BobsCar.Speed = 50

    If BobsCar.Speed > CurrentRoad.SpeedLimit Then 

      PoliceCar.Mode = Chase

      PoliceCar.Target = BobsCar

      PoliceCar.Speed = BobsCar.Speed + 10

    End If

As shown in the example, the overwhelming complexity of Bob's car is reduced down to a simple set of understandable terms.  

In Object-Oriented terminology, collecting together a large group of several thousand small "things" into one single "thing" called an automobile is called encapsulation. Once encapsulated, the individual components within an object are dedicated to that one object.
For example, The steering wheel in our car, will not turn your home stereo's volume up or down.

Humans have been classifying everything in their world into "Objects" since the dawn of history because it is our natural tendency to do so. By adapting our computer languages to Object-Oriented Concepts, we tap into this natural human tendency resulting in easy to use languages.


The OOP in OOPic

Easy as...
RedLight = ON

-Or-

 
RedLight = OFF  
Any one who has programmed Embedded Controllers knows how complex they can get. OOPic eliminates this problem by encapsulating all the components of Microchip's PIC16C74 PICmicroŽ, embedded controller's hardware circuits into Objects. During program development, these objects can be named appropriately and then used with simplified statements.

By using the Object-Oriented Concept, OOPic advances micro-controllers into the modern world of easy to program objects.


    Send mail and comments to: Savage Innovations.

PICmicroŽ is a registered trade mark of Microchip. (http://www.microchip.com)