I'm trying to use Atmega 328 PU at 8Mhz mode to be used as a motor speed controller but I'm unable to keep it working as the motors also only need 5V. I'm connecting the motors to the same power source parallel to L293D and Atmega 328 PU power.
The circuit is failing to work whenever a motor is connected but working fine with LEDs.
While replicating this but connecting Arduino Board instead at Atmega 328PU it is functioning perfectly.
I need some help in understanding this.