FTDI Community

General Category => Discussion - Software => Topic started by: sanka1p on November 22, 2022, 09:58:49 PM

Title: FT260 changing Baud rate
Post by: sanka1p on November 22, 2022, 09:58:49 PM
Hi All,
How do we change the baud rate of FT260? I compiled and ran the sample example that is provided in LibrbaryFT260. From there I came to know that by default FT260 is running at 115200 baud rate. I want to change this to 9600. How can I do that?

Thank you.
Title: Re: FT260 changing Baud rate
Post by: FTDI Community on November 23, 2022, 03:12:38 PM
Hi,

Have a look at FT260 User Guide (https://ftdichip.com/wp-content/uploads/2020/08/AN_394_User_Guide_for_FT260.pdf). This shows how to set the buad rate on FT260.

Best Regards

FTDI Community
Title: Re: FT260 changing Baud rate
Post by: sanka1p on November 23, 2022, 04:14:22 PM
Yes, I saw that. But what is the input it is expecting. For example when I run uart.exe(From librbaryFt260) in my command prompt. How to set the baud rate in that command prompt? The datasheet gives us a register but to to set that register?
Title: Re: FT260 changing Baud rate
Post by: FTDI Community on November 24, 2022, 04:33:42 PM
Hi,

you need to change the Baud rate in the sample code and then rebuild it.

ULONG ulBaudrate = 115200;
    if (FT260_UART_SetBaudRate(handle, ulBaudrate) != FT260_OK) {
        printf("UART Set baud NG : %d\n", ftStatus);
    }

So change 115200 to 9600 and then rebuild the example.

Best Regards

FTDI Community
Title: Re: FT260 changing Baud rate
Post by: sanka1p on November 29, 2022, 08:18:02 PM
I changed the baud rate of FT260 to 9600 and my MCU baud rate is also 9600. Now when I execute sample uart.cpp project, I am only receiving the first character i.e 'a' from that sample and not the whole string. Can you tell me why? In my MCU program , I am trying to capture whole string. .
Title: Re: FT260 changing Baud rate
Post by: FTDI Community on December 01, 2022, 03:43:28 PM
Hi,

i tested this for you and i am able to receive the full string at a Baud rate of 9600. See the attached capture. This is what my write looks like:

 // Write data
    ftStatus = FT260_UART_Write(handle, buffer, 10, 10, &dwRealAccessData);
    if (FT260_OK != ftStatus)
    {
        printf("UART Write NG : %d\n", ftStatus);
    }

Best Regards
FTDI Community