Embedded Programming

8-Week Task

individual assignment: read a microcontroller data sheet, program your board to do something, with as many different programming languages and programming environments as possible
group assignment: compare the performance and development workflows for other architecture

Introduction



What is a Micro-controller?

A microcontroller is a small, low-cost and self contained computer-on-a-chip that can be used as an embedded system. A few microcontrollers may utilize four-bit expressions and work at clock rate frequencies, which usually include:
An 8 or 16 bit microprocessor.
A little measure of RAM.
Programmable ROM and flash memory.
Parallel and serial I/O.
Timers and signal generators.
Analog to Digital and Digital to Analog conversion
Microcontrollers usually must have low-power requirements since many devices they control are battery-operated. Microcontrollers are used in many consumer electronics, car engines, computer peripherals and test or measurement equipment. And these are well suited for long lasting battery applications. The dominant part of microcontrollers being used now a days are implanted in other apparatus.


Types of Micro-controller

The microcontrollers are characterized regarding bus-width, instruction set, and memory structure. For the same family, there may be different forms with different sources. Following are the some basic families of microcontroller
LOGIC
Megaprocessor
8051
PIC
MSP
AVR
ATtiny412, ATtiny45V, ATtiny1614, ATtiny44A, ATtiny3216, ARM
D11C, D11D, D21E, D51 Xtensa
ESP8266 ESP32 RISC-V
PSoC
xCORE
Propeller
Lattice
NVIDIA

Difference between Micro-controller and Micro-processor

Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers such as Intel’s Pentium 1,2,3,4, core 2 duo, i3, i5 etc. These microprocessors don’t have RAM, ROM, and other peripheral on the chip. A system designer has to add them externally to make them functional. Application of microprocessor includes Desktop PC’s, Laptops, notepads etc.

Microcontroller has a CPU, in addition with a fixed amount of RAM, ROM and other peripherals all embedded on a single chip. At times it is also termed as a mini computer or a computer on a single chip. Microcontrollers are designed to perform specific tasks. Specific means applications where the relationship of input and output is defined. Depending on the input, some processing needs to be done and output is delivered. For example, keyboards, mouse, washing machine, digicam, pendrive, remote, microwave, cars, bikes, telephone, mobiles, watches, etc. Since the applications are very specific, they need small resources like RAM, ROM, I/O ports etc and hence can be embedded on a single chip. This in turn reduces the size and the cost.

AVR Micro-controller

AVR microcontroller is an electronic chip manufactured by Atmel, which has several advantages over other types of microcontroller. AVR microcontroller comes in different configuration, some designed using surface mounting and some designed using hole mounting. It is available with 8-pins to 100-pins, any microcontroller with 64-pin or over is surface mount only. AVRs are generally classified into following:
tinyAVR – the ATtiny series
megaAVR – the ATmega series
XMEGA – the ATxmega series.

Individual Assignment

The task for the week in individual assignment is to read a microcontroller data sheet, program your board to do something, with as many different programming languages and programming environments as possible. So here on my board i am using ATtiny44A IC, so i read the datasheet of this microcontroller. This is week somewhat typical to me, because i dont know anything about programming and its different languages and Due to COVID-19, there is lockdown in India, from 22 March to 31 March and it may be extend. So i am at home and i dont h*0-ave lab access. So for simulation i have used simulation software. When i went to my lab, then i will try it on my board.

Datasheet of ATtiny44A

First page of the datasheet, shows the feature of this microcontroller.


The i read the pin configuration, here the ATtiny44A has 14 pin, where 1pin for VCC and 1 pin for GND, A port has 8 pin and B port has 4 pin, all is the I/O pin.




The block diagram of ATtiny44A .


Different languages for Embedded Programming

The list showing the 15 best embedded programming languages
1. C
2. C++
3. Java
4. Python
5. Rust
6. Ada
7. JavaScript
8. Go
9. Lua
10. B#
11. Assembly Language
12. C#
13. Verilog
14. VHDL
15. Embedded C++

Arduino Board Coding

Arduino code is written in C++ with an addition of special methods and functions, which we’ll mention later on. C++ is a human-readable programming language. When you create a ‘sketch’ (the name given to Arduino code files), it is processed and compiled to machine language.The Arduino Integrated Development Environment (IDE) is the main text editing program used for Arduino programming. It is where you’ll be typing up your code before uploading it to the board you want to program. Arduino code is referred to as sketches. Here i used the Tinkercard software for learning this language and its simulation. The Tinkercard is a Autodesk free software which is used for Simulation and programming Arduino and breadboard components. It will use standard modules to build complex circuits. Firstly i used the blink programm with different high and low time.



What problem i have faced?

What i learn?

I am learn about

Download my original file here

Go to the top