EMBEDDED AIRCARD

EMBEDDED AIRCARD

INTRODUCTION:

  • Suppose we are unable to connect to the internet as no wi-fi source is available we have to connect to public network.

FEATURES:

  • It gives you access wherever you are able to use your mobile network.
  • Usually some of them are equipped with antennae to enhance cellular reception.

FIg 1. SIERRA WIRELESS AIRCARD(EMBEDDED)

MODEM:

  • We usually connect to a modem via a wireless router in order to receive data on your device.
  • The modem acts as the gateway to the internet.
  • So basically this aircard is the modem which is embedded into your wireless device such as laptop which acts as a gateway to the internet.

AIRCARD SUBSCRIPTION:

  • As most users are aware of this they need to pay a bundle sum of money to renew the subscription plan every month from the activation of the data plan on the user’s device.
  • This price is mostly fixed and when the allotted amount of data as per subscription plan is exhausted the user is charged extra for the extra amount of MB/GB(Network Data unit) usage.

CONVENIENCE:

  • They enable users to have more hasslefree high speed network on their devices wherever they travel to.
  • It can immediately access to another network without any delay.
  • Based on cellular network availability wherever the mobile tower is present u can connect in those regions.
  • Wireless radios require a wireless network(Hotspot or public network)  in order to connect whereas an aircard does not.

NETWORKS AND VARYING SPEEDS:

  • Obviously using an aircard on a 4g network will provide blazing speeds when compared to using an aircard on a 3g cellular network.
  • However based on differences between cellular networks sometimes 3g cellular networks may provide more speed than 4g networks.

Embedded AT sim 800

Embedded AT sim 800

 

Embedded AT is  used for customer purpose to do the secondary development on SIM800 series modules. The relative API function, operating environment and resources are provided by SIMCom.

The SIM800 is completely Quad band GPRS/GSM solution in SMT type. As inside the SIM800 module series the customer’s app code runs, the external host can be saved.

The customer’s codes basically implemented by Embedded AT and embedded AT provides multiple threads which allows the customer to run many different subtasks.

Embedded AT mainly consists of two parts, one is the core system which is the main program,second one is   customers’ program namely the Embedded application.

the module’s main features and API for customer program are provided by the Core system. The main features contains file system manipulation,standard AT commands,, timer control, peripheral API and some of the common system API.

The Function Description of  Multi Threads

The multi thread platform provides the multi threads function, supports one main thread and the 8 sub threads , which are mainly used to communicate with system for example the receive system .once the condition is triggered the suspended thread which has a highest priority will be called first than the running thread which has a lowest priority.

The Applications of Timer are:

  • Embedded AT provides timer interfaces for following usage
  • Timers for the customers.
  • There are two types of timers,one is 16 ms-grade timers and other is 1 μs-grade timer.
  • Interface to set the thread sleep.
  • Interface to get and set system time & date.
  • Interface to obtain the main time difference between two points.

EAT platform provides an interface by managing an array to realize memory initialization, allocation and release. The Memory space which is to be released and applied dynamically can be defined by array flexibly.

The Embedded AT functions:

  • Send and receive AT commands.
  • Timer.
  • GPIO configuration.
  • FLASH Operation.
  • SPI Operation.
  • UART operation.
BLINKING LED USING PIC MICROCONTROLLER (PIC16F887A)

BLINKING LED USING PIC MICROCONTROLLER (PIC16F887A)

Introduction:

  • PIC Microcontroller was manufactured by General instrument’s Microelectronics.
  • It was initially named as Peripheral Interface Controller and was later known a Programmable intelligent computer.
  • They were ready to be used by the year of 1976 and was went on to  sell more than 10 billion units by 2014.
  • They are employed in a  wide variety of embedded systems in the modern world today and very popular amongst hobbyists and industrialists.
  • Earlier versions of PIC  unfortunately had ROM and EPROM  only.

ARCHITECTURE/HARDWARE FEATURES:

  • PIC16F887A employs the Harvard architecture.
  • Lack of external memory interface.
  • Watchdog timer
  • Different RC oscillator configurations
  • SRAM

ADVANTAGES:

  1. Smaller instruction set
  2. Reduced instruction set.
  3. Inexpensive microcontrollers.
  4. Supports different protocols I2C,UART, SPI.

