Altera_Forum
Honored Contributor
13 years agovhdl for reading pwm
hi i'm using ultrasonic sensor to detect water level and implement on De2 board. The output of the sensor is in pulse width which is 147uS/inch. Can anyone guide me how i can write the vhdl code for this output if i want to detects to 8 level? Let say im using 50Mhz clock on FPGA then (147us/20ns) i will get 7350 count per inch.
can anyone help me what should i do so it can detects 8 levels of water level. tq