0
\$\begingroup\$

Im relatively new to micros and have a conundrum. My senior project involves using a touch screen and xbee modules for wireless communication. My question is, since both of them require serial communication, should I find a micro that has 2 serial ports, or is it possible to have both of them connected to the same serial port and select which one to communicate with?

\$\endgroup\$
  • \$\begingroup\$ That depends on how much time and money you're willing to throw at the problem. \$\endgroup\$ – Ignacio Vazquez-Abrams Nov 22 '14 at 21:55
1
\$\begingroup\$

You can't, in general, connect them to a single serial port. You'll need a microcontroller with (at least) two serial ports.

Sometimes, if you're trying to really minimise the cost of the microcontroller, you can implement a seral port using GPIO pins and I/O instructions. This can be very effective for a transmit-only serial port. But I would not recommend it for a project like this.

\$\endgroup\$
0
\$\begingroup\$

Logic level serial communication doesn't normally support multiple devices. You need two UARTs.

The SPI bus supporters multiple devices which are each selected using a chip select (CS) line.

The I2C bus supports multiple devices which are selected using inband protocol addressing.

\$\endgroup\$

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.