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

Post your requests and ideas on the future development of mikroBasic PRO for PIC.
Post Reply
Author
Message
leo73
Posts: 252
Joined: 09 Jan 2014 15:45

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

#1 Post by leo73 » 25 Sep 2014 18:44

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.
Attachments
FUSI-16F84-NEW.JPG
FUSI-16F84-NEW.JPG (25.25 KiB) Viewed 3294 times
Rilevatore Distanza.zip
(68.6 KiB) Downloaded 288 times
MAIN-BOARD-SCHEME+Distance Sensor.JPG
MAIN-BOARD-SCHEME+Distance Sensor.JPG (53.26 KiB) Viewed 3296 times

Post Reply

Return to “mikroBasic PRO for PIC Wish List”