FRDM-K64 Serial communication basic example using mbed

Document created by Pedro Augusto Panecatl Salas Employee on Jun 27, 2014Last modified by ebiz_ws_prod on Dec 13, 2017
Version 5Show Document
  • View in full screen mode

Here you can find both the code and project files for the Serial communication project, in this example the serial port (UART) is configured to establish communication between the computer using a serial terminal and the evaluation board. The default baud rate for the serial port is 9600 bauds. The code also implements an echo function, any key pressed in the computer's keyboard will be captured and displayed in the serial terminal.


If your computer does not have a serial terminal you can download Tera Term from the following link:

Tera Term Open Source Project


The communication is established through the USB cable attached to the OpenSDA USB port.




#include "mbed.h"


//Digital output declaration

DigitalOut Blue(LED3);


//Serial port (UART) configuration

Serial pc(USBTX,USBRX);


int main()



    pc.printf("Serial code example\r\n");   








Original Attachment has been moved to:

Original Attachment has been moved to: