Automated Water Level Controller Using Microcontroller AVR

Conserving water by tuning water levels using microcontroller AVR

This is a simple project to control the level of water in an overhead tank. The peculiarity of this project is that it can detect up to 9 water levels when compared to the standard version of water level control.

  • The sensing is done by using nine probes placed at 9 different locations of the tank.
  • Level 0 denotes zero implying a waterless tank whereas level 8 implies that the tank is full.
  • The probe that is common is put at the bottom of the tank.

SALIENT FEATURES:

  1. If the level of water reaches under minimum detectable level, The LCD displays level ‘0’ indicating emptiness whereas level 8 indicates full tank followed by a buzzer.
  2. The total number of transistors involved in this apparatus is 8.
  3. This project finds important applications in home electronic devices such as water cooler, where there is a danger of motor-burnout when no water exists in a radiator.
  4. Can alternatively also be used in indicating the fuel levels within a machine or device.

BASIC DIAGRAM FOR WATER LEVEL CONTROLLER

DESIGN:-

    A stable 5V power supply is fed to the microcontroller circuit.

  • The given circuit has nine conducting probe indicators.
  • The transistors are connected to PORTB of the microcontroller.
  • Seven segment display is connected to PORTD of the variable
  • The level 8 indicated by the full tank is shown on Seven segment display along with a buzzer sound.
3 MAJOR CONDITIONS:

CASE 1- WATERLESS

In this condition, microcontroller will be in active low implying that (0-2V) will be considered high whereas 3-5V will be considered low for the microcontroller.

  • Since there is no conductive path between 8 indicating probes and the common probe transistor(BE)Base-emitter region will not have sufficient voltage to operate.
  • Therefore it remains in the cut off region.
  • The output from transistor becomes 4.2 V which is low by microcontroller hence it will show value 0 on Seven segment display.

CASE 2 – INTERMEDIATE LEVELS(Levels 3-7):

  • Here the microcontroller acts as priority encoder mode which senses the bit input having the highest priority and then shows the matching water levels on the 7 segment display.

CASE 3 – FULL TANK:

  • When the overhead tank is completely filled the microcontroller goes into the conduction state.
  • The corresponding output is fed to the microcontroller.
  • Therefore not only the water level ‘8” displayed on the seven segment but also the output voltage activated a buzzer device which then cuts off the water supply thereby saving water.

ADVANTAGES:-

  1. Cheap maintenance cost
  2. Hassle-free installation
  3. More convenient to use
  4. Ergonomic design
  5. Reduces manpower
  6. Efficiently saves water
  7. Robust and compact
  8. Fully automatic
  9. Prevents seepage of roofs and walls by avoiding leakage of water
  10. No drying of pump and saves electricity.

WATER LEVEL PROJECT APPLICATIONS:

  1. In huge companies employing water tanks
  2. Commercial complexes
  3. Drainages
  4. Apartments

C Program to Swap two Variables Without Using Third Variable.

Write a  C program to swap two variables without using the third variable.

Consider we have two variables a and b containing some number. We are asked to swap the values without using a third variable. For example, if in your C program you have taken two variables a and b where a = 10 and b = 20, after swapping it will become  a =20 and b = 10.

Here is the source code of the C program Swap two variables without Using the third variable. The C program is successfully compiled.

C Programming code :

#include<stdio.h>

#include<conio.h>

Void main()

{

int a=10,b=20;

Clrscr();

Printf(“before swapping a=%d \t b=%d”,a,b);

a=a+b;

b=a-b;

a=a-b;

Printf(“after swapping”);

Printf(“A=%d \t B=%d”,a,b);

}

Automatic Street Light Controller Using Atmega8 AVR chip

AUTONOMOUS STREET LIGHTS ON SENSING KINETIC ENERGY OF VEHICLE:
INTRODUCTION:

Energy can neither be created nor destroyed. It can only be converted from one form to another. Therefore it must be saved efficiently and utilized to its utmost potential.

We see the application of street lights every night making our city look colourful every night. The light energy emanating from these light should be used efficiently in order to save energy.

On our planet earth the resources available naturally are depleting gradually very day, so we must look for secondary options reliable enough to uphold the future.

