Blog

Future Learn

Learning programming
can be fun!

Showcase your skill to the world

8051 Interrupts

An interrupt is an event that occurs randomly in the flow of continuity. It is just like a call you have when you are busy with some work and depending upon call priority you decide whether to attend or neglect it.   Same thing happens in microcontrollers. 8051 architecture handles 5 interrupt sources, out of…

8051 Timers

8051 microcontrollers have two timers/counters which work on the clock frequency. Timer/counter can be used for time delay generation, counting external events etc. Clock  Every Timer needs a clock to work, and 8051 provides it from an external crystal which is the main clock source for Timer. The internal circuitry in the 8051 microcontrollers provides a…

8051 Power down and Idle mode

Introduction Power down and Idle mode features are used to save power in microcontrollers. 8051 has inbuilt power saving feature which is useful in embedded applications where power consumption is main constraint. 8051 Power Control Logic 8051 has two power saving mode, Power Down Mode Idle Mode Difference Between Power Down & Idle Mode As…

8051 UART

Serial communication means transfer data bit by bit serially at a time, where as in parallel communication, the number of bits that can be transferred at a time depends upon the number of data lines available for communication. Two methods of serial communication are Synchronous Communication: Transfer of bulk data in framed structure at a…

Getting Started with 8051 and Keil IDE

8051 microcontroller can be programmed in two languages Assembly language C language 8051 microcontroller popular development IDE is MCU 8051 IDE and µVision to develop code. Keil µVision IDE consists, C Compiler – C51.Exe Assembler – A51.Exe Linker/Locator – BL51.Exe Librarian – LIB51.Exe Hex Converter – OH51.Exe Let’s develop simple LED blinking program using Keil…

Introduction to 8051 Controller

Microcontroller consists of all features that are found in microprocessors with additional built in ROM, RAM, I/O ports, Serial ports, Timers, Interrupts and Clock circuits. It is entire computer on single chip which is embedded within applications. Microcontrollers are widely used in many domestic (washing machine, VCD players, microwave oven, robotics etc.) as well as…

Using Logic App for IoT remote monitoring and for sending notifications

Introduction Logic App is an Azure service which provides a way to automate processes as a series of simple steps. It can connect across various services and protocols. It begins with some trigger such as ‘When a certain message is received’, followed by a set of actions like ‘Send mail’. This makes Logic App perfect for monitoring…

Using Web Apps to Visualize Real Time Data from IoT Hub

Introduction Web Apps is an Azure service for hosting web applications, REST APIs, and mobile backends. It allows development in a number of languages such as .NET, Ruby, PHP, etc. Web Apps empowers your application by adding features such as security, load balancing, auto-scaling and automated management to it. It provides DevOps capabilities such as…

Using Power BI to visualize real time data from IoT Hub

Introduction Power BI is a suite of business analytics tools by Microsoft. It can be used to visualize and analyze data from hundreds of data sources and get insights into the data. This makes it useful for visualizing the data received by an IoT hub. We can make use of the various visualization options available…

Saving IoT Hub messages to Azure Blob Storage

Introduction Microsoft Azure provides a cloud service that provides storage that is highly available, secure, durable, scalable, and redundant, under the name of Microsoft Azure Storage. There is no limit on storage capacity and your account is charged depending on the amount of data stored by you. Microsoft Azure Storage provides five types of storages:…

Sending DHT11 sensor data to IoT Hub using NodeMCU

Introduction Azure is a cloud computing service by Microsoft which is widely used for building, testing, deploying and managing applications and services through a global network of data centers that are managed by Microsoft. Azure IoT hub is a cloud service that enables bidirectional communication between devices. This service can be used for connecting various…

Creating an IoT Hub in Microsoft Azure

Introduction IoT Hub is a service provided by Microsoft Azure that can be used to connect, provision and manage millions of IoT devices; communicating large amounts of data per month. IoT Hub acts as a bridge between devices and their solutions in the cloud, allowing them to store, analyze and act on data in real…

