• 1

    ..

  • 2

    ...

  • 3

    ...

Tuesday, 12 June 2012

EMBEDDED PROGRAMMING BASIC PROGRAMS




           EMBEDDED PROGRAMMING















                     SQUARE WAVE GENERATOR                    




AIM:
      To develop the source code for square wave generator using Keil µ vision and to implement it using Proteus tool.


THEORY:
      One requirement in a wide range of applications is a spontaneous source of some continuous signal, having a regular and definable wave shape. One of the most important of these is a square wave.
     The circuit to the right uses a comparator with both positive and negative feedback to control its output voltage. Because the negative feedback path uses a capacitor while the positive feedback path does not, however, there is a time delay before the comparator is triggered to change state. As a result, the circuit oscillates, or keeps changing state back and forth at a predictable rate.













SOURCE CODE:

#include<regx51.h>
sfr out1=0x90;
sfr out2=0xa0;
sfr out3=0xb0;
unsigned int i;

void main()
{
out1=out2=out3=0x00;
while(1)
  {
    out1=out2=out3=0xaa;
    for(i=0;i<25000;i++);
    out1=out2-out3=0x55;
    for(i=0;i<25000;i++);
  }
}




















RESULT:
 Thus the source code for square wave generator is written using Keil and implemented in Proteus and verified.   













                   BCD TO SEVEN SEGMENT DISPLAY



AIM:
      To develop the source code for BCD to seven segment display using Keil µ vision and to implement it using Proteus tool.

THEORY:
     A 7-segment display is a form of electronic display device for displaying decimal numerals that is an alternative to the more complex dot-matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters, and other electronic devices for displaying numerical information.
The seven segments are arranged as a rectangle of two vertical segments on each side with one horizontal segment on the top, middle, and bottom. The segments of a 7-segment display are referred to by the letters A to G, where the optional DP decimal point (an "eighth segment") is used for the display of non-integer numbers.


BCD I/P
SEGMENT O/P
DISPLAY
g f e d c b a
0   0   0   0
0 1 1 1 1 1 1
0
0   0   0   1
0 0 0 0 1 1 0
1
0   0   1   0
1 0 1 1 0 1 1
2
0   0   1   1
1 0 0 1 1 1 1
3
0   1   0   0
0 1 1 0 0 1 1
4
0   1   0   1
1 1 0 1 1 0 1
5
0   1   1   0
0 0 1 1 1 1 1
6
0   1   1   1
0 0 0 0 1 1 1
7
1   0   0   0
1 1 1 1 1 1 1
8
1   0   0   1
1 1 0 0 1 1 1
9











SOURCE CODE:

#include<regx51.h>
sfr out=0xA0; //P3
sfr inp=0x90; //P1
unsigned char temp;
unsigned char const lookup[10]=
           {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};

void main()
{
out=0x00;
inp=0xFF;
while(1)
  {
     temp=inp & 0x0F;
     if(temp>=0x0A)
          out=0x00;
     else
          out=~(lookup[temp]);
  }
}

















RESULT:
     Thus the source code for BCD to seven segment display is written using Keil and implemented in Proteus and verified.   











                 TWO SEVEN SEGMENT DISPLAY


AIM:
     To develop the source code for two seven segment display using Keil µ vision and to implement it using Proteus tool.

THEORY:
      There are two types of LED 7-segment displays: common cathode (CC) and common anode (CA). The difference between the two displays is the common cathode has all the cathodes of the 7-segments connected directly together and the common anode has all the anodes of the 7-segments connected together. Shown below is a common anode seven segment.

      As shown above all the anode segments are connected together. When working with a CA seven segment displays, power must be applied externally to the anode connection that is common to all the segments. Then by applying a ground to a particular segment connection (a-g), the appropriate segment will light up. An additional resistor must be added to the circuit to limit the amount of current flowing through each LED segment.
     A common cathode seven segment is different from a common anode segment in that the cathodes of all the LEDs are connected together. For the use of this seven segment the common cathode connection must be grounded and power must be applied to appropriate segment in order to illuminate that segment.

















SOURCE CODE:

#include<regx51.h>
sfr out1=0xa0;
sfr out2=0xb0;
#define max 36000
unsigned int i, temp=0x00;
unsigned char const lookup[10]=
                         {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};
void main(void)
{
out1=0x00;
out2=0x00;
while(1)
{
    if(temp!=100)
       {
          out1=~(lookup[temp/10]); //MSB
          out2=~(lookup[temp%10]);          //LSB
          for(i=0;i<max;i++);
          temp++;
      }
  else
  temp=0x00;
}
}












RESULT:
    Thus the source code for two seven segment display is written using Keil and implemented in Proteus and verified.   
















                       3 PHASE USING TIMER


