TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (137002 times)
  2. FAT32 Library (70123 times)
  3. Network Ethernet Library (56028 times)
  4. USB Device Library (46348 times)
  5. Network WiFi Library (41966 times)
  6. FT800 Library (41286 times)
  7. GSM click (29055 times)
  8. mikroSDK (26489 times)
  9. PID Library (26451 times)
  10. microSD click (25413 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: 886 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

ILI9341 320x240 TFT Touch Display 16-bit Parallel (8080) Mode Demo with ATMega2560

0

This is a library demo for ILI9341 TFT display controller using 16-bit parallel port/8080 interface. Although MikroE compilers support for this TFT controller and many others, I coded this library for anyone using any compiler. I used an Arduino Mega2560 and TFT shield but the code is written with MikroC for AVR.

[Learn More]

NTC Thermometer with STM32

0

NTC Thermometer with STM32. The code is written with Maple IDE.

[Learn More]

ILI9325 TFT Touch Screen Display Demo with STM32

0

Library for ILI932x display controllers and common resistive touch screen controllers like XPT2046, ADS7843, etc. The library codes are written for STM32 family with MikroC for ARM but with simple GPIO changes the codes can be implemented for other MCUs as well.

[Learn More]