1
\$\begingroup\$

I have a PCB with an atmega8, communicating with a PC. The signal from TX and RX pins is level-shifted through a MAX232 to standard serial port level, then converted via serial-to-USB commercial device, which connects to the PC. The PCB with the atmega8 and the PCB, holding the MAX232 are powered from the same brick (transformer-based power supply).

Do I connect the GND of MAX232 pcb to ground of the serial port (which goes to the PC)? Do I connect the GND of the atmega8 board to GND on the MAX232 board? I would prefer that it doesn't matter if the two boards are powered from the same PSU or separate.

\$\endgroup\$
1
\$\begingroup\$

You need to connect all the grounds together in order for your setup to work correctly.

Do I connect the GND of the atmega8 board to GND on the MAX232 board? I would prefer that it doesn't matter if the two boards are powered from the same PSU or separate.

If you connect the GND of the ATmega board to the GND of the MAX232 board, it doesn't matter if they have the same power supply or different ones. If you will have separate power supplies for both boards, you'd still need to connect the GNDs together.


Your hardware setup seems a bit more complicated than it could be. Currently, you have:

uC board TTL UART <-> TTL-to-RS232 <-> RS232-to-serial-USB <-> PC

Instead, you could do it simpler:

uC board TTL UART <-> TTL-to-serial-USB <-> PC
\$\endgroup\$
  • \$\begingroup\$ Thanks, I was worried that some ground loop could kill my motherboard, for example. I guess there is no such danger with isolated power supplies. On your second point, I am planning to do it when I get the time (btw CMOS, not TTL). If you can from the top of your head, could you recommend me a chip (must be available in DIP package) please? \$\endgroup\$ – Vorac Oct 25 '15 at 9:08
  • \$\begingroup\$ @Vorac No danger of a ground loop as you're using a transformer-based power supply, hence isolated from your PC. I don't know of any UART-USB chips in a DIP package, only SMD.. \$\endgroup\$ – m.Alin Oct 25 '15 at 9:13
  • \$\begingroup\$ Oh, well, it wass 5 minutes of googling. TME has only SMD chips, but complete expansion boards start at about 10 euro. You can't imamgine the clutter of the cable connections right now. \$\endgroup\$ – Vorac Oct 25 '15 at 9:13
  • \$\begingroup\$ Actually, I can. Been there! :-) I bought this one and it's ok: tme.eu/bg/details/mikroe-483/startovi-kitove-drugi/… and pretty cheap. \$\endgroup\$ – m.Alin Oct 25 '15 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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