06-10-2016, 03:27 PM
1458069570-angelinneww.docx (Size: 640.23 KB / Downloads: 6)
ABSTRACT
A microcontroller is a microprocessor that controls everyday appliances such as microwaves and wristwatches. Microcontrollers have only been with us for a few decades but their impact (direct or indirect) on our lives is profound. A Microcontroller is a programmable digital processor with necessary peripherals. Both microcontrollers and microprocessors are complex sequential digital circuits meant to carry out job according to the program / instructions. Sometimes analog input/output interface makes a part of microcontroller circuit of mixed mode(both analog and digital nature).This paper deals about the detection of obstracle using microcontrollers through ultrasonic sensors.
INTRODUCTION
A microcontroller is a single chip microprocessor system which consists of cpu, data and program memory , serial and parallel i/o ports, timers and external as well as internal interrupts. It can also be called as a entire computer manufactured on a single chip .The Intel MCS-51 (commonly termed 8051) is an internally Harvard architecture,complex instruction set computing (CISC) instruction set, single chip microcontroller(µC) series developed by Intel in 1980 for use in embedded systems. 8051 CENTRAL PROCESSING UNITS.4k *8 ROM 128*8 RAM three 16 bit counters/timers, Full duplex serials channels, Boolean processor full static operation, MEMORY ADDRESSING CAPABILITY, 64k ROM and 64k RAM.
FEATURES
4 KB on chip program memory.
128 bytes on chip data memory(RAM).
4 reg banks.
128 user defined software flags.
8-bit data bus.
16-bit address bus.
32 general purpose registers each of 8 bits.
16 bit timers .
3 internal and 2 external interrupts.
Bit as well as byte addressable RAM area of 16 bytes.
Four 8 bit ports.
16-bit program counter and data pointer.
1 microsecond instruction cycle with 12 MHz crystal.
ARCHITECTURE
POWER CONTROL MODES: - Idle mode, power down mode, CMOS and TTL compatible, frequency range of 0 to 33 MHz, 4 level priority interrupts, 6 interrupt services, four 8-bit i/o ports.
ACCUMULATOR(ACC):- It is used for data transfer and arithmetic operations. After any operations result is stored in Acc and can be accessed through its SFR address of 0E0H.
A REGISTER:- It is located in the SFR memory location 0xE0. The A register works in similar fashion to the AX register of x86 processors. The A register is called the accumulator, and by default it receives result of all arithmetic operations.
B REGISTER:- It is used to store the upper 8-bit result of multiplication and divisions. It is used as temporary register and can be accessed through its SFR address of 0F0H.
PROGRAM STATUS WORD(PSW):- This SFR consists of different status bits that reflect the current state of microcontroller. It contains carry(CY), auxiliary carry(AC), two register bank select bits(RS1 And RS0), overflow flag(OV), parity bit(P), two user defined status flags.
STACK POINTER(SP) :- This is an 8-bit register . SP is incremented before the data is stored onto stack using PUSH/CALL instructions execution. During PUSH, first SP is incremented and then copy data. In the POP operation, initially copy the data and then decrement the SP.
DATA POINTER(DPTR):- DPTR is a 16-bit registers. It consists of higher byte(DPH) and a lower byte(DPL). DPTR is very useful fo string operations and look up table operations. With a 16-bit DPTR, a maximum of 64k of off chip data memory and 64k of off chip memory can be addressed.
PORT DETAILS
There are four 8-bits ports: p0,p1,p2& p3.
PORT P1(Pins 1-8): The port P1 is a general purpose i/o port which can be used for a variety of interfacing tasks. The other ports P0, P2 & P3 have dual roles or additional functions associated with them based upon the context of their usage. The pot 1 output buffers can sink/source four TTL inputs. When 1s are written to pot 1 pins are pulled high by internal pull-ups and can be used as inputs.
PORT P1(PINS 10-17): PORT P3 acts as a normal IO port, but port P3 has additional functions such as serial transmit and
receive pins, 2 external interrupt pins, 2external counter inputs, read and write pins for memory access.
PORT P2(PINS 21-28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P2 will accts as an address bus in conjunction with PORT P0 to access external memory.
PORT P0(PINS 32-39): PORT P0 can be used as a general purpose 8 bit port when no external memory is present, but if external memory access is required then PORT P0 acts as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2.
PORT P10: Asynchronous communication input or serial synchronous communication output.
EMBEDDED C
Embedded C is a set of language extensions for the C Programming language by the C Standards committee to address commonality issues that exist between C extensions for different embedded systems. Historically, embedded C programming requires nonstandard extensions to the C language in order to support exotic features such as fixed-point arithmetic, multiple distinct memory banks, and basic I/O operations.
In 2008, the C Standards Committee extended the C language to address these issues by providing a common standard for all implementations to adhere to. It includes a number of features not available in normal C, such as, fixed-point arithmetic, named address spaces, and basic I/O hardware addressing.
Embedded C uses most of the syntax and semantics of standard C, e.g., main() function, variable definition, data type declaration, conditional statements (if, switch, case), loops (while, for), functions, arrays and strings, structures and union, bit operations, macros, etc.
PROPOSED SYSTEM
This proposed system uses an ultrasonic transducer comprising of transmitter and receiver are used ealier. Then distance is calculated by a program running on a microcontroller and displayed on an LCD screen. The ultrasonic sensor produces 40 KHz sound waves.