We use cookies to give you the best experience possible. By continuing we’ll assume you’re on board with our cookie policy

Wall Follower

essay
The whole doc is available only for registered users
  • Pages: 5
  • Word count: 1191
  • Category: Computers

A limited time offer! Get a custom sample essay written according to your requirements urgent 3h delivery guaranteed

Order Now

The microcontroller incorporates all the features that are found in microprocessor. The microcontroller has built in ROM, RAM, Input Output ports, Serial Port, timers, interrupts and clock circuit. A microcontroller is an entire computer manufactured on a single chip. Microcontrollers are usually dedicated devices embedded within an application. For example, microcontrollers are used as engine controllers in automobiles and as exposure and focus controllers in cameras. In order to serve these applications, they have a high concentration of on-chip facilities such as serial ports, parallel input output ports, timers, counters, interrupt control, analog-to-digital converters, random access memory, read only memory, etc.

The I/O, memory, and on-chip peripherals of a microcontroller are selected depending on the specifics of the target application. Since microcontrollers are powerful digital processors, the degree of control and programmability they provide significantly enhances the effectiveness of the application. The 8051 is the first microcontroller of the MCS-51 family introduced by Intel Corporation at the end of the 1970s. The 8051 family with its many enhanced members enjoys the largest market share, estimated to be about 40%, among the various microcontroller architectures.

The microcontroller has on chip peripheral devices. In this unit firstly we differentiate microcontroller from microprocessor then we will discuss about Hardware details of 8051 and then introduce the Assembly level language in brief. Microcontrollers

β€’ Microcontroller (MC) may be called computer on chip since it has basic features of microprocessor with internal ROM, RAM, Parallel and serial ports within single chip. Or we can say microprocessor with memory and ports is called as microcontroller. This is widely used in washing machines, vcd player, microwave oven, robotics or in industries.

Microcontroller and Embedded Systems
β€’ Microcontroller can be classified on the basis of their bits processed like 8bit MC, 16bit MC.
β€’ 8 bit microcontroller, means it can read, write and process 8 bit data. Ex. 8051 microcontroller. Basically 8 bit specifies the size of data bus. 8 bit microcontroller means 8 bit data can travel on the data bus or we can read, write process 8 bit data.

PIN DIAGRAM OF 8051 MICRO CONTROLLER:

Description of each pin is discussed here:
β€’ VCC ο€Ίο€ 5V supply
β€’ VSS: GND
β€’ XTAL2/XTALI are for oscillator input
β€’ Port 0 – 32 to 39 – AD0/AD7 and P0.0 to P0.7
β€’ Port 1 – 1 to 8 – P1.0 to P1.7
β€’ Port 2 – 21 to 28 – P2.0 to P2.7 and A 8 to A15
β€’ Port 3 – 10 to 17 – P3.0 to P3.7

β€’ P 3.0 – RXD – Serial data input – SBUF
β€’ P 3.1 – TXD – Serial data output – SBUF
β€’ P 3.2 – INT0 – External interrupt 0 – TCON 0.1
β€’ P 3.3 – INT1 – External interrupt 1 – TCON 0.3
β€’ P 3.4 – T0 – External timer 0 input – TMOD
β€’ P 3.5 – T1 – External timer 1 input – TMOD
β€’ P 3.6 –WR – External memory write cycle – Active LOW
β€’ P 3.7 – RD – External memory read cycle – Active LOW
β€’ RST – for Restarting 8051
β€’ ALE – Address latch enable

1 – Address on AD 0 to AD 7
0 – Data on AD 0 to AD 7
β€’ PSEN – Program store enable

8051 Architecture:
Each block is explained as:
ALU β€” Arithmetic Logical Unit
This unit is used for the arithmetic calculations.
A-Accumulator
This register is used for arithmetic operations. This is also bit addressable and 8 bit register.
B-Register
This register is used in only two instructions MUL AB and DIV AB. This is also bit addressable and 8 bit register.
PC-Program Counter
β€’ Points to the address of next instruction to be executed from ROM

