Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Need help about GPIO

Hey, I am doing a project with the DE2 Board and using the NIOS-II PROCESSOR. 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.....
No RepliesBe the first to reply