7 years, 11 months ago.

use serial port


I need the use serial communication bitwen PC and u-blox C027. I want use port P4_28 and P4_27 for send data ( char ) to PC .

I have serial adapter USB to RS232 => MAX232 => port serial C027.

I have already looking on library serial "Serial pc(TX, RX);" . now i need the declaration of ports P4_28 and P4_27 for use it in code.


Question relating to:

The u-blox-C027 is a complete starter kit that allows quick prototyping of a variety of applications for the Internet of Things. The application board has a MAX-M8Q GPS/GNSS receiver and …

1 Answer

7 years, 11 months ago.

P4_28 and P4_27, exactly as you say. Although doesn't it have a USB port on it already which you can use for exactly this? And if you want to use a seperate USB <> Serial adapter, there are also many which directly go to TTL voltage levels, so you don't have to let it make RS232 levels, and then convert that against to TTL levels.

thanks for your answer .

I use now an adapter USB to serial + MAX232 + serial port on C027 P4_28 and P4_29

schema :


code :

#include "mbed.h"
#ifdef TARGET_UBLOX_C027
 #include "C027_api.h"
 #error "This example is targeted for the C027 platform"

    DigitalOut myled(LED); 
    // open the PC serial port and (use the same baudrate)
    Serial pc(D1,D0);
int main() 
    while (1)
        myled = !myled;

but I can't receive data .

posted by amzil rida 21 Jun 2014

So which pins are D1 and D0? On standard Arduino layout they are USBTX and USBRX, so you should just be able to receive it via the USB connector, no need to bother with an external adapter. Just make sure you install the drivers you require. https://mbed.org/handbook/SerialPC

posted by Erik - 21 Jun 2014