TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136220 times)
  2. FAT32 Library (69487 times)
  3. Network Ethernet Library (55706 times)
  4. USB Device Library (45992 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40782 times)
  7. GSM click (28788 times)
  8. PID Library (26331 times)
  9. mikroSDK (26053 times)
  10. microSD click (25140 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Project

HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt

Rating:

0

Author: Shawon Shahryiar

Last Updated: 2016-05-29

Package Version: 1.0.0.0

Category: Measurement

Downloaded: 880 times

Not followed.

License: MIT license  

INT0 pin is gated with timer 0. TMR0 starts when INT0 pin is high (start of the echo pulse from HC-SR04) and is read when INT0 pin is low (invoked by the falling edge interrupt caused by the end of echo from HC-SR04). Thus we get pulse width in microseconds. 16 such time samples are taken to make the measurements accurate.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt" changes.

Do you want to report abuse regarding "HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for 8051
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Project Blog

HC-SR04 Ultrasonic Rangefinder Demo

HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt

Watch on YouTube
HC-SR04 Ultrasonic Sensor

HC-SR04 Ultrasonic Sensor

HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt

View full image
80xx Development Board

80xx Development Board

HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt

View full image
Measuring Distance

Measuring Distance

HC-SR04 Ultrasonic Rangefinder with Timer and Interrupt

View full image

ALSO FROM THIS AUTHOR

SSD1306 Monochrome 0.96 Inch (128 x 64) OLED Display Demo With STM32F051C8

0

SSD1306 Monochrome 0.96 Inch (128 x 64) OLED Display Demo With STM32F051C8. https://www.youtube.com/watch?v=AFRtelEJwuU

[Learn More]

Digital Anemometer Demo

0

Demo of a digital anemometer from Clima. The anemometer has a magnet that revolves around a reed switch, giving frequency output. Here two timers of a AT89S51 are used to measure wind speed. One is being used as a counter while the other is used to time one second. Combination of these measure frequency and thereby wind speed.

[Learn More]

A Simple Solar Irradiation Measurement Technique

0

https://embedded-lab.com/blog/a-simple-solar-irradiation-measurement-technique/

[Learn More]