Microsoft Azure Free Account Sign-Up

Microsoft Azure is a cloud computing service by Microsoft which is widely used for building, testing, deploying and managing applications and services through a global network of data centers that are managed by Microsoft.  We need to create a Microsoft Azure account to start using the Azure services. Microsoft Azure allows creating a free account…

Introduction to Microsoft Azure

Introduction Microsoft released Azure under the name “Windows Azure” in 2010. It was later renamed to “Microsoft Azure” in 2014. Azure is a cloud computing service by Microsoft which is widely used for building, testing, deploying and managing applications and services through a global network of data centers that are managed by Microsoft. It provides Software…

INTERRUPTS

An interrupt causes a temporary diversion of program execution in a similar sense to a program subroutine call, but an interrupt is triggered by some event, external to the currently operating program. We say the interrupt event occurs asynchronously to the currently operating program as it is not necessary to know in advance when the…

Timer/Counters

The 8051 has two internal sixteen bit hardware Timer/Counters. Each Timer/Counter can be configured in various modes, typically based on 8-bit or 16-bit operation. The 8052 product has an additional (third) Timer/Counter.Figure 1 provides us with a brief refresher on what a hardware counter looks like.This is a circuit for a simple 3-bit counter which…

The 8051 Serial Port

OVERVIEW OF ASYNCHRONOUS SERIAL COMMUNICATIONS RS-232 Serial Communications The EIA RS-232 serial communication standard is a universal standard, originally used to connect teletype terminals to modem devices. Figure (a) shows a PC connected to a device such as a modem or a serial printer using the RS-232 connection. In a modern PC the RS-232 interface…

8051 Microcontroller Overview

INTRODUCTION Figure shows a functional block of the internal operation of an 8051microcomputer. The internal components of the chip are shown within the broken line box Figure 2 shows the external code memory and data memory connected to the 8051chip.Note – part of the external code memory can be located within the chip but we…

Getting Started with Raspberry Pi

To get started with Raspberry Pi, we have to store required OS on SD card. Now to store OS on SD card we need to install OS on SD card. If you want to know how to install/store OS on SD card you can refer Installing Operating System Image on SD card. Here, we installed the…

How to use WiringPi Library on Raspberry Pi

Introduction WiringPi is a library written in C used to access GPIO pins on Raspberry for BCM2835 (Broadcom Processor) SoC (System on Chip). There are various libraries are available to access GPIO in C like bcm 2835, sysfs, pigpio, etc. Here, we are using WiringPi library for Raspberry Pi GPIO access. To use wiringPi, first…

Access Raspberry Pi Home Screen on Laptop Display using LAN(Ethernet)

Introduction Raspberry Pi is a small computer with provision of GPIO accessibility. But in order to access the Raspberry Pi, we need a display to log in and perform other tasks. If we have a Digital display or a TV screen then we can use it to access Raspberry Pi. But, if we don’t have…

Raspberry Pi GPIO Access

Introduction GPIO (General Purpose Input Output) pins can be used as input or output and allows raspberry pi to connect with general purpose I/O devices. Raspberry pi 3 model B took out 26 GPIO pins on board. Raspberry pi can control many external I/O devices using these GPIO’s. These pins are a physical interface between…

Raspberry Pi PWM Generation using Python and C

Introduction PWM (Pulse Width Modulation) is a modulation technique by which the width of pulse is varied while keeping the frequency constant. Through PWM technique, we can control the power delivered to the load by using ON-OFF signal. The PWM signals can be used for applications such as controlling the speed of DC motors, changing…

Raspberry Pi UART Communication using Python and C

Introduction UART (Universal Asynchronous Receiver/Transmitter) is a serial communication protocol in which data is transferred serially i.e. bit by bit. Asynchronous serial communication is widely used for byte oriented transmission. In Asynchronous serial communication, a byte of data is transferred at a time. UART serial communication protocol uses a defined frame structure for their data…

Raspberry Pi I2C