8051 Flag Bits and PSW Register
1. Used to indicate the Arithmetic condition of ACC.
2. Flag register in 8051 is called as program status word (PSW).
This special function register PSW is also bit addressable and 8 bit wide means each bit can be set or reset independently.
There are four flags in 8051
β€’ P β†’ Parity flag β†’ PSW 0.0
1 – odd number of 1 in ACC
0 – even number of 1 in ACC
β€’ OV(PSW 0.2) β†’ overflow flag β†’ this is used to detect error in signed arithmetic operation. This is similar to carry flag but difference is only that carry flag is used for unsigned operation.

AC β†’ Auxiliary carry flag β†’ when carry is generated from D3 to D4, it is set to 1, it is used in BCD arithmetic.
CY β†’ carry flag β†’ Affected after 8 bit addition and subtraction. It is used to detect error in unsigned arithmetic opr. We can also use it as single bit storage.
SETB C; for cy = 1
CLR C; for cy = 0

Structure of RAM or 8051 Register Bank and Stack
1. 128 byte RAM is available in 8051
2. 128 byte = 27B
3. 128 byte visible or user accessible RAM is available which is shown in figure. Extra 128B RAM which is not user accessible. 80H to FFH used for storage of SFR (special function register)

Stack in 8051
β†’ RAM locations from 08H to 1FH can be used as stack. Stack is used to store the data temporarily.
Stack is last in first out (LIFO)
β†’ Stack pointer (SP) :
β€’ 8bit register
β€’ It indicate current RAM address available for stack or it points the top of stack.
β€’ Initially by default at 07H because first location of stack is 08H.
β€’ After each PUSH instruction the SP is incremented by one while in MC after PUSH instruction SP is decremented.
β€’ After each POP instruction the SP is decremented.

WALL FOLLOWER
Wall Follower using 8051 is built using TSOP based infrared sensor module. The Right module is used to detect the wall on the right of iBOT. Wall follower application can be built with only one module, but we are using the other sensor to avoid obstacle in front of the robot. The Right module is connected at approximately 45 degree to the board so as to detect the wall as shown in the image.

Here we are using 2 IR TSOP modules and iBOT will follow the wall on its right. The right TSOP module is for detecting the wall and the left module is used to avoid the iBOT from bumping into the front wall or obstacle.

Working Principal

Here if BOT detects wall on right it goes away from the wall, if it does not detect wall on right it goes right until the wall is detected.

Sensors:
The TSOP Sensor with Robosoft Systems is a miniaturized receiver for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly be decoded by a microprocessor. TSOP is the standard IR remote control receiver series, supporting all major transmission codes. Features:

1.Photo detector and preamplifier in one package
2.Internal filter for PCM frequency
3.Improved shielding against electrical field disturbance
4.TTL and CMOS compatibility
5.Output active low
6.Low power consumption
7.High immunity against ambient light
8.Continuous data transmission possible (up to 2400 bps)

Specification:
1.Supply Voltage: –0.3…6.0 V.
2.Supply Current: 5 mA.
3.Output Voltage: –0.3…6.0 V.
4.Output Current: 5 mA.
5.Junction Temperature: 100 Β°C

Related Topics

We can write a custom essay

According to Your Specific Requirements

Order an essay
icon
300+
Materials Daily
icon
100,000+ Subjects
2000+ Topics
icon
Free Plagiarism
Checker
icon
All Materials
are Cataloged Well

Sorry, but copying text is forbidden on this website. If you need this or any other sample, we can send it to you via email.

By clicking "SEND", you agree to our terms of service and privacy policy. We'll occasionally send you account related and promo emails.
Sorry, but only registered users have full access

How about getting this access
immediately?

Your Answer Is Very Helpful For Us
Thank You A Lot!

logo

Emma Taylor

online

Hi there!
Would you like to get such a paper?
How about getting a customized one?

Can't find What you were Looking for?

Get access to our huge, continuously updated knowledge base

The next update will be in:
14 : 59 : 59