AIM:
     To develop the source code for 3 phase timer using Keil µ vision and to implement it using Proteus tool.

THEORY:
In electrical engineering, three-phase electric power systems have at least three conductors carrying voltage waveforms that are 2π⁄3 radians (120°, 1⁄3 of a cycle) offset in time. In this article angles will be measured in radians except where otherwise stated.

Let x be the instantaneous phase of a signal of frequency f at time t:


Using this, the waveforms for the three phases are,



where VP is the peak voltage and the voltages on L1, L2 and L3 are measured relative to the neutral.











REGISTER DESCRIPTION:

TMOD : Counter/Timer Mode Register

·         GATE : Permits INTx pin to enable/disable counter.
·         C/T    : Set for counter operation, reset for timer operation.
·         M1, M0 :
00 : Emulate 8048 counter/timer (13-bits).
01 :16-bit counter/timer.
10 : 8-bit auto-reload mode
11 :Timer 0  = two 8-bit timers.


TCON : Counter/Timer Control Register

·         TF1, TF0 : Overflow flags for Timer 1 and Timer 0.
·         TR1, TR0 : Run control bits for Timer 1 and Timer 0. Set to run, reset to hold.
·         IE1, IE0 : Edge flag for external interrupts 1 and 0. Set by interrupt edge, cleared when interrupt is processed.
·         IT1, IT0 : Type bit for external interrupts. Set for falling edge interrupts, reset for 0 level interrupts.

TL0/TH0 : Timer 0 Low byte & Timer 0 High byte. These two SFRs, taken together, represent timer 0. This increments for each clock cycle.












SOURCE CODE:
#include<regx51.h>
sbit r=0xA0;     //P2.0
sbit g=0xA1;    //P2.1
sbit b=0xA2;    //P2.2
void delay(void);

void main(void)
{
  r=g=b=0;

  while(1)
   {
     r=1;
    delay();

    r=0;g=1;
    delay();

    g=0;b=1;
    delay();
    b=0;
  }
}

void delay()
 {
   TMOD=0x01;
   TH0=0xE6;
   TL0=0x37;
   TR0=1;
   while(TF0==0);
   TF0=0;
}






RESULT:
    Thus the source code for clock using timer is written using Keil and implemented in Proteus and verified.   





CIRCUIT SCHEMATIC & OUTPUT:








                     REAL TIME CLOCK USING TIMER



AIM:
     To develop the source code for clock using timer using Keil µ vision and to implement it using Proteus tool.


THEORY:
     
A clock is an instrument used to indicate, keep, and co-ordinate time. The word clock is derived ultimately (via Dutch, Northern French, and Medieval Latin) from the Celtic words clagan and clocca meaning "bell". A silent instrument missing such a mechanism has traditionally been known as a timepiece. In general usage today a "clock" refers to any device for measuring and displaying the time. Watches and other timepieces that can be carried on one's person are often distinguished from clocks.
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time. Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time.

REGISTER DESCRIPTION:

IE : Interrupt Enable Register

·         EA      : Global interrupt enable.
·         ES      : Serial interrupt enable flag
·         ET1    : Timer 1 interrupt enable flag.
·         EX1    : External interrupt 1 (INT1) interrupt enable flag.
·         ET0    : Timer 0 interrupt enable flag.
·         EX0    : External interrupt 0 (INT0) interrupt enable flag.








SOURCE CODE:
#include<regx51.h>
sfr min1=0xB0;   //P3
sfr min10=0x90; //P1
sfr sec1=0xA0;   //P2
sfr sec10=0x80; //P0
unsigned int MIN,SEC,a=0x00;
code unsigned char const lut[]=
                    {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90};
void main(void)
 MIN=SEC=0;
 IE=0x82;
 TMOD=0x01;
 TR0=1;
 while(1)
  {
sec10=~(lut[SEC/10]);
sec1=~(lut[SEC%10]);
min10=~(lut[MIN/10]);
min1=~(lut[MIN%10]);
  }
}
void t0_isr(void) interrupt 1
{
 a++;
 if(a==15)
        {  a=0x00;
           SEC++;
        }
 if(SEC==60)
        { SEC=a=0x00;
          MIN++;
        }
 if(MIN==60)
        MIN=0x00;
}




RESULT:
    Thus the source code for clock using timer is written using Keil and implemented in Proteus and verified.   








                              FREQUENCY MULTIPLIER


AIM:
     To develop the source code for frequency multiplier using Keil µ vision and to implement it using Proteus tool.