PRINCIPLE:

  • This contraption consists of the following components:-
  1. Passive infrared sensor(PIR sensor)
  2. Atmega8 controller
  3. Real time clock(RTC)
  4. A collection of Light emitting diodes(LED)
  5. Light dependent resistor(LDR)
  • The light on street are activated based on the light energy input(solar on the LDR)
  • The resistance value reaches to maximum value during midnight.ere the RTC plays it’s vital role in clocking time.
CIRCUIT DESIGN :

The primary materials involved in this project are:-

  • ATMEGA controller
  • PID sensor
  • RTC(DS1307)
  • LCD
  • LDR

The pin known as PD0 of microcontroller is connected to the PIR sensor. Each and every form of objects emit some infrared rays.

The initial state of PIR sensor will be in high condition. After the process of detection of Infrared rays it makes transition to low state.

COMPONENTS DESCRIPTION:

1.REAL TIME CLOCK:

  • It employs I2C transmission protocol.(2 way data transmission -master to slave, slave to master) between any two separate devices.
  • The first and second pins are interfaced with the oscillating crystal.
  • The third pin is connected to battery source.
  • Sixth pin is connected to PC5 of microcontroller.
  • Fifth pin is connected to PC4 pin of microcontroller.

2.Liquid  Crystal Display:

  • The only role of a LCD is to display characters(16 letters x 2 rows).
  • The information from the Real time clock is shown here.
  • This process is continuous till it approaches a fixed time (5 am/6am)

3.Light Dependent Resistor:

  • They have low resistance in morning and a very high resistance in the dark.
  • It is interfaced with the microcontroller through ADC0 pin of the ATmega8 microcontroller.
  • LDR creates analog information(waves) which are then converted into digital information by the Analog Digital Converter (ADC).

3.ATmega8 (8051 microcontroller AVR):

  • The microcontroller needs an external clock to be activated.
  • Within the reset region of the microcontroller, the following components are embedded:-
  1. 10 microfarad capacitor
  2. 10 kilo ohms resistor
  3. Push button for active high or active low condition
  • The provision of an external pin is to get external memory while grounded. Therefore this pin is connected to VCC via 10 kilo ohm resistor.

4. IR MODULE:

  • This is the most crucial section of the apparatus
  • There are two main components involved:-
  1. IR Transmitter
  2. IR receiver
  • The job of the transmitter is to continuously transmit Infrared rays until an obstruction comes forward.
  • 8 IR Transmitters along with corresponding 470 ohm current limiting resistor (CLR) is connected to power supply.
  1. Light emitting diodes:
  • Finally the LED’s have to be interfaced with the microcontroller through Port 2.
  • The base of the 2n2222 transistors are connected to the LED’s whereas the emitter of the transmitters are grounded.
  • One LED  along with a series 100 ohms current limiting resistor is interfaced with the collector terminal of the corresponding  transistors.
ACTIVATION OF CONTRAPTION:
  1. Turn on the power
  2. The Liquid crystal display displays digital information from RTC
  3. Keep the LDR in dark conditions.
  4. Then the ATmega8 monitors time continuously for fixed timings in coding.
  5. After the fixed time limit is set then the  street lights go off.
  6. You can test the motion sensor by placing your hand next to the sensor
  7. After a few seconds lights turn back on again.
REAL TIME APPLICATIONS:
  1. Can be employed on highways, narrow roads , express routes.
  2. In congested parking areas next to multi complex, cinema theatre.
ADVANTAGES:
  • Due to autonomous programmed operation a lot of useful energy can be saved.
  • Cost and maintenance for LED’s are much less so more savings.

C Program to Create a Linked List with insert node, delete node, update, print and open file

Write a C Program for linked list to display a menu containing the following functions:-update, print,deletenode,addnode and finally open file.

In this C Program, we will create a linked list & display the elements in the list. The linked list is an ordered set of data elements, each containing a link to its successor. This program is to create a linked list and display all the elements present in the created list.

C Programming Code

void init(struct honda *ptr3, int a);

int update(struct honda *ptr1);

int print(struct honda *ptr2);

int  add (struct honda *ptr);

int delnode(struct honda *ptr);

int delopr (struct honda *ptr);

int addnode(struct honda *ptr);

int display_data(struct honda *ptr4);

