Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 months ago.
Another Serial Port needed
Hi everyone, I need four serial ports in the mbed. Is there a way to set the pins p25 - p26 (PWMOUT) to work as another serial port?
Or maybe this code will work directly?
#include "mbed.h" Serial serialsoft(p26,p25); int main() { while(1) { } }
Greetings
1 Answer
10 years, 2 months ago.
I assume you mean the LPC1768? No you cannot use PWM pins are serial pins, they are completely different. And you'll find out if you try that code it will result in the error pattern.
There is a softserial lib: http://mbed.org/users/Sissors/code/BufferedSoftSerial/. You can use that on almost any pins (to receive the RX pin needs to be an interruptin capable pin), and it is best to use it on the slowest Serial you are using. Its speed is limitted.
Hi Erik, with that library i can use the pins 25-26 as another serial port and uses the other serial ports the way i always used in the mbed normally?
posted by 27 Jun 2014