LIMITATIONS:

  • Just one accumulator.
  • Register bank switching required to access complete RAM of devices.

PROTEUS DIAGRAM FOR INTERFACING 8 LEDs with PIC16F887A

EXPLANATION OF DIAGRAM(PROTEUS):

  • Here pins 13 and 14 of the PIC Microcontroller are connected to an RC oscillator via two capacitors each measuring 22PF.
  • The MCLR pin 1 of the microcontroller is connected to a resistance  of 10K Ohm.

C programming code:

void main()
{
 TRISB.F0 = 0; //Makes PORTB0 or RB0 Output Pin

 while(1) //Infinite Loop
 {
   PORTB.F0 = 1; //LED ON// RBO pin of port b is toggled
   Delay_ms(1000); //1 Second Delay
   PORTB.F0 = 0; //LED OFF
   Delay_ms(1000); //1 Second Delay is given after each blink of led

}
}

 

CONNECTIONS DIAGRAM:

WORKING VIDEO LINK:

https://drive.google.com/open?id=1kTGGRc2SNaavx33qqTrdbpweHKa2C_6z

Use of Linux in Embedded

Use of Linux in Embedded

 

Linux as a free software, get a great deal of development, embedded systems and Linux combination is increasingly being optimistic. Linux has its own set of tool chain, easy to create your own embedded system development environment and cross-operating environment, and embedded system development across the simulation tools obstacles. Linux kernel has a small, high efficiency, open source.

Linux device drivers can be either built into the kernel itself, or can be built as modules. When built into the kernel, the device driver is always loaded and ready to be used. If built as a module, the device driver will have to be installed before attempting to use the device. This can be done automatically using scripts, manually from the command line, or the kernel can automatically load modules as needed.

 

Embedded Linux is increasingly popular Linux operating system modified so that it can be cut in the embedded computer system running an embedded Linux operating system on the Internet not only inherited the unlimited resources but also has embedded the open source operating system characteristics.

 

Advantages of linux as an embedded system

 

Linux can be applied to a variety of hardware platforms. Linux uses a unified framework to manage the hardware, from one hardware platform to another hardware platform changes and the upper application-independent.

Linux can be freely configured, does not require any license or business relationship, the source code is freely available. This makes the use of Linux as the operating system does not have any copyright disputes, which will save a lot of development costs.

Linux is similar to kernel-based, with full memory access control, supports a large number of hardware and other characteristics of a common operating system. All of its open source program, anyone can modify and GUN General Public License issued under. In this way, developers can customize the operating system to meet their special needs.

Linux users are familiar with the complete development tools, almost all Unix systems applications have been ported to Linux. Linux also provides a powerful networking feature, a variety of optional window manager (X Windows).

The linux powerful language compiler GCC, C++, etc. can also be very easy to get, not only sophisticated, but easy to use.

The advantages of embedded Linux over embedded operating systems include multiple suppliers for software, development and support; no royalties or licensing fees; a stable kernel; the ability to read, modify and redistribute the source code. The disadvantages is a comparatively large memory footprint complexities of user mode and kernel mode memory access.

Now lets see in which all embedded system linex is used.

 

Nspire CAS CX Calculator: This is a simple calculator yet powerful. It is ia an ARM based graph calculator that is powered by Linux.

Linux has proved itself to be a more stable operating environment; its functions are stable enough that seldom does one encounter screen freezes, repeated boot-ups, etc.

The Linux OS handles different functions through the kernel in a different way compared to Windows. This creates a faster system that is even closer to UNIX (it actual parent system).

Smart Tv: Ubuntu is powering Smart Tv.

 

Different versions of  Linux

Blue Cat Linux at http://www.lynuxworks.com,

Hard Hat Linux at http://www.mvista.com,

RT-Linux at http://www.rtlinux.com,

ThinLinux at http://www.thinlinux.org,

White Dwarf Linux at http://www.emjembedded.com/linux/dimmpc.html, and

Linux Embedded at http://linux-embedded.com.

Embedded Abbreviation

Embedded Abbreviation

EMBEDDED ABBREVIATIONS:

Let’s see some of the abbreviations which are used in embedded c.

We have different abbreviation for embedded  in different fields.

 

Abbreviation

EMB-Embedded

ET-Embedded Training

