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.
How to send binary data
As a result of using a "putc" to transmit the binary data for each byte , it is not possible to send . Please tell me how to 1 byte or multi-byte send binary data .
Question relating to:
1 Answer
10 years, 2 months ago.
I think the putc() can handle the binary data.
For just in case, I tried next code on mbed LPC1768.
It seems the output is fine.
#include "mbed.h" Serial serial( p28, p27 ); int main() { char c = 0; while( 1 ) { serial.putc( c++ ); } }
You can use putc to send and getc to receive any character from 0x00 to 0xFF over a serial port. Same with pc.putc to send data to the PC.
posted by Chuck Davis 06 Feb 2015