Connection to Atmega841
The connection to the atmeage is very simple. In the example below I have connected the trigger pins to PORTA,1 and the echo pins to ICP1 and 2. The latter one is mandatory as in software, the input capture mechanism will be used. The trigger pin on the Atmega can be any pin.