0
\$\begingroup\$

In my project, I use a atmega16 to send data to PC via USB to TTL converter at baud rate of 9600 and internal RC of 4Mhz. If I power the atmega16 using my laptop through a usb cable I can receive the data perfectly, but when I power the same using a 9v DC battery and 7805 regulator, I get garbage value on the PC. Please help me out.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

You must connect Rx, Tx and ground.
When you supply power from USB then they both PC and mcu operate on a common ground, when you use a battery that ground connection between mcu and PC doesn't exist.

Connect the grounds of USB and battery(-pole) and it should get fixed.

\$\endgroup\$
2
  • \$\begingroup\$ Can you please suggest some ideas to fix it, i'm just a beginner in electronics \$\endgroup\$
    – sp39
    Commented Mar 2, 2014 at 16:54
  • \$\begingroup\$ @sp39 Have you connected the ground of AVR supply with the ground of the TTL to USB converter? That is what I think is the cause of the problem, you are missing that connection. \$\endgroup\$
    – alexan_e
    Commented Mar 2, 2014 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.