int update_scan(struct honda *scan1);

int update_print(struct honda *print1);

int delete (struct honda *ptr);

int numofel(struct honda *ptr);

int file_open(struct honda *ptr);

int file_write(struct honda *ptr);

int (*functptr[7])(struct honda *ptr1)={update,print,update_scan,update_print,delnode,addnode,file_open};

 

int main()

{

int n=0,l;

struct honda *head, *ptr;

int a,b;

head=(struct honda *)malloc(sizeof(struct honda));

ptr=head;

printf(“Enter the value of n\n”);

scanf(“%d”,&n);

 

init(ptr,n);

ptr=head;

display_data(ptr);

return 0;

}

 

void init(struct honda *st1, int no)

{

int i;

struct honda  *st2;

 

st1->back=’\0′;

st1->front= (struct honda*)malloc(sizeof(struct honda));

 

for(i=1;i<no;i++)

{

st2=st1;

st1=st1->front;

st1->back=st2;

st1->front=(struct honda *)malloc(sizeof(struct honda));

}

st1->front=’\0′;

}

int addnode(struct honda *ptr)

{

struct honda *headc,*copy,*newptr;

headc=ptr;

ptr=headc;

newptr=ptr;

int p,i,num;

num=numofel(ptr);

printf(“There are %d number of nodes\n”,num);

printf(“Enter the place for the node to be added\n”);

scanf(“%d”,&p);

if(p<=num)

{

for(i=1;i<=p;i++)

{

ptr=ptr->front;

}

copy=ptr->front;

newptr=ptr->front=(struct honda*)malloc(sizeof(struct honda));

ptr->back=ptr;

newptr->front=copy;

copy->back=newptr;

printf(“Done\n\n”);

}

else

{

printf(“Please select between 0 and %d\n”,num);

}

num=numofel(headc);

printf(“%d\n”,num);

return 0;

}

 

int file_open(struct honda *ptr)

{

char name;

char data[50]= {“Hi my name is Kevin I am an engineer” };

int p;

char *dptr1,*dptr2,*temp;

dptr1=data;

dptr2=data;

struct honda  *copy;

FILE *ftr;

size_t s,n;

copy=ptr;

ftr=fopen(“hello.txt”,”r+”);

if(ftr==’\0′)

{

printf(“Failed\n”);

return 0;

}

printf(“Opened\n”);

s=fread(data,1,1000,ftr);

 

AVR Based Embedded Systems

EMBEDDED AVR FAMILY

Introduction:

Basically, it is an 8-bit Reduced instruction set computer microcontroller device manufactured by the company ATMEL.

This peculiar architecture was proposed by two Norwegian students and was again remodified at ATMEL Norway.

ATMEL Norway was like the subsidiary of ATMEL manufactured by two intelligent architects.

DEVICE MEMORY:

The Architecture of devices employed into these devices employed a re-modified Harvard architecture.

Memory Features:

  1. The internal memory was utilized for program data and program instructions.
  2. External memory was completely left free.
  3. Quicker access and enhanced capacity were achieved by employing separate buses for data and program instructions.
  4. Each memory was located on a single chip on the CPU core cut each Memory is separated from each other.
  5. E.g.Address 0 contained within program memory is unique from the address 0 within data memory.
TYPES OF AVR FAMILIES:-
  • AVR classic
  • Tiny AVR
  • Mega AVR
Basic Components:

1.GPIO(General purpose Input Output Registers):

Each port has specifically three registers:-

1.) DDRx

2.) PORTx

3.) PINx

2.RESET PIN

  1. The Reset pin within the AVR family is mainly active low pin which resets the computing processor and all of it’s related peripherals.
  2. AVR’S also comprises of a watchdog timer that resets the CPU itself after count finish(0 to FF(255)).

USES OF RESET PIN:

  1. Debugging General Purpose Input Output Registers
  2. In system serial Programming.

