PART-1:- Basic embedded system designing 
   In a simple manner  embedded system is a system that can control some specific devices automatically or manually.To design an embedded system we need to follow these steps

1).  For any embedded system design the first requirement is the application, which we want to design
in practical.

2). Select the input and output devices which you want to interface (like input devices are sensors, switches etc., and output devices are motors, lcd display etc.,).

3).The input and output devices must be selected as per our requirements only.

4). Take out your required functioning and draw the simple block diagram of the system.

5). Draw the flow chart

6). Select the I/O devices and controller for your system.

7). write the functioning code in Embedded-C or in any language.. and check the functionality in KEIL simulation software.

8). Design your own circuit now. There are some important things while designing the circuit.
     i). Study the datasheets of the selected devices and find the operating voltage and current levels.
     ii). find if there is any requirement of oscillatory circuit.
     iii). choose the predefined parameters for the device for the  basic functionality. These predefined
          parameters are available in datasheets.
    iv). solder the main blocks first and do not insert any IC's into the baser until you check the voltage and
        currents in the baser.
    v). if every thing is properly soldered then insert IC's and then dump the program into the controller.
     vi). now check the functionality of the circuit.
        These steps will be explained with example in the PART-2...
PART 2:-
1).We consider a simple circuit that operates LEDs in a blinking fashion when a switch is pressed. This is our requirement.

2). the input devices are SWITCHES and OUTPUT devices are LEDs. And one controller.

3).when the switch is pressed the leds should blink in a fashion.
4). Draw the flow chart

flowchart  expresses when the switch is closed means connected to ground microcontroller will send 0x55(in binary 0101 0101) is send to leds port and after some delay it sends 0xAA(in binary 1010 1010) to LEDs port. Otherwise LEDs will not blink.

5).screen shots of program functionality
    When is opened

When switch is closed

6). Circuit diagram in prolite s/w

7).  Program for the above circuit

sbit sw=P1^0;  // initialising P1.0 pin as input pin i.e switch
sfr leds=0xA0; //assigning P2 as output port i.e leds
unsigned int i;    // declaring variable i
void main()
 sw=1;                                   // assigning sw as input pin
 leds=0x00;         // assiging leds as output port
 while(1)  // infinite loop or super loop
                                if(sw==0)                             //check for sw closed
                                                leds=0x55;          // if closed write 0x55 onto the leds port
                                                for(i=0;i<1000;i++);  // create some delay
                                                leds=0xAA;                                         // write 0xAA onto the
                                                                                                           //leds port
                                                for(i=0;i<1000;i++); //create some delay
                                else                                        // if switch is opened
                                                leds=0x00;            // write 0x00 onto the leds port


No comments:

Post a Comment

comment here