jov
Posts: 1
Joined: Tue Dec 04, 2012 1:43 pm

SoftwareSerial like lib for raspberry pi

Tue Dec 04, 2012 2:05 pm

I tried to find library in c for "raspberry pi" simiar SoftwareSerial in Arduino environment. Which can turn any two gpio-pins to uart mode. Can you help me?
P.S. Sorry for bad english, i'm russian.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: SoftwareSerial like lib for raspberry pi

Tue Dec 04, 2012 3:14 pm

jov wrote:I tried to find library in c for "raspberry pi" simiar SoftwareSerial in Arduino environment. Which can turn any two gpio-pins to uart mode. Can you help me?
P.S. Sorry for bad english, i'm russian.
While possible, even though a Pi is much much faster than an ATmega, it's going to be tricky due to the nature of Linux - multi-tasking, pre-emptive, etc. You need fairly accurate timing to clock the serial date out correctly and consistently.

I think you'll be far better off looking for USB serial adapters.

-Gordon
--
Gordons projects: https://projects.drogon.net/

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: SoftwareSerial like lib for raspberry pi

Tue Dec 04, 2012 4:32 pm

Use USB or inbuilt UART and standard linux drivers
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
michele.x
Posts: 72
Joined: Sat Sep 22, 2012 8:15 pm

Re: SoftwareSerial like lib for raspberry pi

Tue Dec 04, 2012 4:50 pm

gordon@drogon.net wrote: While possible, even though a Pi is much much faster than an ATmega, it's going to be tricky due to the nature of Linux - multi-tasking, pre-emptive, etc. You need fairly accurate timing to clock the serial date out correctly and consistently.
I think you'll be far better off looking for USB serial adapters.
-Gordon
Be warned that there are incompatibilities between some RS232/USB adapters and the usb port of the Pi.
For another option there's the IC MAX3111E , an rs-232 to SPI converter.

Return to “C/C++”