3.INTERRUPTS:

  • This architecture of AVR’S can support multiple interrupts
  • Some signal filtering or debounce logic must be applied as button bounce issues can arise at any time.
  • Many of the modern AVR’S have a dedicated interrupt pin INT0.
  • The older versions could produce an interrupt on a low, high or falling edge of any signal.
  • Each specific interrupt creates a jump or transition with In memory address.
  1. TIMER/COUNTERS:
  • They have at least ONE 8-BIT COUNTER known as timer
  • In normal mode, the counter counts from zero to FF(Rollover) and sets the flag bit(TF0)
  • The CTOC(Clean Timer on Compare mode ):- Allows timer to be cleared when matching a corresponding value in the register before the timer proceeds to the highest value and overflows.

5.EEPROM:-

  1. It is non- volatile in nature(non-erasable).
  2. They can be re-written with a minimum number of 100,000 times.
  3. Each  Electronic Erasable Programmable read-only memory is FF16.
  4. Most of the AVR’S have encountered an error while writing data to address 0 so ATMEL suggested avoiding that address, especially during unintentional power outage conditions.

6.FUSE SETTINGS:-

  1. The Fuse is essentially an EEPROM bit that has various pins assigned and certain low-level functions.
  2. They contain features before the chip can come out of the RESET stage and start computing instructions.
  3. Usually, these fuse settings are used:-
  • Crystal Oscillator strength
  • JTAG pins
  • Reset pin
  • Brownout voltage-trigger points and Brown out detect enable
TYPES OF PROGRAMMING INTERFACES:

1.) IN SYSTEM PROGRAMMING:

It is done with the aid of Serial Peripheral Interface.

2.) HIGH VOLTAGE SERIAL PROGRAMMING:

Mostly the backup mode on smaller AVR’s

3.) HIGH VOLTAGE PARALLEL PROGRAMMING:

Backup mode on larger AVR’S.

4.) BOOTLOADER SECTION:

A vast majority of the ATMEL chips have a separate bootloader memory region. Here the reprogrammed code resides.

At power on, the bootloader runs- first and takes the decision whether to boot the main program or to initiate reprogramming code.

Various types of memories in AVR microcontrollers:

  1. Electronic Erasable Programmable read-only memory(EEPROM)
  2. Fuse Bits
  3. Flash Memory
  4. Data memory comprising:-
  • Registers
  • Input/Output Registers
  • SRAM

SIMULATION:

The application of software can be an effective means of assistance before implementing the actual physical hardware design.

Debugging interface is absent.

The software packages that provide the property for simulation are:-

  • VM lab
  • Proteus
  • AvRora

ATMEL Studio makes use of assembly level language to manipulate the internal registers within the AVR core.
HAP sim: A collection of virtual devices that connect to AVR studio

TYPES OF COMMUNICATION:

SERIAL COMMUNICATION:-

  • They support a wide range of serial communication protocols such as:-

1.Universal Asynchronous Receiver Transmitter

a.)Universal:-Utilized in different serial communication devices.

b.)Synchronous:- In the same clock cycle serial communication is done.

c.)Asynchronous:- Transfer takes place without clock signal but becomes same on the data signal.

d.)Receiver:- AVR gets data through hardware

e.)Transmitter:- Hardware will transfer serial data.

SPI(Serial Peripheral interface):-

It comprises the master to slave serial protocol having a clock input(synchronous).

The three main components are:-

  • Master in Slave out
  • Master out slave in
  • Serial clock

Since the transfer of serial data takes place forth and back SPI interface is known as a bidirectional shift register.

Disadvantage:-

The master can only assign as many as slaves as the number of extra output pins provides, it cannot simply exceed. This is achieved by utilizing a different decoder.

RS-232 ( UART protocol ):-

  1. This particular specification calls for a negative voltage.
  2. This type of communication permit voltages from +3v to +15v and -3V to -15V.
  3. It has a comparatively shorter transmission cable length.
  4. RS-482 enables long distance
  5. Speeds include 20 Kbps for every 15 meters(50 feet)

TWO WIRE INTERFACE:

  • This is known as I2C
  • Comprises of two main wires for communication namely:-
  1. Serial Clock(SCA)
  2. Serial data(SDA)
  • It uses a common ground for connection in a way that all the existing devices must be at equal ground potential to avoid ground loops.
  • E.g The AVR’S Two-wire interface can behave either as slave or master and transmit data at 400 kbits/s.

PARALLEL COMMUNICATION:

  • An example of parallel communication is the transfer of data within USB connected from printer to computer.(6 m distance)
