EMBEDDED C TUTORIAL
I sincerely apologize for posting this tutorial late. This is due to situations outside of my control. please, accept my apologies.
Welcome
to the Trinnex electronics tutorial on embedded C. In this tutorial, I will be
explaining the nitty-gritty of Embedded C, What Embedded C is all about.
Note,
you cannot separate embedded C from microcontrollers. The purpose of embedded C
is for microcontrollers. We will also be doing some little electronics. As a
matter of fact, some electronic components will be attached to the
microcontroller. You need to get your electronics components like ; bread board
, jumper wires , resistors, relays, DC supply or battery , voltage regulator,
transistors, switches and of essence, Microcontroller. I will let you know when to get them ready.
Today
I will be giving just a simple introduction to the world of microcontrollers
and Embedded C. Telling you what embedded C and Microcontroller is all about.
Before
the next the tutorial, you need to get the following available; A personal
computer, MPLABX IDE, XC8 compiler, PROTEUS simulating software preferable,
Proteus 8.0 .You should also get the user guide for the softwares. It will be
of great help. All this are all available for download on the internet,
surprisingly for free!!!. So no excuses
for not getting them. The compiler and the IDE is available on microchip
website WWW.MICROCHIP.COM. Yes, there are other
compilers, IDEs and simulator, but the one that will be used for this tutorial
are the ones mentioned and stated above.
There
is one important thing I have to also mention. The knowledge of C++ is also
required. The book I used in learning
C++ is titled “C++ A Beginner’s Guide by
Herbert Schildt”. it was a great resource material to me. I still make
references to it whenever I have to. I advise you get it. Almost all that is
applicable to C++ is also applicable to embedded C. I can confidently say that,
the world of Embedded C or The world of programming is always a world of
possibilities. All that is required is diligent thinking and practice. Thinking
in the sense that you just always have to think of ways to get things done. You
can probably spend days even months trying to figure out how to go about a
project. Diligent practice means you must always devote time, every day to
practice. The more you practice, the better you become, there is a law that says if you can spend 10,000 hours on your area of
expertise, you become one of the top personalities in that field. So,
practice everyday!!!
Let’s
take a look into the microcontroller. What is a microcontroller? It is a topic
that cannot be exhausted here. A
microcontroller is a computer control system on a single chip. It has many
electronic circuits built into it, which can decode written instructions and
convert them to electrical signals. The microcontroller will then step through
these instructions and execute them one by one. As an example of this, a
microcontroller could be instructed to measure the temperature of a room and
turn on a heater if it goes cold. Microcontrollers are now changing electronic
designs. Instead of hard wiring a number of logic gates together to perform
some function we now use instructions to wire the gates electronically. The
list of these instructions given to the microcontroller is called a program.
I can
say, knowing how to program and use a microcontroller is a great virtue that
every electronics engineer must possess. It exposes you to a world of
possibilities. Come to think of it, your phone, camera, fridge, car etc. all
have microcontrollers embedded in them. What varies might be the complexity of
the microcontroller, but that does not change it from been a microcontroller.
Example of the more complex form of microcontroller are the field programmable
logic arrays. You can read about that during our personal studies.
Embedded
C in my own simple terms, can be said to be the act of embedding your C written
codes into your microcontroller, in the form of hex files, with the help of a
programming device. After the program is written in C, the compiler helps to
convert the written C program into a hex file. The programmer then, burns the
hex file into the microcontroller. The major task here is knowing how to write
the code that will be embedded into the microcontroller. The next tutorial will
explain that.
This
is just an introductory tutorial. Hope you enjoyed it. Next tutorial will be
available a week to this time.
Your
comments and questions are all highly welcomed. You can forward them to
trinnexelectronics@gmail.com. Thank you.
Comments