I intend connect HC-SR04 directly on atmega328. On this image: http://imgur.com/a/PByrn it is possible see this sensor connect, http://www.learningaboutelectronics.com/images/HC-SR04-Ultrasonic-distance-sensor-pinout.png, with lead 9 on trigger and lead 8 to echo.
I tested the code with sensor connected on arduino uno and all works fine. But when I connected all without board arduino I haven't signal from sensor. The code, saved on atmega 328, it is ready to pulse signal high on lead 8 always the sensor catch something less than five centimeters. But this didn't work!
First of all I thought the problem was to the code and way I was use to programmer the atmega 328 through board arduino. But, simply to test, I added a simply task which a each cycle the lead 6 turn on and turn off. The result, as expected, blink led yellow during atmega328 turn on.
What can I do wrong? Thanks