0
\$\begingroup\$

I'm working on a project where I am sending data from an msp430 to an atmega328 through regular tx/rx lines. My board will also need the capability to perform software changes on the atmega through FTDI, which needs to be connected to the same tx/rx lines. So when the FTDI is connected, I'll need to break the lines from the MSP. My first thought was just to put a PMOS between the two lines and have the FTDI VCC connected to it. But I am not sure this would be the most robust solution. Can any one point me to the right direction?

Thanks, Micah

\$\endgroup\$
  • \$\begingroup\$ Or better yet, since I'll need to reprogram both the msp430 and the atmega, it would be nice to have one usb plug on the board and just have a physical switch to switch between programming the map and atmega. Is there a robust way to implement this? \$\endgroup\$ – Mtk59 Oct 22 '15 at 18:15
  • \$\begingroup\$ msp430 programming takes place over the Spy-Bi-Wire Rst/Tst lines, not the serial lines. \$\endgroup\$ – Passerby Oct 22 '15 at 18:57
1
\$\begingroup\$

The Arduino line uses a simple resistor setup to give one Tx/Rx pair priority over another.

enter image description here

The direct connection has priority over the resistor connection.

Note that this depends on the specific board you use, as some have the resistors going to the programmer and others to the external module. The Uno R3 has them to the programmer.

See: Arduino Uno R3 hardware serial: peripheral interfering with the USB/Serial-converter?

\$\endgroup\$
  • \$\begingroup\$ Interesting. So if the UART in this example was the MSP430, the FTDI chip would still program the ATmega, once its connected? \$\endgroup\$ – Mtk59 Oct 22 '15 at 19:09
  • \$\begingroup\$ Yes, that's the idea. \$\endgroup\$ – Passerby Oct 22 '15 at 19:11
0
\$\begingroup\$

Go USB to an FTDI chip. From the FTDI chip go to a MUX that will preform your line inversions. the FTDI will have at least a couple of programmable lines. Make one control the reset of the MSP and the other the reset of the Atmega. Have a switch that will hold one processor in reset and at the same time configure the MUX for the other chip and vice versa.

If you want debugging at the same time have two switches. One that can hold either processor in reset and one to configure the MUX. This way you can sniff the UART lines in either direction at will.

\$\endgroup\$
  • \$\begingroup\$ Hmm I see. Would the cd405xB be a good choice for the MUX? What if the switch physically routed power to either chip for programming? The MSP uses a debugger/programmer that is not FTDI and I'd like to keep them separate. \$\endgroup\$ – Mtk59 Oct 22 '15 at 18:46

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.