EOC-Embedded Operations Channel

E.S -Embedded Solutions

eVB – EMbedded Visual Basic

ES – Embedded System Technology

EC -Embedded Connectivity

EL-Embedded Linux Linux

EWS-Embedded Web Server
 
EP-Embedded Passives Capacitor

EMBD-Embedded Technology

EMBDD-Embedded

EMBED-Embedded Drawing

EA-Embedded Address

EP -Embedded Profile

What is Structures in C Programming

STRUCTURES IN C PROGRAMMING

DEFINITION AND INTRODUCTION:

A structure is a user-defined datatype in C language which allows us to combine data of different types together.

  • Consider an example If I have to record the particulars of a student then I need to collect his name, age, gender, etc. Then I would have to do this for each student.
  • It is almost similar to an array with the exception that an array encompasses data of similar type.
  • The major difference between an array and structure is that a structure can uphold data of totally different types which makes it more user-friendly to program.
  • Inside a structure, data is collected in the form of records.

Defining a structure:

  • The specific keyword struct is used to define any structure.

STRUCTURE SYNTAX:

Struct[structure_name]

{

[structure_objects];

}

DECLARING STRUCTURE VARIABLES SEPARATELY:

struct student

{

char name[20];

int age;

Char name;

Char gender;

};

DECLARING STRUCTURE OBJECTS:

struct student

{

char name[20];

int age;

Char name;

Char gender;

} St1,St2;

  • Here St1 AND St2 are the objects /variables to the structure student as defined by the user.

Accessing structure members:

  • These elements can be accessed in many amounts of ways.
  • Therefore assignment can be done in multiple ways.
  • For the successful assignment of any value to an object within a structure, the member of the structure has to assigned to a specific operator known as dot operator/period operator.

EXAMPLE:

#include<stdio.h>

#include<string.h>

struct student

{
char name[25];

char branch;

Int age;

char gender;

};

Int main()

{
struct student s1;

s1.age=34;

strcpy(s1.name,”KEVIN”);

printf(“Age of student s1 is %d”,s1.age);

printf(“name of student s1 is %s”,s1.name);

return 0;

}

INITIALIZATION IN STRUCTURE:

  • If you want to directly initialize the structure variables u can do in the following format:-

Void main()
{

Struct Patient

{

float height;

int weight;

Int age

};

Struct patient p1= {6.5, 35,24};

}

ARRAY OF STRUCTURE:

  • Here each individual element of array will represent a structure variable/member.
  • Consider for example STRUCT employee emp[10].
  • This basically denoted that there is a maximum of 10 employee objects for the structure called employee.

NESTED STRUCTURE:

  • There is another condition called nested structure which basically implies a structure contained within a structure.

EXAMPLE:

STRUCTURE 1 STUDENT ADDRESS:

struct stu_address

{

Int street;
Char *state;

Char *state;

Char *country

}

STRUCTURE 2 : STUDENT DATA:

Struct stu_data

{

int stu_id;

Int stu roll no;

Struct stu_address stu_add;

}

Here stu_add is declared as an object common to both structures.

USE OF TYPEDEF IN STRUCTURE:

  • The primary function of this typedef is to make the program a lot legible and easier.
  • It is like an alternative form of structure.

EXAMPLE:

CODE WITHOUT USING TYPEDEF

struct home_add

{

int street;

char *state;

char *country;

char *town;

};

struct home_add var;

var.town = “agra”;

CODE WITH TYPEDEF:

typedef struct home_add

{
int street;

Char *state;

Char *country;

Char *town;

};addr;

addr var;

var.town = “agra”;

STRUCTURE AS FUNCTION ARGUMENTS:

#include<stdio.h>

Struct student

{
Char name[20];

Int roll no;

}

void show(struct student st);

Void main()

{

Struct student std;
printf(“\n Enter the student record name\n:”);

scanf(“%s”,std.name);

printf(“\nEnter the student roll number\n”);

scanf(“%d”,&std.roll no);

show(std);

}
void show(struct student st)

{

printf(\n”Student name is %s\n”,st.name);

printf(“\nStudent roll number is %d”,st.roll no);

}

Keypad Interfacing with Seven Segment Display Through 8051 Microcontroller-7 Segment Display Code in C Programming

Keypad Interfacing with seven segment display through 8051 microcontroller

