Teach Yourself PIC Microcontrollers | www.electronicspk.com | 7
do
different tasks, but a change in specifications can easily be implemented by just changing the device
configuration. This greatly facilitated the engineers and hobbyists to rapidly develop new electronic
devices, and continuously improve previous ones. Not only the hardware requirements decreased, but also
design time, and time to market were decreased.
Microcontrollers and microprocessors therefore took over the market. Large hardware designs were
reduced, and most of the circuitry was replaced by the configuration scripts. Today we call this ability to
configure a microprocessor or microcontroller, programming.
A program is nothing but
a series of instructions, in a correct and logical manner to instruct the
microprocessor respond to various inputs. By changing the program, the behavior of microcontroller will
change. Think of it as a music system. The manufacturer has not designed it to produce any particular
sounds out of its speakers. Yet it has all the necessary circuitry to do that. What music it will produce would
depend upon the tape, or CD inserted.
Thus you change the CD, and the same hardware is playing different
thing. So we can say that the music system, is a programmable device, and the information stored on tape,
or CD is the program, or instructions to help the music system, make sounds.
Similarly microprocessors and
microcontrollers, are programmed to do a job. The job can be changing a TV
channel to controlling complex movements of a robot. All these applications have a microcontroller doing
its specific job. It can be astonishing to find the same microcontroller in the remote control, and the robot.
In one place it is driving an infra-red LED and in other it is driving the motors.
Take another example. Consider plain paper and pencil. Now you have a choice of 26 alphabets, 0-9
numbers and few others like space, full stop etc. that is it. Not much hardware, only paper and pencil, and
not
much choice of letters, just 26 + few more. What you can do with it. You can do miracles. Write a
complete thesis, a poem, a novel, an essay or what not. It all depends how you organize those letters. Using
the pencil and paper. So the same hardware serving thousands of different jobs. The choice of letters are the
instructions you can give, and paper is your microcontroller, whereas pencil is a device through which you
transfer the idea in your mind, to the paper. Once transferred you do not need the pencil,
to use the book, or
notebook.
This example fits exactly on the scenario of microcontrollers and microprocessors. Thus you have to learn
the instructions your particular microcontroller understands, and what those instructions order it to do. Then
its your mind, and ideas how you play with these instructions to get your job done. Literally there are
hundreds of methods to get the same job done. Just like in English, there many ways you can arrange the
alphabets, to convey the same message.
Chia sẻ với bạn bè của bạn: