Additional UARTs
Posted: Fri Mar 15, 2013 2:13 pm
Hello everyone, first post here. I did try to search but did not see many actual solutions. Perhaps someone here can help.
A little background on the project. We have two RPi's that will be connected by RF Transceivers. A couple other IC's will be connected to each (GPS, Camera, etc). These devices all need to access serial UARTs, that of which the RPi provides only one. Perhaps we should've got something else, but this is what we have so we need to get a solution to this. Our code is written in C using the wiringPi libraries.
1) Is a software UART possible? I know we can "flip" the bits on a GPIO rather quickly, and really we only need 9600bps max. Is it possible to write a software UART or will it peg the CPU too hard? Has anything like this been done?
2) USB -> Serial. We aren't using the USB ports at the moment, so would going from serial to USB work in our favor? What parts would we need? I know there is an RS232 breakout for the RPi, but are there additional parts/wiring we will need beyond connecting the Tx/Rx/GND/VCC pins? What will the data rate over USB max out at?
3) I2C/SPI -> UART. I have seen some posts regarding breakouts that go from the I2C pins to create additional UARTS (up to 4). How feasible is this and how difficult would it be to interface with? I have heard we may need to write our own driver to handle the UARTs on the breakout.. how big of an undertaking is this?
Are there any other solutions? We were a bit naive when we chose the RPi for this project and did not realize that we would need so many UARTs. To think, we were debating on a Beaglebone (some have 4 UARTs). I'd like for us to be able to use the RPi and create a solution though.
Additionally, if we can figure something out I'd love to share our project and solution as I feel it is a bit unique.
Thanks for the help!
A little background on the project. We have two RPi's that will be connected by RF Transceivers. A couple other IC's will be connected to each (GPS, Camera, etc). These devices all need to access serial UARTs, that of which the RPi provides only one. Perhaps we should've got something else, but this is what we have so we need to get a solution to this. Our code is written in C using the wiringPi libraries.
1) Is a software UART possible? I know we can "flip" the bits on a GPIO rather quickly, and really we only need 9600bps max. Is it possible to write a software UART or will it peg the CPU too hard? Has anything like this been done?
2) USB -> Serial. We aren't using the USB ports at the moment, so would going from serial to USB work in our favor? What parts would we need? I know there is an RS232 breakout for the RPi, but are there additional parts/wiring we will need beyond connecting the Tx/Rx/GND/VCC pins? What will the data rate over USB max out at?
3) I2C/SPI -> UART. I have seen some posts regarding breakouts that go from the I2C pins to create additional UARTS (up to 4). How feasible is this and how difficult would it be to interface with? I have heard we may need to write our own driver to handle the UARTs on the breakout.. how big of an undertaking is this?
Are there any other solutions? We were a bit naive when we chose the RPi for this project and did not realize that we would need so many UARTs. To think, we were debating on a Beaglebone (some have 4 UARTs). I'd like for us to be able to use the RPi and create a solution though.
Additionally, if we can figure something out I'd love to share our project and solution as I feel it is a bit unique.
Thanks for the help!