Introduction I2C (Inter Integrated Circuit) is a synchronous serial protocol that communicates data between two devices. It is a master-slave protocol which may have one master or many master and many slaves whereas SPI has only one master. It is generally used for communication over short distance. The I2C device has 7-bit or 10-bit unique…

Python based I2C functions for Raspberry Pi

Let’s see basic Python based I2C functions which are frequently used for I2C communication on Raspberry Pi. While developing program for Raspberry Pi I2C communication in python, we can use SMBus library package which has great support to access I2C devices. So, we should add SMBus support for Python by using apt packet manager, sudo…

Access Raspberry Pi on Laptop using Wi-Fi

Introduction Raspberry Pi is a small computer which needs a display to access Raspberry Pi Home (CLI or GUI). So, we need external display to access Raspberry Pi. If we have display/TV then we can connect Raspberry Pi to the display using HDMI or VGA cable. But, if we don’t have a display, then we…

Using Raspberry Pi 3 On-Board Bluetooth for Communication

Introduction Raspberry Pi 3 has come up with a great on-board feature i.e. the on-board Bluetooth. So, there is no need to for external Bluetooth dongle. This frees up a USB port for other uses, which would otherwise be used up by the Bluetooth dongle. Raspberry Pi 3 has BCM43438 highly integrated single chip which…

Raspberry Pi Introduction

Introduction Raspberry Pi is a small single board computer. By connecting peripherals like Keyboard, mouse, display to the Raspberry Pi, it will act as a mini personal computer. Raspberry Pi is popularly used for real time Image/Video Processing, IoT based applications and Robotics applications. Raspberry Pi is slower than laptop or desktop but is still…

Basic functions related to Time and Interrupts in Arduino

Let’s see some basic functions related to time and interrupts that are frequently used in Arduino IDE. Time Functions a)  millis() This function returns the number of milliseconds passed since the Arduino board started running the current program. This number overflows (rolls back to zero) after approximately 50 days. Value returned by millis is an unsigned…

Basic functions related to Serial Communication in Arduino

Let’s see some basic functions related to serial communication that are frequently used in Arduino IDE. USART a)  Serial.begin(baud_rate) baud_rate: The baud rate that will be used for serial communication. Can be 4800, 9600, 14400, 19200, etc. This function is used to define the baud rate that will be used for serial communication. For communicating…

Basic functions related to startup and GPIO in Arduino

Let’s see some basic functions related to Startup and GPIO that are frequently used in Arduino IDE. Functions at startup a)  setup() This function is called at the beginning of the sketch. It is used for initializing variables, pin modes etc. It runs only once after each power up, or when the Arduino board resets.…

Adding a New Library to Arduino IDE and Using It

Let’s see how to add a library for MPU6050 (Gyroscope + Accelerometer + Temperature) module. Here, we will be using Korneliusz Jarzebski’s MPU6050 library from GitHub. Download this library from here. Download and extract the library and add its folder in the libraries folder of Arduino IDE. Example : See the image given below. The…

Basics to Developing Bootloader for Arduino

Introduction Bootloader, is basically the initial piece of code which runs whenever any micro-controller is powered up or resets. It is similar to the concept of BIOS which run in our PC at the time we power up it. In case of BIOS, it waits for a user input for changing Boot options/settings. If it does not…

Arduino I2C

Intoduction I2C (Inter-Integrated Circuit) is serial bus interface connection protocol. It is also called as TWI (two wire interface) since it uses only two wires for communication. Those two wires are SDA (serial data) and SCL (serial clock). I2C is an acknowledgment-based communication protocol i.e. transmitter checks for an acknowledgment from the receiver after transmitting…

Watchdog Timer in Arduino

The Arduino UNO board has ATmega328P chip as its controlling unit. The ATmega328P has a Watchdog Timer which is a useful feature to help the system recover from scenarios where the system hangs or freezes due to errors in the code written or due to conditions that may arise due to hardware issues. How does…

PWM in Arduino