CONJOINT HARDWARE:
  • In addition to the existing peripherals(UART, ADC, SPI) AVR’S also incorporates the following hardware components:-

1.)LCD driver:-

  • For E.g in the AVR Butterfly, an LCD is integrated.
  • The module performs exact timing to display pixels forward and backward at the same rate.

2.)US Interface:-

  1. AT90USB series employ various USB functions such as:-

(I)   On the  GO

(II)  USB host(interfacing with slave)

(III) USB slave

2. If no internal USB is there then an external USB can be  interfaced

3.FOr little functionality and lower speeds, the only firmware is needed.

3.)Temperature sensor:

  • The modern AVR models comprise a temperature sensor module hooked with the  ADC(Analog Digital Converter)

PROTOCOL ISSUES AND REQUIREMENTS:-

  • These three above mentioned protocols( I2C, RS232, SPI) are only defined by the number of bits or bytes transferred.
  • They point to the physical layer of the Operating System.
  • The SPI in case of power failures it should be able to recover data and must employ a wide range of functions.
  • The protocol must be able to resynchronize the transmitter and receiver in case of power outages so the beys of data transferred are not lost.

DEBUGGING INTERFACES:

1.) Join test action group(JTAG):

It gives access to an on-chip property of debugging.

Various types of JTAG are:-

  • AVR Dragon
  • JTAGICE mkll
  • JTAGICE adapter

2.) DebugWIRE

Was unable to deliver the four secondary pins responsible for debugging(JTAG).

FIRMWARE PROGRAMMING:

If the firmware is absent then there is not much a microcontroller can do.

A number of languages can be used for coding purposes namely:-

  1. C
  2. C++

  3. 3 AVR assembly language
  4. Python

C Program to Perform Arithmetic Operations Using Function Pointer

Write a C Program to perform the basic four arithmetic operations on two variables  5 and 10 using function pointer?

C program to perform basic arithmetic operations which are addition, subtraction, multiplication, and division of two numbers entered by a user.
There are five basic arithmetic operators found in C language, which are addition(+), subtraction(-), multiplication(-), division(/) of two numbers. All arithmetic operators usually compute the result of the particular arithmetic operation and return its result.
In this program, we calculate all basic arithmetic operation based on user’s input values and display the result.

C Programming Code

#include<stdio.h>

int add(int a, int b);

int sub(int a , int b);

int mul(int a, int b);

int div(int a ,int b);

int  (*fun)(int a, int b);

int add(int a, int b)

{

return a+b;

}

int sub(int a , int b)

{

return (a-b);

}

int mul(int a, int b)

{

return(a*b);

}

int div(int a ,int b)

{

return (a/b);

}

int main()

{

int i;

int  (*fun)(int a, int b);

fun=add;

i=fun(5,10);

printf(“%d\n”,i);

fun=sub;

i=fun(5,10);

printf(“%d\n”,i);

fun=mul;

i=fun(5,10);

printf(“%d\n”,i);

fun=div;

i=fun(5,10);

printf(“%d\n”,i);

}

How to Replenish Power Supply from Natural Resources to Mains(AC) to Maintain Power in an Electrical System

Replenishing Power supply from natural resources to mains(AC) to maintain Power in an Electrical system

ABSTRACT:

The primary objective of this project is to inject uninterrupted power supply to the mains of a power system by restoring power from any alternative resources such as an inverter, solar, wind or any such means. Primarily The 8051 microchip is being utilized in this project. The power coming out is fed to the relay IC section. If the mains stop working then the next alternative resource is utilized which could be a wind turbine, solar panel and so on. The present working state is displayed on the LCD screen.

BLOCK DIAGRAM:

DESCRIPTION OF COMPONENTS INVOLVED:

1.TRANSFORMER:

It is used to convert 230V AC to DC current according to instrument specifications.

2.RECTIFIER:

A device that allows AC current to be converted into the Direct current which flows in one direction only.

3.OPTO-ISOLATOR:

It is a device that sends signals that are generated electrically between two separate devices.

4.THYRISTOR:

It is a semiconducting device which has the properties of a bistable switch. The conducting stage of this device starts as soon as the gate pin is triggered that is only in the reverse bias mode.

