Author Topic: Coding of a PIC16F690  (Read 1412 times)

0 Members and 1 Guest are viewing this topic.

Offline StayneTopic starter

  • Newbie
  • Posts: 1
  • Country: in
Coding of a PIC16F690
« on: October 01, 2015, 04:34:31 am »
I need help for interfacing a PIC16F690 with HC-SR04.Please suggest a moisture sensor that can be interfaced with PIC16F690.Thank you
 

Offline kaadam

  • Contributor
  • Posts: 23
  • Country: hu
Re: Coding of a PIC16F690
« Reply #1 on: October 01, 2015, 06:10:55 am »
Hello!

What is the question about HC-SR04. All you need is using a capture input to measure the impulse length on the echo pin, and generating a trigger pulse with a normal GPIO.

For moisiture sensing, i found this: https://www.sparkfun.com/products/13322

In this case, you need to hook up the SIG output to an AD input, and read the analog value. If you bulid a prototype only, you can share the power supply between this modul and your µC, and you don't need any level transition. Not the most elegant way, but it's good for getting know the sensor.

Good luck!
 

Offline ElectricGuy

  • Regular Contributor
  • *
  • Posts: 240
  • Country: pt
Re: Coding of a PIC16F690
« Reply #2 on: October 01, 2015, 03:36:57 pm »
I need help for interfacing a PIC16F690 with HC-SR04.Please suggest a moisture sensor that can be interfaced with PIC16F690.Thank you

What compiler are you using? I've code writed in MicroBasic and MicroC for a 12f1240.
Like Kaadam said, its very easy!
Thank you!
Regards
ElectricGuy
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf