Topics
Basic Robotics Embedded System Microcontroller 8051 Programming of 8051 Application of Embedded system
Basic Robotics
Basic Robotics
Basic Elecronics Resistor, Capacitor, Diode Transistor 555 timer Op-Amp Sensor Basic Mechanical Motors and Driver IC Relays
Basic Electronics
Resistor Passive element, oppose flow of electrons Voltage Divider and Current Divider With other components to use them at higher ratings.
Basic Electronics
Capacitor Passive element, oppose the Change in Voltage Filters , Tuner , Voltage Doubler Sometimes used for instant power source e.g. in flash of camera
Basic Electronics
Diode Active element, Conducts in one direction Rectifier, Voltage regulator Circuit Protection and Polarity Checker LED are widely used for light nowadays.
Basic Electronics
Transistor Active device Switch, Amplifier Logical Gates
Basic Electronics
555 timer Mono stable, Bi stable, Unstable Timer PWM
Basic Electronics
Op-Amp 741 & 358 741 as amplifier, practical Gain of about 2k, 358 as comparator with single Vcc.
Basic Electronics
FND 7 segment display Common Cathode and Common Anode Displays numbers 0-9, Codes are generated for each Numeric
Basic Electronics
Sensors Sound Sensor (Microphone) Light Sensor (LED with LDR) IR Sensor Temperature sensor (Thermistors)
Basic Mechanical
Motors DC motor AC motor Geared Motor Brushless Motor Stepper motor
Basic Mechanical
Motors Driver IC L2938
Basic Mechanical
Relay Relay is an Electromagnetic switch Single Pole single throw Single Pole Double Throw Double Pole single throw Double Pole Double throw
Embedded System
Embedded System
Embedded system = Hardware + Software Dedicated use, Once programmed can not used for other applications Auto intelligence according to the interface.
Embedded System
Hardware Architecture and Pins 8 bit, 18bit , 32 bit RAM and ROM Providers
Embedded System
Architecture of 8051 8 Bit ALU 4 Ports used as Input or Output 128 Byte RAM, 4k ROM 1 Serial Input/Output 1 Timer /Counter 6 Interrupt Lines
Embedded System
PIN diagram
Embedded System
Ports:
P0 P1 P2 P3
Each Port Can be used as input or output On reset each port is configured as output To make port as input port it must be programmed to give all bits as 1, 0xff; P0 differ from others as it has logical sink logic and require pull up resistor
Embedded System
Timer/counter
T0 TH0,TL0 T1 TH1,TL1
There are two Timer/Counter, 16 bit each. While acting as timer it provides delay which is programmed with TMOD. While using as Counter it Counts External Pulses. TCON is used for counter operation
Embedded System
TMOD and Timer programming
T0 T1
TMOD is a 8 bit register There are 4 mode of operations
Embedded System
Modes of Timer/Counter
Embedded System
Modes of Timer/Counter
We basically use MOD 1 and is programmed as: The timer will start from initial programmed value to value FFFF. The initial programmed value is set by content of TH and TL e.g. TL=0x3E TH=0xB8; T0=B83E FFFF-B83E= 47C1 Time = (47C1+1)x1/fc=19.93 ms
Embedded System
SID and SOD
8051 has 1 SID/SOD pin to transfer data serially. SBUF AND SCON are two 8 bit register used. 1. SBUF For a byte data to be transferred via the TxD line, it must be placed in the SBUF register SBUF holds the byte of data when it is received by 8051 RxD line
Embedded System
SID and SOD
2. SCON SCON is an 8-bit register used to Mode of Transfer of data Specify Data transfer rate Start and Stop Bits
Generally we use MODE 1 in which SCON register is loaded with the value 50H, indicating serial mode 1, where an 8-bit data is framed with 1 start and 1 stop bit(s).
Embedded System
Progamming Introduction to IDE
Embedded System
Integrated Development Environment
Embedded System
Integrated Development Environment Editor Program is used to write programm in Asm or C language Assembler converts the instructions into machine code. Linker program takes one or more object code files and produce an absolute object file with the extension abs OH is object to hex convertor. Hex file is burned to ROM in microcontroller
Embedded System
HEX FILE:
:CC
AAAA TT DDDDDDDDDDDDDDDDDDDDDDDD SS :10 0000 00 75805575905575A0557DFA111C7580AA 9F :10 0010 00 7590AA75A0AA7DFA111C80E47C237B4F 01 :07 0020 00 DBFEDCFADDF622 35 CC: AAAA: DDDD: SS:
specifies how many data bits are there 16 bit address used by loader data bits , hex data status bit for checksum
Embedded System
Embedded C language:
Data types: Unsigned char Signed char Unsigned int Signed int Sbit (single bit) Bit and sfr (T1,T0,TMOD etc) Elements #include<reg51.h> Main() { //Statements }
Embedded System
Embedded C language:
Statements Used While; Do-while; If; Else if ; Functions (declaration and call); Matrix (define and used for coding) Structure (define and use )
Embedded System
Embedded C language:
Programs: 1. Running LED 2. Interfacing a FND CC 3. Interfacing a Alphanumeric display 4. Interfacing a 16x2 LCD display 5. Interfacing a Dot matrix display 6. Program to use Timer Program for Serial data transfer 7. Interfacing a mobile keypad
Navigation system PDA Photocopier Printer Router Scanner TV Video game console Wearable computer
Thank YOU