5.ZERO CROSSING DETECTOR:

It is a comparator with reference level set a zero. It is a device used to find the initial zero-point crossing of AC current input.

6.LIQUID CRYSTAL DISPLAY:

It is an electronic device used for displaying characters or binary digits. This device uses the application of light-modulating properties.

7.8051 MICROCONTROLLER:

It is a chip that employs Harvard architecture primarily used in embedded systems for interfacing various devices.

HARDWARE REQUIREMENTS:

1.) 8051 series microcontroller

2.) Voltage regulator

3.) Capacitors, Resistors, LED

Software requirements:

1.) Embedded C

2.) Keil Compiler

REAL-TIME APPLICATIONS:

1.) In suburban home.

2.) Coastal settlements.

C Program to add two dimensional matrices

Write a C program to add two-dimensional matrices by fixing the row and column size as 2 using macros?

Multi dimensional array are those type of array, which has a finite number of rows and a finite number of columns. The 2-dimensional array is declared by
Data_type Array_name [row size][column size];

This program takes two matrices of order r*c and stores it in a two-dimensional array. Then, the program adds these two matrices and displays it on the screen.

C Program Code

#include<stdio.h>
#include<stdlib.h>
#define m 2
int main()
{
int i,j;
int a[m][m],b[m][m],c[m][m];
void add(int(*)[m]);

printf(“Enter the elements of matrix 1:”);
for(i=0;i<m;i++)
{
for(j=0;j<m;j++)
{
scanf(“%d”,a[i][j]);
}
}
printf(“Enter 2nd matrix elements:”);
for(i=0;i<m;i++)
{
for(j=0;j<m;j++)
{
scanf(“%d”,b[i][j]);
}
}
printf(“The sum of 2 entered matrices is :”);
for(i=0;i<m;i++)
{
for(j=0;j<m;j++)
{
printf(“%d”,c[i][j]);
}
printf(“\n”);
}
void add(int c[m][m])
for(i=0;i<m;i++)
{
for(j=0;j<m;j++)
{
c[i][j]=a[i]+b[i][j];
}

}

 

What is Embedded ARM(Acorn RISC Machine)

EMBEDDED ARM(acorn RISC machine):

It is so called ARM as it is discovered by the British company ARM holdings.

This architecture can be specifically useful for supercomputers as it is very efficient in multitasking.

This is particularly reduced set instruction computer. It is used a lot and prominent in 32-bit architectures.

Some prominent types of ARM processors:

1.) ARM11

2.) ARM9

3.) ARM7TDMI

The company constantly releases an update in order to tweak any possible bugs(errors) in the manufactured systems.

Reduced Instruction set computers employ a very few transistors compared to Complex instruction set computer.

By the year of 2017 ARM processors was globally dominating the market on a very large scale selling over 101 billion units.

ORIGINS:

The ACORN computer had realized how to step up the game from simple MOS technology to the ones used by IBM. Several patents were licensed by ACORN from Hitachi.

ACORN (ARM-2):

Officially THE ACORN company release ARM in the year of 1982. The primary goal of this upgrade was to obtain low latency handling like the 6502 processor.

The primary  ARM application was acting as a secondary processor.

ARMv6(Advanced Reduced instruction set computer):

There had been a collaboration between Apple and VLSI technology to make an even more advanced  ARM core structure known as ARMv6 which was released in 1992.

While operating at a 233MHZ frequency the machine drew only 1 watt of power.

ARMv6 comprised of 35,000 transistors as opposed to the transistor count of 30,0000 in ARMv2.

PROCESS OF DEBUGGING:

Most of the ARM processors in the 21st century allows to perform operations such as:-

1.) Break pointing of code

2.) Halting

3.) Stepping

These provisions were made possible by the aid of oin test action group (JTAG)  support.

Within ARMv7TDMI “D” denoted the debug provision whereas “I” denoted the IDE module(embedded).

INSTRUCTION ENHANCEMENT WITH DSP:

For the purpose of enhancing digital signal processing multimedia applications, a new set of instructions.

This was denoted by the addition of letter “E” to the architecture model. E.g. ARMv5TEJ.

They included updated instruction sets based on unique arithmetic operations.

COPROCESSORS:

There are basically 16 coprocessors available within an ARM.

