SUMMER TRAINING JULY 2012 EMBEDDED SYSTEM (Microcontroller) Submitted by:- CHANDRAMOHAN SINGH...

download SUMMER TRAINING JULY 2012 EMBEDDED SYSTEM (Microcontroller) Submitted by:- CHANDRAMOHAN SINGH AMARJEET KUMAR ABHISHEK KUMAR Btech-ECE(5 th sem) CTIT.

If you can't read please download the document

Transcript of SUMMER TRAINING JULY 2012 EMBEDDED SYSTEM (Microcontroller) Submitted by:- CHANDRAMOHAN SINGH...

  • Slide 1

SUMMER TRAINING JULY 2012 EMBEDDED SYSTEM (Microcontroller) Submitted by:- CHANDRAMOHAN SINGH AMARJEET KUMAR ABHISHEK KUMAR Btech-ECE(5 th sem) CTIT Slide 2 The embedded system is a combination of computer hardware, software additional electrical & mechanical parts A computer is used in such devices primarily as a means to simplify the system design and to provide flexibility. Embedded systems employ the use of a RTOS (Real-Time Operating System). Slide 3 Block Diagram of Embedded System Block Diagram of Embedded System Slide 4 Microcontroller RAMROM I/O Port Timer Serial COM Port CPU A smaller computer. On-chip RAM, ROM, I/O ports... Example:- Motorolas 6811, Intels 8051 and PIC 16X A single chip Microcontroller Microcontroller Slide 5 Slide 6 The 8051 Microcontroller : The 8051 Microcontroller : The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at the end of the 1970s. The 8051 family characteristics: The 8051 family characteristics: 4K Bytes ROM 128 Bytes RAM two timer/counters (16 bit) A serial port 32 input/output port Interrupt controller Slide 7 8051 Internal Architecture Slide 8 IC 8051 Pin Description Ground Voltage Supply (+5V) Slide 9 IC 8051 Pin Description Port 0 from Pin-39 to Pin-32 An 8-bit open drain bidirectional port. DUAL FUNCTION Used to access both data and address Slide 10 IC 8051 Pin Description Port 1 from Pin-1 to pin-8 8-bit bidirectional I/O port with internal pull-ups Slide 11 IC 8051 Pin Description Port 2 from Pin-21 to pin-28 Used to access address and I/O Slide 12 IC 8051 Pin Description Port 3 from Pin-10 to Pin-17 P3.0 : RxD(serial input port) P3.1 :TxD (serial output port) P3.2 :INT0 (external interrupt 0) P3.3 :INT1 (external interrupt 1) P3.4 :T0 (timer 0 external input) P3.5 :T1 (timer 1 external input) P3.6 :WR (external data memory write strobe) P3.7 :RD (external data memory read strobe) Slide 13 crystal reset External memory Add. Latch enable Program Store Enable IC 8051 Pin Description Slide 14 IC 8051 Daily Applications Moving message display Digital clock Traffic Light7 segment display Slide 15 Immediate addressing modes ADD A, #23h (Add immediate data to Acc) Register addressing modes ADD A, R2 (Add register to Accumulator) Direct addressing modes ADD A, 40h (Add data at location 40h to Accumulator) Register Indirect addressing modes ADD A,@R2 (Add indirect RAM to Acc) IC 8051 Addressing Modes Slide 16 Interrupts in 8051 An interrupt is an external or internal event that interrupts the microcontroller to inform it that a device needs its service The advantage of interrupts is that the microcontroller can serve many devices (not all at the same time) time Interrupt service Program Slide 17 Interrupts in 8051 EA-ET2ESET1EX1ET0EX0 Internal Interrupts EX0 Enables or disables external interrupt ET0Enables or disables timer 0 overflow interrupt EX1 Enables or disables external interrupt 1 ET1 Enables or disables timer 1 overflow interrupt ES Enables or disables the serial port interrupt ET2Enables or disables timer 2 overflow or capture interrupt --Not implemented, reserved for future use EA Disables all interrupts External Interrupts P3.2 :INT0 (external interrupt 0) P3.3 :INT1 (external interrupt 1) Slide 18 Port Relations Microcontroller with pin 7 Segment 7 pins of the microcontroller are used to shape the character of your LED display Seven Segment Display Slide 19 Table 1. Configuring the Character 7 Segment Data Seven Segment Display Slide 20 8051 Microcontroller Design Softwares Slide 21 SoftwaresUsed Keil Vision Top View Simulator Express PCB Slide 22 Keil Vision IDE The Vision IDE from Keil combines project management, make facilities, source code editing, program debugging, and complete simulation in one powerful environment. The Vision development platform is easy-to-use and helping you quickly create embedded programs that work. The Vision editor and debugger are integrated in a single application that provides a seamless embedded project development environment. Slide 23 Slide 24 Top View Simulator Topview Simulator gives an excellent simulation environment for MCS 51 Microcontroller. A beginner can learn about 8051 based embedded solutions without any hardware. An experienced designer, you may find most of the required facilities built in the simulator that enabling you to complete your next project without waiting for the target hardware. Slide 25 Top View Simulator A Top View Simulator Program Slide 26 Express PCB Express PCB allows you to design schematics and PCB's. It is ideal for those that are looking to design anywhere from a two to four layer circuit board. A drop and drag design allows users to pick the components of the circuit board and drop it onto the circuit board in the software program. The designer can then place various pins in the circuit board to show where things need to be connected. It also has the ability of the program to show the designer where there are flaws in their design. Slide 27 This way we can include resistors This way we can include different kind of ICs Express PCB Slide 28 DC Motor interfacing with Microcontrollers DC motors are always preffered over stepper motors. There are many things which we can do with our DC motor when interfaced with microcontroller. For example: we can control the speed of motor, we can control the direction of rotation, we can also do encoding of the rotation made by DC motor i.e. keeping track of how many turns are made by our motors etc. Usually H-bridge is preffered way of interfacing a DC motor. L293D is most used H-Bridge driver IC. Slide 29 LCD INTERFACE Slide 30 Stepper Motor Of all motors, step motor is the easiest to control. It's handling simplicity is really hard to deny - all there is to do is to bring the sequence of rectangle impulses to one input of step controller and direction information to another input. Direction information is very simple and comes down to "left" for logical one on that pin and "right" for logical zero. Motor control is also very simple - every impulse makes the motor operating for one step and if there is no impulse the motor won't start. Pause between impulses can be shorter or longer and it defines revolution rate. This rate cannot be infinite because the motor won't be able to "catch up" with all the impulses (documentation on specific motor should contain such information).. Slide 31 Interfacing of Stepper motor with 8051 Slide 32 MOTOR INTERFACING Slide 33 Diagram of never falling robot Slide 34 EDGE FOLLOWER ROBOTICS CKT Slide 35 PROGRAM OF NEVER FALLING ROBOTICS Slide 36 DDRA.0=1; DDRA.1=1; DDRA.2=1; DDRA.3=1; while (1) { PORTA.0=1; PORTA.1=0; OCR0=200; PORTA.2=1; PORTA.3=0; OCR1A=200; delay_ms(100); PORTA.0=0; PORTA.1=1; OCR0=200; PORTA.2=0; PORTA.3=1; OCR1A=200; delay_ms(100); PORTA.0=1; PORTA.1=0; OCR0=200; PORTA.2=0; PORTA.3=0; OCR1A=200; delay_ms(100); PORTA.0=0; PORTA.1=0; OCR0=200; PORTA.2=1; PORTA.3=0; OCR1A=200; delay_ms(100); } Slide 37 APPLICATION OF 8051 MICROCONTROLLER The 8051 has been in use in a wide number of devices, mainly because it is easy to integrate into a project or build a device around. The following are the main areas of focus: i. Energy Management:Efficient metering systems help in controlling energy usage in homes and industrial applications. These metering systems are made capable by incorporating microcontrollers. ii. Touch screens:A high number of microcontroller providers incorporate touch- sensing capabilities in their designs. Portable electronics such as cell phones, media players and gaming devices are examples of microcontroller-based touch screens. iii. Automobiles: The 8051 finds wide acceptance in providing automobile solutions. They are widely used in hybrid vehicles to manage engine variants. Additionally, functions such as cruise control and anti-brake system have been made more efficient with the use of microcontrollers. iv. Medical Devices:Portable medical devices such as blood pressure and glucose monitors use microcontrollers will to display data, thus providing higher reliability in providing medical results. Slide 38 ANY QUESTION ???. Slide 39