This may be more of a general AVR issue than Arduino, but I'm using an Arduino in the process, so I posted here.
I am working on a project that involves two separate ATmega328s with grbl firmware, controlled by a host ATmega164. I am building a custom machine that has six stepper motors (hence the two grbl setups) and various other chores that the host (ATmega164) monitors. The host sends g-code to each ATmega328 (grbl) using its two USARTs. This is all on a custom PCB (not an Arduino).
Grbl has parameters that are configured via USB and Universal G-code Sender (or similar). To connect to USB with my custom PCB, I provided access to the RXD and TXD pins of each ATmega328.
From the Arduino schematic, the only connection between the ATmega328 and the ATmega16U2 (USB) are the TXD and RXD lines. So my approach seems workable.
My idea is to remove the ATmega328 from an Arduino and connect the RXD and TXD lines from the Arduino to their counterparts on my custom PCB. Thus substituting the ATmega328 on my PCB for the one on the Arduino. That way I can use the USB circuitry from the Arduino to talk to the ATmega328 on my PCB.
BUT... I can't get it to work.
With the Arduino fully intact (ATmega328 installed) I get communication with Universal G-code Sender as I should. But after removing the ATmega328 and connecting to the RXD and TXD of the ATmega328 on my custom PCB, I get nothing. The RX or TX LED on the Arduino flashes once very quickly, then nothing.
I have triple checked the connection of RXD an TXD and even swapped them. Still nothing. The RXD and TXD connect to only one ATmega328 so there is no confusion (I confirmed with a meter). The firmware in the Arduino is the same hex file as the ATmega328 on my PCB, and both were uploaded with AVRISP mkII.
Is my approach flawed? Or am I missing something?
THANKS in advance!