Designing an embedded system with an 8051 microcontroller involves several steps. Here is a high-level overview of the process :
Define the requirements: Before you begin designing an embedded system with an 8051 microcontroller, you need to define the requirements of the system. This includes identifying the inputs and outputs of the system, as well as any other functionality that is required.
Choose the hardware components: Once you have defined the requirements of the system, you can choose the hardware components that will be used in the system. This includes selecting the 8051 microcontrollers, as well as any other necessary components such as sensors, actuators, and communication modules.
Design the circuit: With the hardware components selected, you can now design the circuit for the embedded system. This involves designing the schematics for the system, laying out the components on a printed circuit board (PCB), and routing the traces between the members.
Write the software: After the circuit design is complete, you need to write the software that will run on the 8051 microcontroller. This involves writing code in a programming language such as C and using a compiler to generate the machine code that will be loaded onto the microcontroller.
Test and debug: With the software written and loaded onto the microcontroller, you need to test the system and debug any issues that arise. This may involve using tools such as oscilloscopes, logic analyzers, and emulators to test the hardware and software components of the system.
Deploy the system: Once the system has been tested and any issues have been resolved, you can deploy the system in its intended environment. This may involve installing the system in a specific location, configuring any necessary settings, and ensuring that the system is functioning properly.
Designing an embedded system with an 8051 microcontroller requires a combination of hardware and software design skills, as well as a deep understanding of the requirements of the system. With careful planning and execution, however, it is possible to create a reliable and effective embedded system that meets the needs of your project.
The importance of Core Java and the 8051 microcontrollers in designing embedded systems cannot be overstated. Here are some reasons why:
Wide range of applications: Embedded systems are used in various applications, from consumer electronics to industrial automation. The 8051 microcontroller is a popular choice for designing embedded systems due to its versatility and low cost.
Low power consumption: Many embedded systems are battery-powered or run on low-voltage power supplies, making power consumption a critical design consideration. The 8051 microcontroller is known for its low power consumption, making it an ideal choice for battery-powered devices.
Easy to use: The 8051 microcontroller is easy to use, with a simple architecture and straightforward programming interface. This makes it an attractive option for designers new to embedded systems development.
Large user community: The 8051 microcontroller has been around for over 40 years and has a large user community that provides support, resources, and development tools. This makes it easier for designers to find information and help when developing embedded systems.
High reliability: Embedded systems are often used in safety-critical applications, such as medical devices and automotive systems, where reliability is essential. The 8051 microcontroller is known for its high reliability, making it a popular choice for such applications.
Flexibility: The 8051 microcontroller is highly flexible, with a wide range of peripherals and software development tools available. This allows designers to create embedded systems that are tailored to their specific needs and requirements.
Overall, the combination of Core Java and the 8051 microcontroller offers a powerful and flexible platform for designing embedded systems that are reliable, low-power, and highly customizable.
Factors to be considered in selecting a Controller:-
• Microcontroller is responsible for the overall performance of an embedded system.
• Computing needs of the task.
•Availability of software development tools.
•Availability and reliability of the microcontroller itself.
Computing needs of the task:-
1. Speed
2. Packaging
3. Power consumption
4. Available on Chip RAM and ROM
5. Available number of I/O pins
6. Enhancement
7. Cost per unit
Software Development Tools:-
• Creation of software program for the particular microcontroller
• Basic needs for C language are Assembler, Debugger, Compiler
• Basic needs in writing the program: emulator, technical support, and expertise
• Some tools are available by the manufacturer while some made available by a third-party vendor
• For example too develop an embedded C programs and hex file, use a compiler provided by the Keil system whereas the controller is manufactured by Intel or Philips.
Availability of Microcontroller:-
• Microcontroller has to be available readily in required quantities at the time of development.
• Same microcontroller can be manufactured by different companies with minor or significant variations. Some of the manufacturers are:-
1. Intel
2. Atmel
3. Philips
4. Dallas
5. Texas
Why 8051 Microcontroller?
• Embedded systems as they are dedicated to performing only a unique task often can do with the use of an 8-bit microcontroller.
• The Following feature of the 8051 microcontroller makes it popular:
1. 4KB on-chip program memory
2. 128 bytes on-chip data memory(RAM)
3. 4 register banks
4. 8-bit data bus
5. 16-bit address bus
6. 16-bit timers
7. 3 internal and 2 external interrupts
8. Bit as well as byte addressable RAM area of 16 bytes
9. Four 8-bit ports
10. 16-bit program counter and data pointer
11. 128 user-defined software flags
Designing with 8051
• Steps involved in designing Embedded System using 8051 µC.
1. Analyzing the problem:
➢Study the task embedded system needs to perform.
➢Then decide the type of embedded system required and then list the hardware components which are easily available.
2. Design the circuit
➢Design the hardware.
➢This can be done with the help of software like Proteus.
➢A circuit also can be designed using PCB or microcontroller trainer kit with required I/O devices.
3 . Create Software
➢Write the required embedded C program for microcontroller 8051 using relevant software for e.g.Keil software.
➢Compile the program and make a hex file.
4. Code Dumping
➢If using hardware components , the program is required to load onto internal memory of the microcontroller.
➢This can be done by connecting the microcontroller using a serial cable to the computer and burning hex file onto ROM by suing softwares like Flashmagic
5. Test the program
➢Run the program to test the embedded system
Question : Design an embedded system to function as a temperature controller . System should continuously monitor the temperature and should turn on indicator LED if temperature increases beyond a specific value.
Solution : It will be consist of
1. Required Hardware Components
2. Circuit design
3. Code
4. Code Dumping
5. Testing Hardware requirements :
➢Temperature sensor – LM 35
➢Analog to digital converter (ADC)[ as LM 35 will give analog values and microcontroller accepts digital values.
➢8051 microcontroller
➢LED indicators :
▪ Reading the temperature
▪ Indicating temperature has increased the specific value Circuit design
➢A block diagram of circuit design is shown below
Structure of embedded program
➢Embedded C is a generic term given to a programming language written in C , which is associated with a specific hardware architecture .
➢Embedded C is an extension to the C language with some additional header files.
➢These header files may change from controller to controller.
➢The microcontroller 8051 uses a header file <reg51.h>.
➢The embedded system designers must know about the hardware architecture to write programs .
➢These programs plays prominent role in monitoring and controlling external devices .
Major constituents of embedded C program
❖Comments :
➢Comments help the reader of the program to understand the code easily.
➢Comments lines are not compiled by the compiler.
➢Embedded C uses same notation as that of C
1. “//” comments a single line segment
2. “/*” and “*/” are opening and closing segments of multiline comment
➢Example : ➢P1= 0 X FF; //set port 1 as input port.
❖Pre- processor directives :
➢Pre processor directives work exactly the same way in embedded C as they work in C .
➢It is a macro processor which is automatically used by a C compiler to transform the program before actual compilation .
➢It provides ability to include header files, conditional compilation and line control.
➢There are two major pre processor directives used are
1. # include
2. # define (e.g. # define LED P1 = now LED will represent port 1)
❖Global declaration of variables and functions:
➢Like conventional C , variables , constants and functions to be used in the program can be declared in the global declaration before the main function .
➢For e.g. Sbit IN = P2.0;
void delay();
❖Main functions:
➢Like C , embedded system program starts the execution from the main function.
➢This function is known as the base function or the primary function of a program.
➢Embedded C program is compiled by a cross compiler and this compiler treats the main function same as a C main function
Write 8051 embedded C program to display pattern to have alternate OFF and On of LED
/* program to display pattern to have alternate OFF and On of LED */
# include
}
} //end of main
Void delay() //delay function
{
Unsigned int l , j ;
For ( l= 0 ; l<1000 ; l++)
For (j =0 ; j < 1275 ; j++);
}
Disadvantages to consider to designing ES with 8051 microcontroller ,Here are a few:
Limited processing power: The 8051 microcontroller is a relatively old microcontroller with limited processing power compared to newer microcontrollers. This can be a disadvantage for applications that require more processing power.
Limited memory: The 8051 microcontroller has limited memory compared to newer microcontrollers. This can be a disadvantage for applications that require more memory for storing data and code.
Limited peripherals: The 8051 microcontroller has a limited number of on-board peripherals, such as timers, UARTs, and ADCs. This can be a disadvantage for applications that require more peripherals.
Limited support for modern development tools: The 8051 microcontroller has been around for many years and may not be fully compatible with modern development tools, such as integrated development environments (IDEs) and debuggers.
Limited community support: While the 8051 microcontroller has a large user community, the community may not be as active as that of newer microcontrollers. This can make it more difficult to find resources and support for designing embedded systems with the 8051 microcontroller.
Despite these disadvantages, the 8051 microcontroller is still a popular choice for many embedded system designs, particularly those with low processing and memory requirements.
Designing an embedded system with an 8051 microcontroller involves several stages, including hardware design, software development, testing, and deployment. Here is an overview of the working of such a system:
Hardware design: The first step in designing an embedded system with an 8051 microcontroller is to design the hardware components of the system. This involves selecting the appropriate components, such as sensors, actuators, and communication interfaces, and designing the circuitry and board layout for the system. The hardware design must also take into account power consumption, environmental factors, and any other specific requirements of the intended application.
Software development: Once the hardware design is complete, the next step is to develop the software that will run on the system. This involves writing code in a programming language such as C or assembly language, and compiling it to run on the 8051 microcontroller. The software must be designed to interact with the hardware components of the system, and must also take into account factors such as real-time performance, memory management, and interrupt handling.
Testing: After the hardware and software have been designed and developed, the next step is to test the system to ensure that it is working correctly. This involves testing the hardware components, the software functionality, and the overall performance of the system. Testing may also involve simulation or emulation of the system to identify potential issues or improve performance.
Deployment: Once the system has been designed, developed, and tested, the final step is to deploy it in the intended application. This may involve installing the system in a specific location, configuring it to work with other systems or components, and ensuring that it is operating correctly.
The working of an embedded system with an 8051 microcontroller will depend on the specific application and design of the system. However, in general, the microcontroller will act as the central processing unit for the system, controlling the input and output of data to and from the various hardware components. The software running on the microcontroller will determine the behavior of the system, and may include functions such as data processing, communication with other systems, and control of actuators and other hardware components.
0 Comments
Post a Comment