THEORY:
      In electronics, a frequency multiplier is an electronic circuit that generates an output signal whose output frequency is a harmonic (multiple) of its input frequency. Frequency multipliers consist of a nonlinear circuit that distorts the input signal and consequently generates harmonics of the input signal. A subsequent band pass filter selects the desired harmonic frequency and removes the unwanted fundamental and other harmonics from the output.
    Frequency multipliers are often used in frequency synthesizers and communications circuits. It can be more economic to develop a lower frequency signal with lower power and less expensive devices, and then use a frequency multiplier chain to generate an output frequency in the microwave or millimeter wave range. Some modulation schemes, such as frequency modulation, survive the nonlinear distortion without ill effect (but schemes such as amplitude modulation do not).
   Frequency multiplication is also used in nonlinear optics. The nonlinear distortion in crystals can be used to generate harmonics of laser light.







SOURCE CODE:
#include<regx51.h>
sfr p1=0x90;
sbit in1=0x90;
sbit in2=0x91;
sbit in3=0x92;
sbit in4=0x93;
sbit out=0xa0;
unsigned int sum, f, t1;
void main(void)
{
t1=0x00;
IE=0x82;
TMOD=0x02;
TH0=TL0=0x00;
while(1)
    {
    f=0x01;
    if(in1==0)
        {
        f=f*2;
        }
  if(in2==0)







    {
       f=f*4;
     }
  if(in3==0)
     {
     f=f*6;
     }
  if(in4==0)
    {
    f=f*8;
    }
 if((p1&0x0f)==0x0f)
   {
   TR0=0;
    t1=0x01;
   }
 else if(t1!=f)
   {
   t1=f;
   sum=(255-(1000000/(f*2*1000)));
   TH0=TL0=sum;
   TR0=1;
    }



 



  }
}
void in(void) interrupt 1
{
out=~out;
}





RESULT:
    Thus the source code for frequency multiplier is written using Keil and implemented in Proteus and verified.   







                              FREQUENCY ADDER

AIM:
   To develop the source code for frequency adder using Keil µ vision and to implement it using Proteus tool.
THOERY:
  The frequency adder which has four inputs and one output. The frequency of the output wave is depends upon the input switches if first switch ON, only the frequency of the output wave is 2kHz.If the second switch ON, only the frequency of the output wave is 4kHz. If the both switches ON condition the frequency of the output wave is (2+4)6 kHz. Frequency adders  are often used in frequency synthesizers and communications circuits. It can be more economic to develop a lower frequency signal with lower power and less expensive devices, and then use a frequency adder chain to generate an output frequency in the microwave or millimeter wave range.










SOURCE CODE:
#include<regx51.h>
sfr p1=0x90;
sbit in1=0x90;
sbit in2=0x91;
sbit in3=0x92;
sbit in4=0x93;
sbit out=0xa0;
unsigned int sum, f, t1;
void main(void)
{
t1=0x00;
IE=0x82;
TMOD=0x02;
TH0=TL0=0x00;
while(1)
    {
    f=0x00;
    if(in1==0)
        {
        f=f+2;
        }
  if(in2==0)
       {





       f=f+4;
     }
  if(in3==0)
     {
     f=f+6;
     }
  if(in4==0)
    {
    f=f+8;
    }
 if((p1&0x0f)==0x0f)
   {
   TR0=0;
    t1=0x00;
   }
 else if(t1!=f)
   {
   t1=f;
   sum=(255-(1000000/(f*2*1000)));
   TH0=TL0=sum;
   TR0=1;
    }
  }
}





void in(void) interrupt 1
{
out=~out;
}














RESULT:
    Thus the source code for frequency adder is written using Keil and implemented in Proteus and verified.   











                          SERIAL TRANSMISSION




AIM:
  To develop the source code for serial transmission using Keil µ vision and to implement it using Proteus tool.
THEORY:
              In telecommunication and computer science, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels. Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and synchronization difficulties make parallel communication impractical. Serial computer buses are becoming more common even at shorter distances, as improved signal integrity and transmission speeds in newer serial technologies have begun to outweigh the parallel bus's advantage of simplicity (no need for serializer and deserializer, or SerDes) and to outstrip its disadvantages (clock skew, interconnect density).

     Serial transmission is the process of transmitting data, one bit at a time (one bit after the other). Contrast with "parallel transmission," which uses multiple lines to transmit several bits simultaneously (8, 16, 32, etc.). External communications networks use serial transmission.















SOURCE CODE:

#include<regx51.h>
unsigned char const *dat="HAVE A NICE DAY-GCT";
unsigned int i;
void main(void)
{
          SCON=0x40;
          TMOD=0x20;
          TH1=0xfd;
          TL1=0x00;
          TR1=1;
while(1)
  {
while(*dat)
    {
          SBUF=*dat;
          TI=0;
          while(TI==0);
          for(i=0;i<=32000;i++);
          dat++;
    }
  }
}






