Documentation 1. Principles and Practices 2. Project Management 3. Computer-aided Design 4. Computer-controlled Cutting 5. Electronics Production 6. 3D Scanning and Printing 7. Electronics Design 8. Computer-controlled machining 9. Embedded Programming 9.1. Microcontroller Assignment
'We join together to take wise decisions, not foolish ones.'
African Proverbs

Embedded Programming

What does the word 'Embedded' mean?

Embedded means something that is attached to another thing. Tutorialspoint further stated that embedded system can be thought of as a computer hardware system having software embedded in it. An embedded system can be an independent system or it can be a part of a large system. An embedded system is a microcontroller or microprocessor based system which is designed to perform a specific task.

An embedded system is summarized as a 'Microcontroller based', software driven, reliable, real-time control system, which has the following three components:

  • 1. It has hardware.
  • 2. It has application software.
  • 3. It has Real Time Operating system (RTOS) that supervises the application software and provide mechanism to let the processor run a process as per scheduling by following a plan to control the latencies. RTOS defines the way the system works. It sets the rules during the execution of application program. A small scale embedded system may not have RTOS.
  • Techopedia defines 'Embedded programming' as a specific type of programming that supports the creation of consumer facing or business facing devices that don't operate on traditional operating systems the way that full-scale laptop computers and mobile devices do. It was also described as as the dominant methodology for microcontroller programming. It involves programming small computers that drive devices. In my little understanding, embedded programming is where embedded systems are enabled to accomplish their intended purpose. It is the avenue where the life, purposes, and limits of the components are defined.

    Characteristics of an Embedded System

    the following are the characteristics of an embedded system (extracted from Techopedia ):

  • 1. Single-functioned − An embedded system usually performs a specialized operation and does the same repeatedly.
  • 2. Tightly constrained − All computing systems have constraints on design metrics, but those on an embedded system can be especially tight. Design metrics is a measure of an implementation's features such as its cost, size, power, and performance. It must be of a size to fit on a single chip, must perform fast enough to process data in real time and consume minimum power to extend battery life.
  • 3. Reactive and Real time − Many embedded systems must continually react to changes in the system's environment and must compute certain results in real time without any delay.
  • 4. Microprocessors based − It must be microprocessor or microcontroller based.
  • 5. Memory − It must have a memory, as its software usually embeds in ROM. It does not need any secondary memories in the computer.
  • 6. Connected − It must have connected peripherals to connect input and output devices.
  • 7. Hardware-Software systems − Software is used for more features and flexibility. Hardware is used for performance and security.
  • One thing that has been said that needed more explanation is the word italicized Microcontroller in paragraph 3 above. Without getting a good hang of this, we can be well assured that our progress in this section will be synonymous to a Tortoise or Snail running a Formula 1

    What is a Microcontroller?

    A microcontroller has been popularly described as a miniaturized computer system, that is a complete computer on a single chip. At their core, microcontrollers have a processor that is similar to the CPU on your computer. The processor reads instructions from a memory space (in flash memory rather than on a hard drive), sends math off to an arithmetic logic unit (instead of a math coprocessor), and stores variables in RAM while your program is running.

    NOTE: Many of these chips have dedicated serial hardware that enables them to communicate to the outside world. In addition, these microcontrollers can be programmed using a variety of programming language, such as Arduino, C, Python, etcetera. What this means is that you can easily escape an avalanche at the peak of winter than escape writing computer understandable codes in this section.

    Coding being one of my Achilles heel, I am determined to turn this weakness to strength with the tasks that follows.

    This codes will include things like variable (global and local variables), functions, loops (for loops, while loops), special keywords such as 'void', data types (such as 'int' - integer, 'float', 'char', etc). In order to write this software codes, you need an Integrated Development Environment (IDE)

    Please kindly download this lovely Ebook AVR Programming, so you can get a better understanding of the task at hand, what is expected of you, and what you can also expect from the components.

    If you are as inquisitive as I am, you should be wondering that what does this 'AVR' letters mean! So to answer my little research question, I did an online search, and learnt the following:

    On Quora , AVR was described as 'a line of 8 bits and 32 bits programmable MicroControllers (uC) Units from Atmel'. It was also described as 'reference to the architecture used on many of Atmel's microprocessors'. It is a family of microcontrollers developed by Atmel ( Reference), Therefore, AVR programming is the process if programming a chip with this architecture.

    With regards to the meaning of the Acronym 'AVR', Wikipedia claimed that 'Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for. However, it is commonly accepted that AVR stands for Alf and Vegard's RISC (Reduced instruction set computing) processor.' To get more information about RISC and CISC, please visit HERE.

    Below you will find a basic illustration of one variety of an AVR Microcontroller (ATMega168). To get more information about this Microcontroller, such as its functionalities, the electronic components that can be integrated with this Microcontroller to accomplish a defined task, and many more, please review the components data sheet Here.

    Figure - ATMega168.
    Figure - ATMega168 variations (Surface Mounted and ).
    Figure - Pin Configuration of ATMega168.

    This ends the explanation section. To view the assignment, click Assignment or simply go to the assignments sections below.