You are on page 1of 4

1.1. What is a microcontroller? A microcontroller is a compact standalone computer, optimized for control applications.

Entire processor, memory and the I/O interfaces are located on a single piece of silicon so, it takes less time to read and write to extrernal devices. 1.2. Why are microcontrollers used? Following are the reasons why microcontrollers are incorporated in control systems:
a. Cost: Microcontrollers with the supplemantary circuit components are much cheaper than a computer with an analog and digital I/O b. Size and Weight: Microcontrollers are compact and light compared to computers c. Simple applications: If the application requires very few number of I/O and the code is relatively small, which do not require extended amount of memory and a simple LCD display is sufficient as a user interface, a microcontroller would be suitable for this application. d. Reliability: Since the architecture is much simpler than a computer it is less likely to fail. e. Speed: All the components on the microcontroller are located on a singe piece of silicon. Hence, the applications run much faster than it does on a computer.

PIC16F877 is one of the most commonly used microcontroller especially in automotive, industrial, appliances and consumer applications. In Figure 1, the block diagram of the PIC16F877 is illustrated. The core features of PIC16F877 are: High performance RISC CPU Only 35 single word instructions to learn All single cycle instructions except for program branches which are two cycle Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data Memory (RAM) Up to 256 x 8 bytes of EEPROM Data Memory Pinout compatible to the PIC16C73B/74B/76/77 Interrupt capability (up to 14 sources) Eight level deep hardware stack Direct, indirect and relative addressing modes Power-on Reset (POR) Power-up Timer (PWRT) and Oscillator Start-up Timer (OST) Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation Programmable code protection Power saving SLEEP mode Selectable oscillator options

Low power, high speed CMOS FLASH/EEPROM technology Fully static design In-Circuit Serial Programming. (ICSP) via two pins Single 5V In-Circuit Serial Programming capability In-Circuit Debugging via two pins Processor read/write access to program memory Wide operating voltage range: 2.0V to 5.5V High Sink/Source Current: 25 mA Commercial, Industrial and Extended temperature ranges Low-power consumption: - < 0.6 mA typical @ 3V, 4 MHz - 20 A typical @ 3V, 32 kHz - < 1 A typical standby current The peripheral features of the PIC16F877 are: Timer0: 8-bit timer/counter with 8-bit prescaler Timer1: 16-bit timer/counter with prescaler, can be incremented during SLEEP via external crystal/clock Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler Two Capture, Compare, PWM modules Capture is 16-bit, max. resolution is 12.5 ns - Compare is 16-bit, max. resolution is 200 ns - PWM max. resolution is 10-bit 10-bit multi-channel Analog-to-Digital converter Synchronous Serial Port (SSP) with SPI. (Master mode) and I2C. (Master/Slave) Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address detection Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS controls (40/44-pin only) Brown-out detection circuitry for Brown-out Reset (BOR)

DYP Ultrasonic Sensor DYP-ME007V1


Product TypeDYP-ME007V1 Date2011-7-4 Hits2213

DYP-ME007 V1 ultrasonic ranging module is a high performance, costeffective non-contact distance measurement module, and with temperature compensation; are calculated by distance by 340 m / sec to calculate; measuring range of 0.02 ~ 5.00m, accuracy 1cm, measured with the measured object without direct contact, can clearly show a stable measurement results. Product Features: Small, easy to use low voltage, low power consumption Wide measurement range high accuracy Application: Applications ranging occasions; measuring the distance between objects: Programmable car obstacle avoidance: robot obstacle avoidance: teaching apparatus; security, industrial control Electrical parameters Operating voltage DC 5V Operating current Less than 10mA frequency 40KHz Max distance 5m Min distance 2cm

Output pin 3ECHO Output signal 5V TTL level Response time 100MS accurcy 1cm drectivity Less than 30 Operating Temperature -10-60 Storage Temperature -20-80 size 46*21*15mm Sequence chart A short ultrasonic pulse is transmitted at the time 0, reflected by an object. The senor receives this signal and converts it to an electric signal. The next pulse can be transmitted when the echo is faded away. This time period is called cycle period. The recommend cycle period should be no less than 150ms. If a 10s width trigger pulse is sent to the signal pin, the Ultrasonic module will output eight 40kHz ultrasonic signal and detect the echo back. The measured distance is proportional to the echo pulse width and can be calculated by the formula above. If no obstacle is detected, the output pin will give a 65ms high level signal.

You might also like