Introduction Pulse Width Modulation (PWM) is a technique by which width of a pulse is varied while keeping the frequency of the wave constant. It is a method for generating an analog signal using a digital source. A PWM signal consists of two main components that define its behaviour: a duty cycle and a frequency. Duty Cycle of Signal A…

ADC in Arduino

Introduction When we interface sensors to the microcontroller, the output of the sensor many of the times is analog in nature. But microcontroller processes digital signals. Hence, we use ADC in between sensor and microcontroller. It converts an analog signal into digital and gives it to the microcontroller. There are many applications of ADC like…

USART in Arduino Uno

Introduction USART (Universal Serial Asynchronous Receiver Transmitter) is a serial communication protocol used to transmit/receive data serially at a specific baud rate. Several devices such as GPS, GSM, RFID, sensors, etc need to communicate with the microcontroller for transmitting or receiving information. To communicate with the microcontroller, several communication protocols are used such as RS232, SPI,…

Digital GPIO of Arduino

Introduction General-Purpose Input Output (GPIO) is a digital pin of an IC. It can be used as input or output for interfacing devices. If we want to read switch’s state, sensor data, etc then we need to configure it as input. And if we want to control the LED brightness, motor rotation, show text on display, etc…

Arduino UNO R3 Board

The Arduino UNO board is one of the most popular Arduino boards and is a good starting point if it is your first Arduino. The Arduino UNO has undergone a few revisions over the period of time, with the latest board being the Arduino UNO R3. You will not find many significant changes between the…

Using Arduino IDE

The Arduino IDE is very simple and easy to use. Let’s see how to use it with the help of Blink example that comes in the Built-In examples with the IDE. 1.  Open the Arduino IDE from the folder you installed/unzipped it in. 2.  In the File tab, go to the Examples option. Here you…

Getting Started With Arduino Board

A wide range of boards are manufactured by Arduino. These have different sizes, different microcontrollers, and different processing capabilities. For information about the Arduino UNO R3 board, refer the topic Arduino UNO R3 in the basics section of Arduino. You can refer this link to check out the various Arduino boards available. In order to write codes for various…

Introduction to Arduino

What is Arduino ? Arduino platform offers open source hardware and software that is easy to use and is used widely for hobby projects and prototyping. Open Source ? When it is said that Arduino is an open source platform, it means that all the information regarding the hardware and software that Arduino provides is…

SPI in AVR ATmega16/ATmega32

Introduction The Serial Peripheral Interface (SPI) is a bus interface connection protocol originally started by Motorola Corp. It uses four pins for communication. SDI (Serial Data Input) SDO (Serial Data Output) SCLK (Serial Clock) CS (Chip Select) It has two pins for data transfer called as SDI (Serial Data Input) and SDO (Serial Data Output). SCLK (Serial Clock) pin…

Watchdog Timer in AVR ATmega16/ATmega32