RESULT:
       Thus the source code for serial transmission was written using Keil and implemented in Proteus and verified.   




CIRCUIT SCHEMATIC & OUTPUT:








              SERIAL TRANSMISSION & RECEPTION



AIM:
    
          To develop the source code for serial transmission and reception  using Keil µ vision and to implement it using Proteus tool.

THEORY:
           Serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels. Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and synchronization difficulties make parallel communication impractical.
        Serial reception is the process of receiving data, one bit at a time (one bit after the other). Contrast with "parallel reception," which uses multiple lines to receive several bits simultaneously (8, 16, 32, etc.). External communications networks use serial transmission and reception.






SOURCE CODE:

#include<regx51.h>
unsigned int i,temp;
void main(void)
{
          SCON=0x50;
          TMOD=0x20;
          TH1=0xFD;
          TL1=0x00;
          TR1=1;
while(1)
  {

    while(RI==0);
          RI=0;
          temp=SBUF;
          for(i=0;i<=10000;i++);
          TI=0;
          SBUF=temp;
          while(TI==0);
          for(i=0;i<=20000;i++);
   
  }
}






RESULT:

Thus the source code  serial transmission and reception  is written using Keil and implemented in Proteus and verified.   










                     LCD AUTO DISPLAY



AIM:
      
            To develop the source code for LCD auto display  using Keil µ vision and to implement it using Proteus tool.

THEORY:

      LCD is a very commonly used output device to display alphanumeric characters. The LCD displays the character corresponding to the data received on its input data port i.e., it treats the data as the ASCII value of the character to be displayed. So if the value 65 is given to its data port the character “A” will be displayed and if the value 49 is given to the LCD the numeric digit “1” will be displayed. At many instances it is required to display a number like 123 on LCD. Displaying this number is tricky. If the data port of the LCD is loaded with the number 123, then the character corresponding to it will be displayed        
       LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.






SOURCE CODE:

#include<regx51.h>
sfr out=0x90;
sbit rs=0xa0;
sbit rw=0xa1;
sbit e=0xa2;
sbit in=0xa3;
sbit out1=0xa4;
sbit out2=0xa5;
sbit out3=0xa6;
sbit out4=0xa7;
void lcd_init();
void lcd_command(unsigned char);
void lcd_data(unsigned char const *dat);
void delay(unsigned int);

void main(void)
{
   out=0x00;
   rs=rw=e=out1=out2=out3=out4=0;
   in=0;
   lcd_init();
   while(in==0)
   {
          out1=out2=1;
          out3=out4=0;
          lcd_command(0x80);
          lcd_data("WELCOME");
          lcd_command(0xC2);
          lcd_data("by VLSI-GCT");
   }
   while(in==1)
   {
          out1=out2=0;



out3=out4=1;
          lcd_command(0x80);
          lcd_data("Good Morning");
          lcd_command(0xC2);
          lcd_data("  Alarm ON   ");
   }
}
void lcd_init()
 {
   lcd_command(0x38);
   delay(200);
   lcd_command(0x06);
   delay(200);
   lcd_command(0x0c);
   delay(200);
   lcd_command(0x01);
   delay(200);
 }
void lcd_command(unsigned char a)
  {
          out=a;
          rs=0;
          e=1;
          delay(1000);
          e=0;
  }
void lcd_data(unsigned char const *dat)
{
while(*dat)
  {
    out=(*dat);
    rs=1;
    e=1;
    delay(1000);
    e=0;


 dat++;
  }
}
void delay(unsigned int x)
{
while(x--);
}













  


RESULT:

 Thus the source code for LCD auto display is written using Keil and implemented in Proteus and verified.   

SQUARE WAVE GENERATOR EMBEDDED C


                                        SQUARE WAVE GENERATOR                      

  
     One requirement in a wide range of applications is a spontaneous source of some continuous signal, having a regular and definable wave shape. One of the most important of these is a square wave.
     The circuit to the right uses a comparator with both positive and negative feedback to control its output voltage. Because the negative feedback path uses a capacitor while the positive feedback path does not, however, there is a time delay before the comparator is triggered to change state. As a result, the circuit oscillates, or keeps changing state back and forth at a predictable rate.


CIRCUIT SCHEMATIC & OUTPUT:


 LOGIC ANALYSER OUTPUT:

 SOURCE CODE:

#include<regx51.h>
sfr out1=0x90;
sfr out2=0xa0;
sfr out3=0xb0;
unsigned int i;

void main()
{
out1=out2=out3=0x00;
while(1)
  {
    out1=out2=out3=0xaa;
    for(i=0;i<25000;i++);
    out1=out2-out3=0x55;
    for(i=0;i<25000;i++);
  }
}