INTRODUCTION:

  • This project corporates the simple interfacing between the popular 4 x 4 keypad matrix with a single seven segment display in order to manually input numbers or ASCII characters on the seven segment display.
  • Here the idea is to display any letter on the 7 segment display according to the keypad pressed.
  • In this way we can manually display string of characters or numbers.

Which is the idea after all.

KEYPAD MATRIX:

  • The keypad matrix is used for interfacing with the seven segment .
  • It is 3 x 3 matrix keypad with each key having a specific value as designed by the programmer.
  • Alternatively a keypad predefined with symbols can also be interfaced with the seven segment display through 8051 microcontroller board.

SOURCE CODE:

#include<reg51.h>

sbit R0= P1^0;

sbit R1= P1^1;

sbit R2= P1^2;

sbit R3= P1^3;

sbit C0= P1^4;

sbit C1= P1^5;

sbit C2= P1^6;

void seg(unsigned int);

void main()

{

R0=R1=R2=R3=1;

R0=0;

if (C0==0)

seg(0xF9);

R0=R1=R2=R3=1;

R1 =0;

if (C1 ==0)

 seg(0xA4);

R0=R1=R2=R3=1;

R2=0;

if(C2 == 0)

 seg (0xB0);

R0=R1=R2=R3=1;

R1=0;

if(C0== 0 )

seg (0x99);

R0=R1=R2=R3=0;

R1 = 0;

if (C1==0)

seg(0X92);

R0=R1=R2=R3=0;

R1 = 0;

if (C2==0)

seg(0X82);

R0=R1=R2=R3=0;

R2 = 0;

if (C0==0)

seg(0XF8);

R0=R1=R2=R3=0;

R2 = 0;

if (C1==0)

seg(0X80);

R0=R1=R2=R3=0;

R2 = 0;

if (C2==0)

seg(0X90);

R0=R1=R2=R3=0;

R3 = 0;

if (C1==0)

seg(0XC0);

}

void seg (unsigned int ch)

{

P2=0x00;

P2 = ch;

}

Proteus simulation program:

Explanation:

  • Here there are  three seven segment displays interfaced with the hex keypad through 8051.
  • By using proteus simulation diagram we can pre predict whether the circuit is working or not.
  • When different keypads are switched the corresponding number is displayed(0- 9 range).

CONNECTION DIAGRAM:

WORKING:

  • Initially the microchip is placed onto the ACP slot after dumping the code in it.
  • A 9V  power supply is used to power up the circuit on desire.
  • Then the 9th pin  of the microcontroller is connected to the 5V supply before powerup of the circuit.
  • After powering on the circuit the reset pin is connected to ground.
  • Whereas the four rows (R0 – R3) are connected to corresponding pins of Port 1 of ATS9852 microcontroller chip as well as the three columns (C0 – C2).
  • Secondly the channel port, in this case is the Port 2 of the microcontroller.
  • The port 2 is interfaced with the 8 segments(a-g and h for decimal) of single seven segment display component.
  • Finally the common pins of the seven segment can be either shorted and given a separate 5v connection or just one common pin can be connected to ground if reset pin is given to 5V pin on the board.

CONNECTION VIDEO:

Click here to see the video.

4×4 Keypad Interfacing with 8051 Microcontroller – Tutorial with C Programming

4X4 KEYPAD INTERFACING WITH 8051 MICROCONTROLLER

INTRODUCTION:-

  • We know that Keypads are very common amongst the widely used technology present in today’s generation.
  • They are very important as they are used to interface with various electronic devices employed in security purpose.
  • Examples of keyboard interfacing devices:-
  1. Calculators
  2. Telephones
  3. Automatic teller machine.
  • So basically there will be 16 pin input connection as a total of 16 switches will be interfaced with the Liquid Crystal display via the 8051 microcontroller device.

SOURCE CODE:

#include<reg51.h>

#define display_port P2   //Data pins connected to port 2 on microcontroller

sbit rs = P3^2;  //RS pin connected to pin 2 of port 3

sbit rw = P3^3;  // RW pin connected to pin 3 of port 3

sbit e =  P3^4; //E pin connected to pin 4 of port 3

sbit C4 = P1^0; // Connecting keypad to Port 1

sbit C3 = P1^1;

