Page 1 of 1

Distance Sensor HC-SR04 with 16F84 Pic no interrupt used

Posted: 25 Sep 2014 18:44
by leo73
Many month agoI have read e a progect maked with an other MCU Brand, I have read and I decided to rewrite a version for MIKROBASIC conpiler.
The Distance Sensor cost 2€ on ecommerce sites it's very cheep.
I tested the project yet and it work, i cannot use the float variable because before i have to buy a complete Mikrobasic Compiler.
Calculations of the distance floating point are more accurate.
The PIC send from RB1 Port a Trigger Signal and wait the coming back signal by RB0 pin,the time between first signal trigger and the coming back signal is the distance from the sensor and the obstacle.
The operation of this system is very simple and intuitive.