FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5891 Discussions

How GPIO could connect with the ultrasonic sensor

Altera_Forum
Honored Contributor II
984 Views

Hey, I am doing a project with the DE2 Board. The main device that i am going to use is the  

Ping))) ultrasonic sensor. The manual sheet is here:XXX.parallax.com/Portals/0/Downloads/docs/prod/acc/28015-PING-v1.6.pdf(sorry guys, you need to change XXX to www) 

First, I am not sure is the power supply go for drive the sensor? Second, which pin of the GPIO is the GND? or the GND is just an output with 0?  

BTW, i am a newbie, so i am not sure what i thought is correct, please correct me if i am wrong. 

This is my thought about using the sensor, It requires a 40Khz pulse. So, I set the pin to output and set value to 1 for 40khz period. then i set the interrupt enable, adjust the pin to input, and wait for the value 1. the last thing i need to do is calculate the distance based on the time period. 

 

Anyway, this is my idea about my final project, I am not sure is that too hard or too easy. 

Please help me.....
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
248 Views

I am sorry, I POST THREE OF IT...PLEASE dont delete it....it is really in a hurry! 

Thank you
0 Kudos
Reply