sbit C2 = P1^2;

sbit C1 = P1^3;

sbit R4 = P1^4;

sbit R3 = P1^5;

sbit R2 = P1^6;

sbit R1 = P1^7;

sbit DB0 = P2^0;

sbit DB1 = P2^1;

sbit DB2 = P2^2;

sbit DB3 = P2^3;

sbit DB4 = P2^4;

sbit DB5 = P2^5;

sbit DB6 = P2^6;

sbit DB7 = P2^7;

void msdelay(unsigned int time)  // Function for creating delay in milliseconds.

{

unsigned i,j ;

for(i=0;i<time;i++)

for(j=0;j<1275;j++);

}

void lcd_cmd(unsigned char command)  //Function to send command instruction to LCD

{

display_port = command;

rs= 0;

rw=0;

e=1;

msdelay(1);

e=0;

}

void lcd_data(unsigned char disp_data)  //Function to send display data to LCD

{

display_port = disp_data;

rs= 1;

rw=0;

e=1;

msdelay(1);

e=0;

}

void lcd_init() //Function to prepare the LCD  and get it ready

{

lcd_cmd(0x38);  // for using 2 lines and 5X7 matrix of LCD

msdelay(10);

lcd_cmd(0x0F);  // turn display ON, cursor blinking

msdelay(10);

lcd_cmd(0x01);  //clear screen

msdelay(10);

lcd_cmd(0x81);  // bring cursor to position 1 of line 1

msdelay(10);

}

void row_finder1() //Function for finding the row for column 1

{

R1=R2=R3=R4=1;

C1=C2=C3=C4=0;

if(R1==0)

lcd_data(‘1’);

if(R2==0)

lcd_data(‘4’);

if(R3==0)

lcd_data(‘7’);

if(R4==0)

lcd_data(‘*’);

}

void row_finder2() //Function for finding the row for column 2

{

R1=R2=R3=R4=1;

C1=C2=C3=C4=0;

if(R1==0)

lcd_data(‘2’);

if(R2==0)

lcd_data(‘5’);

if(R3==0)

lcd_data(‘8’);

if(R4==0)

lcd_data(‘0’);

}

void row_finder3() //Function for finding the row for column 3