Introduction Watchdog Timer (WDT) can be helpful to automatically reset the system whenever a timeout occurs. System reset is required for preventing failure of the system in a situation of a hardware fault or program error. There are countless applications where the system cannot afford to get stuck at a point (not even for a…

Analog Comparator in AVR ATmega16/ATmega32

Introduction ATmega16/ATmega32 based on AVR has two pins for analog voltage compare i.e. AIN0 and AIN1. AIN0 is positive terminal whereas AIN1 is the negative terminal. When the voltage on positive pin AIN0 is higher than negative pin AIN1, ACO bit of ACSR register is set. It is possible to use ADC channels (PA0 to…

EEPROM in AVR ATmega16/ATmega32

Introduction EEPROM is Electrically Erasable Programmable Read Only Memory. It is non-volatile type memory as it holds the data even when power is off. The main advantage of this memory is that controller can read, modify/write this memory in runtime application. So EEPROM can be used for storing sensor values, important parameters etc. with no…

External Hardware Interrupts in AVR ATmega16/ATmega32

Introduction AVR ATmega16/ATmega32 has three external hardware interrupts on pins PD2, PD3 and PB2 which are referred as INT0, INT1 and INT2 respectively. Upon activation of these interrupts, the ATmega controller gets interrupted in whatever task it is doing and jumps to perform the interrupt service routine. External interrupts can be level triggered or edge…

PWM in AVR ATmega16/ATmega32

Introduction Pulse Width Modulation (PWM) is a technique by which width of a pulse is varied while keeping the frequency constant. Why we need to do this? Let’s take an example of controlling DC motor speed, more the Pulse width more the speed. Also there are application like, controlling light intensity by PWM. A period of…

USART in AVR ATmega16/ATmega32

Introduction AVR ATmega has flexible USART, which can be used for serial communication with other devices like computer, serial GSM, GPS modules etc. Before beginning with AVR USART, we will walk though basics of serial communication. Serial data framing While sending/receiving data, some bits are added for the purpose of knowing beginning/ending of data etc.…

Clear Timer on Compare Match (CTC mode) in AVR ATmega16/ATmega32

Introduction Generally, compare mode is used for generating periodic event or for generating waveforms. In compare mode, there is one compare register, where we can set value to compare with the Timer / counter register value. Once the compare value matches with timer / counter register value, compare match occurs. This compare match event can…

Timer Input Capture Mode in AVR ATmega16/ATmega32

Introduction Input capture function is used in many applications such as: Pulse width measurement Period measurement Capturing the time of an event In AVR ATmega32, Timer1 can be used as an input capture to detect and measure events happening outside the microcontroller. Upon detection of a defined event i.e. rising edge or falling edge on…

Timer in AVR ATmega16/ATmega32

Introduction Generally, we use timer/counter to generate time delays, waveforms or to count events. Also, the timer is used for PWM generation, capturing events etc. In AVR ATmega16 / ATmega32, there are three timers: Timer0: 8-bit timer Timer1: 16-bit timer Timer2: 8-bit timer Basic registers and flags of the Timers TCNTn: Timer / Counter Register  …

ADC in AVR ATmega16/ATmega32

Introduction ADC (Analog to Digital converter) is most widely used device in embedded systems which is designed especially for data acquisition. In AVR ATmega series normally 10-bit ADC is inbuilt in the controller. Let us see how to use the ADC of AVR ATmega16 / ATmega32. ATmega16/32 supports eight ADC channels, means we can connect…

GPIO Ports and Registers in AVR ATmega16/ATmega32

Introduction AVR ATmega16 has 32 pins constituting four ports. The ports are listed below :1.  PORT A2.  PORT B3.  PORT C4.  PORT D. Each port has 8 pins. The pins of these four ports can be used as general purpose inputs/outputs. These pins can be configured as input or output using the three I/O registers for each port.These registers…

Getting Started with Atmel Studio

Introduction Atmel, AVR microcontrollers (MCUs) are very easy to use. All AVR microcontrollers require Integrated Development Environment(IDE) such as Atmel Studio. Using this IDE, we can create, compile and debug program on all AVR microcontrollers. Atmel Studio is available free of charge. To download and install latest Atmel studio use this link. Note: There are possibly two…

LPC2148 UART0

Introduction UART (Universal Asynchronous Receiver/Transmitter) is a serial communication protocol in which data is transferred serially bit by bit at a time. Asynchronous serial communication is widely used for byte oriented transmission. In Asynchronous serial communication, a byte of data is transferred at a time. UART serial communication protocol uses a defined frame structure for…

LPC2148 Reset/Stop Timer on Compare Match

Introduction LPC2148 has inbuilt 32-bit timers which count the peripheral clock. Compare any value with Timer Counter (TC) value is one feature available in LPC2148 timers. It’s the same as Alarm watch in which we can set any future time to sound an alarm when it matches the watch time. LPC2148 compare match works in a…

LPC2148 Timer Input Capture Mode

Introduction LPC2148 Timer includes input capture feature, using which we can capture/trap the timer counter value on events like rising edge (positive going) and falling edge (negative going). With this function, we can measure frequency, pulse width, duty cycle of the input signal. For example, suppose we set input capture mode at every rising edge as…

LPC2148 Timer/Counter

Introduction Timer is a specific type of clock which is used to measure the time intervals. It provides/measures the time interval by counting the input clocks. Every timer needs a clock to work. We can provide/measure any time interval if we know the time of one clock period. e.g. Let’s say we have 1 kHz input…

LPC2148 Watchdog Timer

Introduction Watchdog Timer (WDT) can be helpful to automatically reset the system whenever a timeout occurs. System reset is required for preventing failure of the system in a situation of a hardware fault or program error. There are countless applications where the system cannot afford to get stuck at a point (not even for a…

LPC2148 SPI (Serial Peripheral Interface)

Introduction The Serial Peripheral Interface (SPI) is a bus interface connection protocol originally started by Motorola Corp. SPI Interface uses four wires for communication. Hence it is also known as four wire serial communication protocol. SPI is a full duplex master-slave communication protocol. This means that only a single master and a single slave can…

RTC (Real Time Clock) in ARM LPC2148

Introduction Real Time Clock (RTC) is a time counter that counts real time continuously. We can get present time details using RTC. It gives us time as well as date information. RTC is clocked by separate 32.768 KHz oscillator to continuously keep track of current time. RTC is powered either by main system power or…

PWM in ARM LPC2148

Introduction  Pulse Width Modulation (PWM) is a technique by which width of a pulse is varied while keeping the frequency constant. A period of a pulse consists of an ON cycle (HIGH) and an OFF cycle (LOW). The fraction for which the signal is ON over a period is known as duty cycle. Duty Cycle (In %) =  x 100 E.g. Consider…

LPC2148 I2C

Introduction I2C (Inter Integrated Circuit) is serial bus interface connection protocol first invented by Philips Semiconductor (Now NXP Semiconductors). It is also called as TWI (two wire interface) since it uses only two wires for communication. I2C uses handshaking mechanism for communication. Hence, it is also called as acknowledgment based communication protocol. I2Cworks in two…

ADC (Analog to Digital Converter) in ARM LPC2148

Introduction Analog to Digital Converter(ADC) is used to convert analog signal into digital form. LPC2148 has two inbuilt 10-bit ADC i.e. ADC0 & ADC1. ADC0 has 6 channels &ADC1 has 8 channels. Hence, we can connect 6 distinct types of input analog signals to ADC0 and 8 distinct types of input analog signals to ADC1.…

LPC2148 (32-bit ARM7TDMI-S processor) GPIO Ports and Registers

Introduction General-purpose input/output (GPIO) is a pin on an IC (Integrated Circuit). It can be either input pin or output pin, whose behaviour can be controlled at the run time. A group of these pins is called a port (Example, Port 0 of LPC2148 has 32 pins). LPC2148 has two 32-bit General Purpose I/O ports.…

Getting started with ARM LPC2148 using Keil uVision IDE

There are various development environments available in the market for ARM processors. Some of these are mentioned below : CrossWorks for Arm Keil µVision IAR Embedded Workbench We will see how to install and setup the µVision IDE by Keil. We will see the steps that need to be followed for installing this software correctly.…

HOW TO CREATE A WEBSITE

In 2020, anyone can build and design a website without knowing anything about web development, design, or coding. Whether you want to create a website for yourself or for your business, you can easily do that by using the right tools and resources. This step-by-step guide will help you create a website from scratch without…

LPC2148 DAC (Digital to Analog Converter)

Introduction Digital to Analog Converter (DAC) are mostly used to generate analog signals (e.g. sine wave, triangular wave etc.) from digital values. LPC2148 has 10-bit DAC with resistor string architecture. It also works in Power down mode. LPC2148 has Analog output pin (AOUT) on chip, where we can get digital value in the form of…


Follow My Blog

Get new content delivered directly to your inbox.

Design a site like this with WordPress.com
Get started