Hi,
I’d like to connect a BlueSMiRF to ATtiny1616, but the ATtiny does not have RX/TX pins. I was wondering if there is a way to send serial data back and forth from the BlueSMiRF RX/TX pins to the UPDI pin on the ATtiny. Any guidance would be greatly appreciated. Thank you.
I don’t think it’s possible to use the UPDI pin on the ATtiny1616 for serial communication with the BlueSMiRF module… The UPDI (Unified Program and Debug Interface) pin is specifically designed for programming and debugging purposes, not for general-purpose serial communication.
However, there are a few alternatives:
- Software Serial: You can implement software serial on any available GPIO pins of the ATtiny1616. This allows you to designate two pins as RX and TX for communicating with the BlueSMiRF module. Keep in mind that software serial is less reliable at higher baud rates compared to hardware UART.
- Hardware UART: The ATtiny1616 does have a hardware UART peripheral. You can use the alternate pin locations for the UART to connect to the BlueSMiRF module. This method provides more reliable communication, esp at high baud rates
- Upgrade to ATtiny2-series: If possible, consider using an ATtiny2-series microcontroller like the ATtiny1624/1626/1627, which have dual hardware UARTs. This would allow you to use one UART for the BlueSMiRF and the other for debugging or additional comm
To implement any of these solutions, you’ll need to:
- Choose the appropriate pins on the ATtiny1616 for RX and TX.
- Configure the pins in your code for either software serial or hardware UART.
- Connect the RX pin of the ATtiny to the TX pin of the BlueSMiRF, and the TX pin of the ATtiny to the RX pin of the BlueSMiRF.
- Ensure both devices are using the same baud rate and communication settings.
Remember that when using software serial or alternate UART pin locations, you’ll need to refer to the ATtiny1616 datasheet to identify which pins can be used for these