{

R1=R2=R3=R4=1;

C1=C2=C3=C4=0;

if(R1==0)

lcd_data(‘3’);

if(R2==0)

lcd_data(‘6’);

if(R3==0)

lcd_data(‘9’);

if(R4==0)

lcd_data(‘#’);

}

void row_finder4() //Function for finding the row for column 4

{

R1=R2=R3=R4=1;

C1=C2=C3=C4=0;

if(R1==0)

lcd_data(‘A’);

if(R2==0)

lcd_data(‘B’);

if(R3==0)

lcd_data(‘C’);

if(R4==0)

lcd_data(‘D’);

}

void main()

{

lcd_init();

while(1)

{

    msdelay(30);

    C1=C2=C3=C4=1;

      R1=R2=R3=R4=0;

      if(C1==0)

      row_finder1();

      else if(C2==0)

       row_finder2();

       else if(C3==0)

    row_finder3();

    else if(C4==0)

    row_finder4();

}

}

KEYPAD CONNECTION DIAGRAM:

 

KEYPAD LOGIC:

  • Initially all switches are assumed to be released.
  • When any of the switch is pressed the corresponding row and column are short circuited.

STEP 1:

  • Write all logic 0’s to all the rows whereas logic 1’s to all the columns.

NOTE:

BLACK –>Logic 0

Red      –> Logic 1

STEP 2:

  • The job of the software is to scan the pins connected to that position. If a key is pressed logic 0 is driven to C2 due to short circuiting with the logic 1 of the corresponding row( R2) to the pressed keypad switch.

STEP 3:

  • As soon as the key has been pressed in column C2, the software’s job is to write the logic 1’s to each row sequentially until C2 becomes high.
  • The value written to that row will be reflected in that column as short circuit  will happen at that junction.

STEP 4:

  • The logic in C2 remains high until high logic from a row meets the pressed button in C2.
  • Therefore the pressed key was detected at position (2,2) of the matrix keypad.
  • After successful detection of the pressed key it’s our job to assign some corresponding value which may be either a numeral or an ASCiI character.

8051 FEATURES AND SPECIFICATIONS:

  • 10 kilo ohm resistor and 10 microfarad will provide the necessary Power on reset (POR) for the 8051 mc.
  • Secondly the 12 MHz crystal oscillator provides the necessary clock signal to the microcontroller.

CONNECTIONS:

  • According to the connections I have given, the keypad connections were given to Port 1 of the 8051 microcontroller.
  • Secondly the three pins namely Register select, REad/Write and Enable pins  are given to the pins P3.2, P3.3 , P3.4 respectively.
  • Finally last but not the least the data pins namely DB0-DB7 of the Liquid Crystal Display(LCD) are connected to the port P2 (P2.0-P2.7).
  • The port 0 has no internal pull up resistors so it has to be pulled by external 10 kilo ohm resistor.

Video

Click here to see a short video of Cursor Blinking.

Click here to see a short of Displaying Numeral 1 Through LCD:

LCD Interfacing with 8051 Microcontroller

Liquid crystal display interfacing with 8051 Microcontroller

INTRODUCTION:

  • It is a popular technology employed in various electronic devices as of the modern century.
  • It makes use of the light properties of liquid crystals.

ADVANTAGES:

  1. They consume less light than LED.
  2. They have more input connections compared to LED.
  3. Constant backlight and it works on the principle of blocking the light instead of emitting it, thus displaying the characters.

 

INTERFACING LCD WITH 8051:

  • The LCD can be interfaced with 8051 microcontroller chip to display many characters or strings in different languages.
  • It is employed in many public areas for displaying shop logos or boards so that it makes it attractive.
  • The corresponding connections are given.

CONNECTION PROCEDURE:

  1. Initially the connections are made as per the pin description table above.
  2. The reset pin( 9th pin) of the micro-controller is connected to the 5V port initially before powering on the circuit.
  3. After powering on the reset pin is connected to ground to enable the displaying of letters.
  4. My name is given as the string to be displayed on the LCD screen.
  5. The LCD initialisation process takes place first after that command is given for cursor and positioning cursor.
  6. Finally the data is displayed using PORT  of the micro-controller with a delay of 50 ms between each letter of “KEVIN MATHEW”.
Program for LCD Interfacing with 8051 Microcontroller (AT89S52)

#include<reg51.h>

#define display_port P1 //Data pins connected to port 2 on microcontroller

sbit rs = P0^2;  //RS pin connected to pin 2 of port 3

sbit rw = P0^3;  // RW pin connected to pin 3 of port 3

sbit e =  P0^4;

sbit DB0= P3^0;

sbit DB1 = P3^1;

sbit DB2= P3^2;

sbit DB3=P3^3;

sbit DB4 =P3^4;

sbit DB5 =P3^5;

sbit DB6=P3^6;

sbit DB7 =P3^7;//E pin connected to pin 4 of port 3

 

void msdelay(unsigned int time)  // Function for creating delay in milliseconds.

{

unsigned i,j ;

for(i=0;i<time;i++)

for(j=0;j<1275;j++);

}

void lcd_cmd(unsigned char command)  //Function to send command instruction to LCD

{

display_port = command;

rs= 0;

rw=0;

e=1;

msdelay(1);

e=0;

}

void lcd_data(unsigned char disp_data)  //Function to send display data to LCD

{

display_port = disp_data;

rs= 1;

rw=0;

e=1;

msdelay(1);

e=0;

}

void lcd_init() //Function to prepare the LCD  and get it ready

{

lcd_cmd(0x38);  // for using 2 lines and 5X7 matrix of LCD

msdelay(10);

lcd_cmd(0x0F);  // turn display ON, cursor blinking

msdelay(10);

lcd_cmd(0x01);  //clear screen

msdelay(10);

lcd_cmd(0x81);  // bring cursor to position 1 of line 1

msdelay(10);

}

void main()

{

unsigned char a[15]=”KEVIN MATHEW; //string of 14 characters with a null terminator.

int l=0;

lcd_init();

while(a[l] != ‘\0’) // searching the null terminator in the sentence

{

    lcd_data(a[l]);

    l++;

    msdelay(50);

}

}

Click here to see the video of LCD Interfacing with 8051 Microcontroller

En-Query

Your Name*
Subject*
Phone Number*
Email Address*

Message*