FRDM-K64 Serial communication basic example using mbed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FRDM-K64 Serial communication basic example using mbed

FRDM-K64 Serial communication basic example using mbed

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.

Code:

#include "mbed.h"

//Digital output declaration

DigitalOut Blue(LED3);

//Serial port (UART) configuration

Serial pc(USBTX,USBRX);

int main()

{

    Blue=1;

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

    while(1)

    {

        Blue=0;

        pc.putc(pc.getc());

    }

  

}

添付
評価なし
バージョン履歴
最終更新日:
‎06-27-2014 10:56 AM
更新者: