-
My project uses an attiny1616 with megaTinyCore but I need two UARTS. I would like to use the hardware UART to connect to a remote but nearby device plus SoftwareSerial on a port as TX only to a very close external device. The hardware UART and SoftwareSerial would not be used simultaneously. Baud rates for both serial links are yet to be determined but I have flexibility. Is this possible on the attiny1616 with both hardware UART and SoftwareSerial in operation?? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Since you do not use the serial links at the same time, did you consider switching between the alternate pin locations of the UART? after RX/TX Closing serial, switching to the alternate pins, beginning serial again, RX/TX to alternate pins, closing serial, switch back, etc... |
Beta Was this translation helpful? Give feedback.
-
Thank you hmeijdam. I had not thought of this as I have never before used Serial.swap(mux option) or Serial.pins(tx, rx). I just gave that section a quick look and I'll have to do some in-depth reading to understand what I will need to do - swap ports, change baud rate, etc. |
Beta Was this translation helpful? Give feedback.
-
Yes, here is an example. Works simple and you can set the baudrate differently.
|
Beta Was this translation helpful? Give feedback.
-
I have the same problem. What would be the minimum latency switching back and forth ( on a AtTiny3216 )? Does anyone know of a softwareserial library that works on these Tiny's? |
Beta Was this translation helpful? Give feedback.
Since you do not use the serial links at the same time, did you consider switching between the alternate pin locations of the UART? after RX/TX Closing serial, switching to the alternate pins, beginning serial again, RX/TX to alternate pins, closing serial, switch back, etc...