Only the hardware is integrated by the chip designers using coprocessors.

Single Instruction Multiple Data(SIMD):

This came into prominence just before the advanced SIMD instruction(NEON) used nowadays.

PIPELINING:

The later versions of the ARM including the ARMv7 architecture comprised of a 3- stage pipelining process.

The current ARMv8 core architectures involve a 13 stage complex pipelining process in order to enable a quick adder and better decision predictor logic.

E.g. ARMv7TDMI and ARMv7DI were examples of the enhanced multiplier and therefore the “M” in HDMI suggests Multiplier.

ADVANCES SDMI(NEON):

It is a union of  64 and 128-bit SDMI instruction set that facilitate standard media acceleration and  applications involving signal processing.

It can execute MP3 audio decoding process.

It performs SDMI processes as well as intensive gaming and graphical tasks on the processor.

It has the ability to support:-

1.) 8-bit integer

2.) 16- bit integer

3.) 32-bit integer

4.) 64-bit integer

5.) 32-bit floating point data

They Have exactly the same hardware registers such as Virtual floating pointers(VFP).

Most common ARM ARCHITECTURES:

ARM 7:

The most commonly used architecture ARMv7A comprises of:-

APPLICATION PROFILE:

Used by 32- bit cores in cortex and other non-arm cores.

REAL-TIME PROFILE:

Used by 32-bit cores in the Cortex- R series collection.

MICROCONTROLLER PROFILE:

Used by most 32 – bit cores in the Cortex – m series collection.

ARMv8A (32/64 bit architecture):-

In this architecture(Aarch) the fundamental change includes the addition of 64 – bit architecture.

Apple company was the first to be employed in the android phone i-phone 5s.

The main advantage of this architecture was that 32-bit processes could function normally on a 64-bit Operating system.

THUMB INSTRUCTION SET:

In order to enhance the density of code compilation, some processors such as the ARMv7TDMI had employed the thumb instruction set.

Salient features of Thumb instruction set:

1.)The ARM instruction coding is done using  16- bit decoding system.

2.)Makes system optimization much easier.

3.)The data path in Gameboy is accessed through 16 – bit secondary data path which makes it convenient to put together the thumb code for the system.

SECURITY FOR ARM architecture:

Few of the ARM architectures such as ARMv6kzKZ emplots Trustzone technology which is like a secondary option to the security available on SOC.

Implementation of trust zone:- E.g. Open Virtualization

APPLICATIONS OF ARM:

They found applications in the following devices:-

1.)Personal Digital Assistants

2.) I-Pads

3.) Nintendo game console

4.) Portable media player(IPAD)

5.) Notepads

6.) Car navigation systems

MOBILE OPERATING SYSTEMS WITH ARM:

  • Android
  • Windows phone 

32 bit operating systems with ARM:

  • Debian
  • Ubuntu

 

64 bit operating systems with ARM:

  • Linux
  • Windows 10 (currently supports 32 bit (x86), 32 bit ARM, will support 64- bit ARM in future)

C program to opening, writing, and closing a file using file operation

Write a program to open a file using file operations and then add new data to the existing file and finally close it?

In this tutorial, you will learn how to Write a C program to open a file then add new data to the existing file and finally close it.
What is a File in C language?
A file represents a sequence of bytes on the disk where a group of related data is stored. A file is created for permanent storage of data. It is a readymade structure.

The function “fopen” opens a file and associates a stream with that opened file. You need to specify the method of opening the file and the filename as arguments.
After a disk file is read, written, or appended with some new data, you have to disassociate the file from the specified stream. This is done by calling the “fclose” function:

C Programming

#include<stdio.h>

int main()
{
char data[50]={“Hello I am kevin”};
char *dptr1,*dptr2,*dptr3;

FILE *ftr;
size_t s,n;

ftr = fopen(“hel.txt”,”w+”);

if (ftr==0)
{
printf(“File open failed \n”);
}

else
{
printf(“file open successfully\n”);
}

n=fwrite (data,10, 1,ftr);

printf(“hi my fwrite fun had written %ld bytes\n”,n);

fclose (ftr);

return 0;

}

En-Query

Your Name*
Subject*
Phone Number*
Email Address*

Message*