UP/DOWN COUNTER: VHDL CODE



UP/DOWN COUNTER:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity UP_DOWN_COUNTER is
    Port ( clk : in  STD_LOGIC;
           rst : in  STD_LOGIC;
           UD : in  STD_LOGIC;
           Q : out  STD_LOGIC_VECTOR (3 downto 0));
end UP_DOWN_COUNTER;

architecture Behavioral of UP_DOWN_COUNTER is
signal tmp:STD_LOGIC_VECTOR (3 downto 0);
begin
process(clk,rst)
begin
if(rst='1') then
tmp<="0000";
elsif(clk'event and clk='1') then
if(UD='1') then
tmp<=tmp+1;
else
tmp<=tmp-1;
end if;
end if;
end process;
Q <= tmp;
end Behavioral;

FIR FILTER-VLSI CODE



//FIR FILTER
module FIR_8thOrder (Data_out, Data_in, clock, reset);
parameter order = 8;
parameter word_size_in = 8;
parameter word_size_out = 2 * word_size_in + 2;
parameter b0 = 8'd7;
parameter b1 = 8'd17;
parameter b2 = 8'd32;
parameter b3 = 8'd46;
parameter b4 = 8'd52;
parameter b5 = 8'd46;
parameter b6 = 8'd32;
parameter b7 = 8'd17;
parameter b8 = 8'd7;
output [word_size_out-1 : 0] Data_out;
input [word_size_in-1 : 0] Data_in;
input clock, reset;
reg [word_size_in-1:0] Samples [0 : order];
integer k;
assign Data_out = b0 * Samples[0]
                                   + b1 * Samples[1]
                                   + b2 * Samples[2]
                                   + b3 * Samples[3]
                                   + b4 * Samples[4]
                                   + b5 * Samples[5]
                                   + b6 * Samples[6]
                                   + b7 * Samples[7]
                                   +b8 * Samples[8];
always @ (posedge clock)
if (reset == 1)
begin    for (k = 0; k <= order; k = k+1)
                       Samples[k] <= 0;
end
else
begin
Samples[0] <= Data_in;
for( k = 1; k <= order; k = k+1)
Samples[k] <= Samples[k-1];
end
endmodule

Monday, 28 May 2012

AVR ATMEGA BIT RATE-BAUD RATE CALCULATOR- ISR VECTOR NAMES ADDRESS



AVR ATMEGA 8 BIT RATE-BAUD RATE CALCULATOR- ISR VECTOR NAMES ADDRESS

          This EXCEL file consist of various calculations involved in AVR (Atmega 8) MCU system design.  This includes functions for calculating USART baudrate or UBBR values, TWI bitrate or frequency calculation, ADC values, ISR vectors, etc…
            The register description is also provided for guidance. 
            This helps in easier  debugging and designing of a AVR project.

Thursday, 24 May 2012

AVR SERIAL COMMUNICATION - EXAMPLE ATMEGA 8 TUTORIAL - USART HEADER FILE


Here is the code for serial communication using AVR ATmega 8 RISC controller.
The functions used in this tutorial are

  • uart_puts("zzz")       :-> sends a string of character from data memory (RAM)
  • uart_puts_P("xxxx"):-> sends a string of character from program memory (FLASH memory)
  • uart_putc('x')          :->  sends a single character

           This has functions to transmit data from program memory also.



  • Click to download project files & Proteus demo.Click to download project files & Proteus demo.
  •  

/*******************************************************************************
                        SERIAL COMMUNICATION ATM8
   
    This source code introduces you to the working of the USART Module
    available in ATMEGA 8 @8MHz system clock.
   
    This code does the task of preparing a menu driven user interface on
    hyperterminal using the USART Module.

    Here the USART Module is configured to operate in the Asychronous
    mode. With a Frame format of 8-bit Data with 1 stop bit and no parity
    bit the baud rate is fixed for 9600 bps.

***********************************ELECDUDE.COM*********************************/


#define F_CPU 8000000UL            //Define the MPU operating frequency

#include <avr/io.h>                //Header file for AVR device specific I/O Definitions.
#include <avr/interrupt.h>            //Header file for incorportaing interrupt handling faclity (not used here).
#include <util/delay.h>                //Header file for incorporating delay routines.
#include <avr/pgmspace.h>            //Header file for incorporating Program space string utilities.
#include <stdlib.h>                //ISO Standard library of C functions and macros.
#include "USART.h"                //Defines C functions for accessing USART Module.


#define BIT(x)            (1 << (x))    //Set a particular bit mask
#define CHECKBIT(x,b)     (x&b)        //Checks bit status
#define SETBIT(x,b)     x|=b;        //Sets the particular bit
#define CLEARBIT(x,b)     x&=~b;        //Sets the particular bit
#define TOGGLEBIT(x,b)     x^=b;        //Toggles the particular bit

void WaitMs(unsigned int ms);
void welcome_screen(void);

int main()
{
    unsigned int ch;

    uart_init(9600);        //Initialise the USART Module with the given Baudrate and
                                                            //Frame format.   
    uart_puts_P("\r\n\t************************************************ ");
    uart_puts_P("\r\n\t             ATMEGA 8 DEVELOPMENT BOARD ");
    uart_puts_P("\r\n\t************************************************ ");
    uart_puts("\r\n\t\t  ");
    uart_puts_P("\rWelcome to ElecDude.  Press any to display.....");
    uart_puts("\r\r\r\r");   
   
    while(1)   //Enter into a uncoditional while loop..
        {
            ch=uart_getc();
            uart_puts("\n\n\t\t");
            uart_putc('<');
            uart_putc(ch);
            uart_putc('>');
            WaitMs(100);
        }

    return 0;
}


void WaitMs(unsigned int ms)    //Generate a delay of ms milli second.
{
    unsigned int i;

    for(i=0;i<=ms/10;i++)
    {
        _delay_ms(10);
    }
}








Saturday, 19 May 2012

NAVILIGHT ‘A GPS based Embedded System for Backtracking in Unfamiliar Environments’


ABSTRACT
             NAVILIGHT is an embedded system based, innovative flashlight used for navigation.  Its primary function is to record the user's starting point, trace the path taken and display the path back to the user.  This system uses pin-point precision if the user is receiving a GPS signal.  If the user does not receive this signal, the system uses dead-reckoning, where the NAVILIGHT uses software based backtracking to orient the user back to his/her starting point. 

The NAVILIGHT is a flashlight with special features primarily for military use. One of the two primary uses it has is a backtracking system that directs the user back through a maze from where he first began. An example can be if a person had to retrieve something from a dark area with numerous paths such as a cave.  The second use is a GPS system that shows the shortest path back to the given starting point. An example can be if a person were to travel across a forest at night, he can avoid misdirection on the way back by using the GPS system.
The NAVILIGHT will be controlled mainly by an 80C188EB CPU with the first primary function programmed in the C language.  This program will keep track of the direction taken and display the way back on the LCD display.  The embedded system will control the second function of the NAVILIGHT.  The embedded system interfaces with the GPS receiver and outputs the quickest direction or way back on the LCD display. It is also assumed that the user will operate the GPS receiver outside and will be able to acquire signals from at least three satellites.
            The NAVILIGHT also has minor functions that will make it as efficient as possible for the life of it's battery. It will have a sensor that detects the intensity of the light surrounding the NAVILIGHT and will adjust the power to the light bulbs as it sees fit. Depending on the light intensity being low or high, the sensor will increase or decrease the brightness of the bulbs. The NAVILIGHT will shut off automatically if it has been left idle over a period of time. And when there is a need to replace or recharge the battery, the NAVILIGHT will have a low battery indicator.
This project is important because it is a small portable device that is easily controllable. The possibilities for the use of the NAVILIGHT are countless. When the time comes for the NAVILIGHT to be used to its full potential it will have the ability to save lives.
Introduction:
The NAVILIGHT is a flashlight with special features primarily for military use. One of the two primary uses it has is a backtracking system that directs the user back through a maze from where he first began. An example can be if a person had to retrieve something from a dark area with numerous paths such as a cave.  The second use is a GPS system that shows the shortest path back to the given starting point. An example can be if a person were to travel across a forest at night, he can avoid misdirection on the way back by using the GPS system.
The NAVILIGHT also has minor functions that will make it as efficient as possible for the life of it's battery. It will have a sensor that detects the intensity of the light surrounding the NAVILIGHT and will adjust the power to the light bulbs as it sees fit. Depending on the light intensity being low or high, the sensor will increase or decrease the brightness of the bulbs. The NAVILIGHT will shut off automatically if it has been left idle over a period of time. And when there is a need to replace or recharge the battery, the NAVILIGHT will have a low battery indicator.
This project is important because it is a small portable device that is easily controllable. The possibilities for the use of the NAVILIGHT are countless. When the time comes for the NAVILIGHT to be used to its full potential it will have the ability to save lives.

Technical Description:
The NAVILIGHT will be controlled mainly by an 80C188EB CPU with the first primary function programmed in the C language.  This program will keep track of the direction taken and display the way back on the LCD display.  The embedded system will control the second function of the NAVILIGHT.  The embedded system interfaces with the GPS receiver and outputs the quickest direction or way back on the LCD display. It is also assumed that the user will operate the GPS receiver outside and will be able to acquire signals from at least three satellites.
             The intensity of the light will be controlled by a sensor, which supplies more voltage to the light bulbs as it gets darker or less voltage to make it dimmer as more light is present.  One of the minor functions includes a low battery indicator, which will be connected to a LED and will only be turned on when the battery life is low.
The other minor function is the auto shut off which is also controlled by a sensor. This sensor will turn the NAVILIGHT off if there is no activity for a certain amount of time.
The NAVILIGHT is designed to operate in normal weather conditions.

FUNCTIONAL REQUIREMENTS:
Vector 2X Digital Compass

MAGNETO-INDUCTIVE SENSORS
These sensors change inductance with different applied magnetic fields.  It employs a single solenoid winding for each axis.  The frequency of the oscillation changes with the magnetic field.  The output of the sensor circuit is inherently digital, and can be fed directly into a microprocessor.
The Earth's magnetic field is three-dimensional. In the Northern hemisphere the X-Y component of magnetic field vector lies parallel to the Earth's surface and points towards the magnetic north pole, but the majority of the Earth's field vector lies along the Z axis, which points into the ground. Because of this, compasses need to be held level to the Earth's surface in order to be accurate.
The sensors are assumed to be at right angles with respect to each other. Upon initiation of the calibration sequence take two readings from the compass at 180 degrees apart from each other.
We chose the Vector 2X Sensor, shown below, because of its ease of calibration and low power consumption (less than 10 milliamp draw as compared to the 30 milliamp draw for Dinsmore's sensor).  The module itself is 1.5" X 1.3" X 0.3". The pins are on standard
0.1  spacing.  The Vector 2X (V2X) compass delivers high accuracy, low power consumption, and low cost in a small package.  The module delivers 2-degree accuracy with 1-degree resolution, outperforming all compasses in its price range.  In the end, the Vector 2X (V2X) was by far the best choice. The V2X is a 2-axis magnetometer that measures the magnetic field in a single plane. This plane is the plane created by its two sensors, which are perpendicular to each other on the board.

80C188EB CPU (MICRO-CONTROLLER):


The 80C186EB is a second generation CHMOS High-Integration microprocessor. It has features that are new to the 80C186 family and include a STATIC CPU core, an enhanced Chip Select decode unit, two independent Serial Channels, I/O ports, and the capability of Idle or Powerdown low power modes. This micro-controller is having a Turbo Debugger. So the codings can be written in C Language.

M12 Oncore GPS Receiver (Antenna)
 
       Motorola M12 Oncore Global Positioning System Receiver
The M12 Oncore adds more features at both a lower cost and smaller size.  This GPS unit measures 40mm X 60mm X 10mm and draws between 220 milliamps and 250 milliamps.  The M12 can be easily interfaced to a serial receiver.  Once again, this met our requirement of low power consumption. GPS Receiver is operated outside and is able to aquire signals from atleast three satellites.

MPC 201 LCD & Keypad Interface
            LCD interface is required to produce output to the user.  The MPC201 LCD and Keypad Interface features alphanumeric and sub-VGA graphic LCD display interface, pinouts for popular LCD panels, and PC/104 format so it can attach directly to our computer.  This unit was also chosen because it is directly compatible to the SBC1190 microcontroller and the

           The MPC201 LCD and keypad interface allows direct connection to alphanumeric LCD displays (i.e. 2 line by 40 character, etc.). In addition, sub-VGA graphic LCD displays can also be driven if they employ an 8-bit parallel interface. Two LCD connectors are supplied, one normal and one with mirror image pinout. This provides the option of cabling into the top or bottom of the LCD units in tight places, for instance against front panels. The keypad scanner drives rows of switches and senses inputs from columns. Key codes reflect the intersection of row and column. Debounce is provided on-board, so any type of switch can be used in connecting a row line to a column line. Two connectors are provided, each for up to a 4 x 5 matrix of 20 keys.

LIGHT SENSOR
A Smart Q Light Sensor uses a photodiode which produces a voltage proportional to light intensity. It is sensitive to light in the range from 350nm to 700nm. The sensor has a built in infrared rejection filter, giving it a spectral response similar to that of the human eye.
         The Smart Q Light sensors is having high accuracy, precision and consistency. They are supplied calibrated and the stored calibration (in Lux) is automatically loaded when the light sensor is connected.

APPROACH AND DESIGN:
Compass Calibration
Let (Xe,Ye) represent the Earth's magnetic field in any given direction as measured with no interfering magnetic field. The host system will superimpose its additive interfering field, which we can call (Xo,Yo), on top of (Xe,Ye). Let (Xn,Yn) represent the field of a given heading as measured by the sensors in the operating environment, such that it contains the interfering fields as generated by the host system.
Xn = Xe + Xo
Yn = Ye + Yo
So:
Xe = Xn – Xo
Ye = Yn – Yo
(Xe,Ye) represents the true Earth's magnetic field – which is the field that the correct heading can be computed from. Therefore, the offset value (Xo,Yo) needs to be calculated and subtracted from (Xn,Yn) in order to obtain the correct heading information.
Because the compass is fixed with respect to the host system, the readings (X1,Y1) and
(X2,Y2) taken during calibration will both contain the same (Xo,Yo) values. Since the calibration points are 180° apart, the Earth's magnetic field contained within (X1,Y1) and (X2,Y2) will be equal but opposite in sign. So we can write:
X1 = Xe + Xo
Y1 = Ye + Yo
X2 = -Xe + Xo
Y2 = -Ye + Yo
Thus if we add the appropriate equations above and solve for Xo and Yo we find
Xo = (X1 + X2)/2
Yo = (Y1 + Y2)/2
Xo and Yo are generally constant values that can should be stored and subtracted for each
heading computation performed. Their values will change if the magnetic field of the host
system either increases through magnetization or decreases through demagnetization.
Heading is calculated from Xe and Ye, as follows:

Ae = arctangent(Ye / Xe)

Depending upon the arctangent function implemented, Ae will need to be map into the
correct quadrant. The (Xe,Ye) values correspond to the following quadrants:
  +X, +Y à Ae is between 0° and 90°
-X, +Y à Ae is between 90° and 180°
-X, -Y à Ae is between 180° and 270°     +X, -Y à Ae is between 270° and 360°

GLOBAL POSITIONING SYSTEM:
The Global Positioning System (GPS) is a worldwide radio-navigation system formed from a constellation of 24 satelllites and their ground stations
The 24 GPS satellites (21 active, 3 spare) are in orbit at 10,600 miles above the earth. The satellites are spaced so that from any point on earth, four satellites will be above the horizon. Each satellite contains a computer, an atomic clock, and a radio. With an understanding of its own orbit and the clock, the satellite continually broadcasts its changing position and time. On the ground, any GPS receiver contains a computer that "triangulates" its own position by getting bearings from three of the four satellites. The result is provided in the form of a geographic position - longitude and latitude - to, for most receivers, within a few meters.

EMBEDDED SYSTEM:
        Embedded systems involve the miniaturization of electronics so that it can fit into compact devices. It also deals with the software required to drive the associated hardware. Embedded systems contain programmed instructions running via processor chips. We can define as a system where a computing device I embedded into a non-computing device meant for doing some computations. These tasks may range from acquiring (or) transferring data about the work done by mother device to displaying information (or) controlling mother device. Embedded system contains a processor, memory, I/O ports and sensors and many more. 


Friday, 18 May 2012

EMBEDDED SOFTWARE ENGINEER

EMBEDDED SOFTWARE ENGINEER
(C PROGRAMMING/RTOS, LINUX)


Job Description
           Looking for Embedded Software Engineer (C programming/RTOS, Linux).

Education:
(UG – Any Graduate) AND (PG – Any PG Course)
  • Must have Strong knowledge in C programming.
  • Must have Strong Embedded skills (RTOS, Linux).
  • BSP / Device Driver Knowledge.
  • Should have Knowledge in Linux internals.
  • Passion and energy to learn new technologies.
  • Must be a go-getter
Required Skills:
  • C
  • RTOS
  • Linux
  • Embedded System
  • Linux Drivers & Internals
» Click Here to Apply

Source: EFY JOBS

Tuesday, 15 May 2012

Electronics Corporation of India Limited-2012

Electronics Corporation of India Limited
Name of Post
         Graduate Engineer Trainee

 in the disciplines of
ECE, EEE, E&I, CSE, CIVIL &
MECHANICAL
(GEN-58 , OBC-26 , SC-13 , ST-10 &
PH -10 (backlog-6) (VH, HH & OH) 








No. of vacancies
     107*

Upper age
limit as
on                                  :25 YEARS

30.04.2012
                 

QUALIFICATION :
First Class Engineering Degree with
minimum 65% marks in aggregate
(55% for SC/STs) from AICTE
approved Colleges / Recognized
Indian Universities in the relevant
discipline.

IMPORTANT DATES:
a. Commencement of On-line Registration                     07.05.2012
   of application by candidates                                             1400 Hours
b. Last date for On-line Registration of                            21.05.2012
   application by candidates                                            1600 Hours
c. Written Test (Provisional)                                                  10.06.2012
d
e
Interview date
Start of training programme (provisional)
Advt. No. 04/2012
Will be communicated through mail / Website:
www.ecil.co.in only to candidates short listed
after written test.
ONLINE WEBSITE DETAILS :http://www.ecil.co.in/jobs.php

Search Here...