Proper way of changing baud rate on USB GLK?

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Proper way of changing baud rate on USB GLK?

Post by Fiery » Wed Jul 09, 2014 2:48 pm

Hi,

New user here. I'm wondering what's the proper way of increasing the baud rate from the default setting of 19200 to 115k, if the application driving the LCD uses FTD2XX API calls. Should I do this:

FT_OpenEx(...)
FT_SetBaudRate(handle,19200)
FT_SetDataCharacteristics(handle,FT_BITS_8,FT_STOP_BITS_1,FT_PARITY_NONE)
FT_Write(... "0xFE 0x39 0x10" ...)
FT_SetBaudRate(handle,115200)

Or should I rather do it a bit more direct as:

FT_OpenEx(...)
FT_SetBaudRate(handle,115200)
FT_SetDataCharacteristics(handle,FT_BITS_8,FT_STOP_BITS_1,FT_PARITY_NONE)
FT_Write(... "0xFE 0x39 0x10" ...)

Hardware is EGLK19264A-7T-USB, software enviroment is Win7 64-bit.

Thanks,
Fiery

Tino
Matrix Orbital
Matrix Orbital
Posts: 158
Joined: Wed May 22, 2013 9:04 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Tino » Thu Jul 10, 2014 7:47 am

Hi Fiery,

By default your GLK will be set to 19200. To change the baud rate to 115k you will first need to send the "Change Baud Rate" Command to 115k while communicating to the display at 19200.

From that point you will need to communicate to your display at 115k.

With that being said this should accomplish what you are trying to do:

FT_OpenEx(...)
FT_SetBaudRate(handle,19200)
FT_SetDataCharacteristics(handle,FT_BITS_8,FT_STOP_BITS_1,FT_PARITY_NONE)
FT_Write(... "0xFE 0x39 0x10" ...)
FT_SetBaudRate(handle,115200)

Thank you for posting on our forums.
If you have any other questions or concerns please feel free to ask.
Thank you
Martino
Martino DeLeon
Matrix Orbital
Technical Support Representative

Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Fiery » Thu Jul 10, 2014 9:49 am

Thank you for your reply. One more concern/question about baud rate: on which USB-based Matrix Orbital LCD products can we safely increase the default baud rate of 19200 to 115k? Or any device would work at 115k, as long as they use a USB connector? Or maybe RS232 products can do the same as well?

Tino
Matrix Orbital
Matrix Orbital
Posts: 158
Joined: Wed May 22, 2013 9:04 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Tino » Thu Jul 10, 2014 11:46 am

Hi Tamas,

All Matrix Orbital Displays can have their baud rate changed.

Thank you
Martino
Martino DeLeon
Matrix Orbital
Technical Support Representative

Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Fiery » Fri Jul 11, 2014 5:08 am

"All Matrix Orbital Displays can have their baud rate changed."

Yes, I understand that, but when I try to change the baud rate for my displays, any further communication gets corrupted. I've tried to increase the baud rate from 19200 to 28800, 38400, 57600, 76800, 115200 on both ELK204-7T-USB and EGLK19264A-7T, using the method you've provided, but didn't work out. While at the default 19200 baud rate both displays work just fine.

In my previous post I was actually wanted to find out if there's a detection method or other way to find out what's the safe maximum baud rate one can use for a particular Matrix Orbital display. In my software I want to make sure the serial communication works as fast as possible, so using the highest possible baud rate on all Matrix Orbital display would the ideal solution.

Tino
Matrix Orbital
Matrix Orbital
Posts: 158
Joined: Wed May 22, 2013 9:04 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Tino » Fri Jul 11, 2014 8:23 am

Hi Tamas,

After you change the Baud Rate to the display be sure to change the baud rate to the com port being used to match.

You can find the tested Baud Rates in the manuals for your displays.
ELK204-7T-USB:
http://www.matrixorbital.ca/manuals/LK_ ... 2.0%29.pdf

EGLK19264A-7T:
http://www.matrixorbital.ca/manuals/GLK ... 2.0%29.pdf
Martino DeLeon
Matrix Orbital
Technical Support Representative

Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Fiery » Fri Jul 11, 2014 10:00 am

"be sure to change the baud rate to the com port being used to match"

Since I'm using FTD2xx API, I assumed I only have to change baud rate with the API (FT_SetBaudRate) and with the Change Baud Rate command (0xFE 0x39). Is there a 3rd change I have to apply to increase the baud rate for the LCD? Where and how to do that?

Tino
Matrix Orbital
Matrix Orbital
Posts: 158
Joined: Wed May 22, 2013 9:04 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Tino » Fri Jul 11, 2014 10:43 am

Hi Tamas,

If you change the baud rate to the display and the baud rate of the comport you are using then you should be able to communicate properly still. As long as they are set to the same Baud rate.

what is happening when you change the baud rate on your displays?

Thank you
Martino
Martino DeLeon
Matrix Orbital
Technical Support Representative

Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Fiery » Sat Jul 12, 2014 6:39 am

Thank you for taking time trying to resolve this.

What I initially did and was working 100% fine was:

FT_OpenEx(...)
FT_SetBaudRate(handle,19200)
FT_SetDataCharacteristics(FT_BITS_8,FT_STOP_BITS_1,FT_PARITY_NONE)

What I'm trying to do, but fails to work is:

FT_OpenEx(...)
FT_SetBaudRate(handle,19200)
FT_SetDataCharacteristics(FT_BITS_8,FT_STOP_BITS_1,FT_PARITY_NONE)
FT_Write(handle,@molk_set_57k_baud,sizeof(molk_set_57k_baud),d_written)
FT_SetBaudRate(handle,57600)

Where molk_set_57k_baud is a 3-byte long structure (vector) that contains the following bytes:

0xFE, 0x39, 0x10

After increasing the baud rate to 57600, the characters shown on the display look like random ones, or the whole display stays dark, so not even setting the brightness and contrast work out. Obviously something is going wrong with the communication between the host and the LCD, but I cannot put my finger on which component fails exactly. It could be the driver or some other issue as well. I've tried it both on my ELK204-7T-USB and EGLK19264A-7T-USB. FTD2xx driver is v2.8.30.6, dated March-18-2004. OS is Win7 64-bit SP1.

Tino
Matrix Orbital
Matrix Orbital
Posts: 158
Joined: Wed May 22, 2013 9:04 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Tino » Mon Jul 14, 2014 8:19 am

Hi Tamas,

It may be when you are sending the command to change your Baud Rate You may be sending the wrong data.

To change the Baud Rate to 57600:

GLK19264A-7T-1U:
0xFE 0x39 0x22

LK204-7T-10:
0xFE 0x39 0x10

If you can check the data and make sure the proper values are being sent to the display.
It sounds like its a baud rate issue, if you could check the above this could fix it.

Thank you
Martino
Martino DeLeon
Matrix Orbital
Technical Support Representative

Clark
Matrix Orbital
Matrix Orbital
Posts: 861
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Clark » Tue Aug 12, 2014 1:50 pm

Hi Tamas,

I understand you're still having trouble communicating to your GLK19264 via the FTDI D2XX API. If possible, I would recommend using the Virtual Comp Port (VCP) method instead.

Please locate the com number of the virtual com port created by your GLK in your device manager, under the Ports heading. Then follow the same algorithm used in your D2XX calls, this time using the Windows File I/O library in conjunction with a Handle to the virtual com port. A simple C++ implementation is available here, if you need C code I should be able to provide that as well.

Cheers,
Troy
Troy Clark
Design & Development
Matrix Orbital

Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Fiery » Fri Aug 22, 2014 9:53 am

Thank you for the suggestion. I've implemented an alternative code path, to use Virtual COM Ports. Sadly, it acts absolutely similarly to the FTD2xx method: once I change the baud rate from 19200 to any other value, the EGLK stops responding to commands. It's a bit like it was hard-wired to work only at 19200 bps :(

Raquel
Matrix Orbital
Matrix Orbital
Posts: 689
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Re: Proper way of changing baud rate on USB GLK?

Post by Raquel » Fri Aug 22, 2014 11:01 am

Edited Post:
Please make sure that you have not inadvertently locked the display.
If you please check out Data Security (hardware or firmware data lock) in the manual.

Hi Tamas,

I have tried 57600 baud on my GLK19264A here (should be the same as the EGLK) and it works fine for me.
Please be reminded that after sending the command FE 39 22 (254 57 34 in decimal) you will need to change your com settings to 57600 because the command will immediately take into effect.
All your communication after the command should now be in 57600.

For the LK204-7T this command is: FE 39 10 (254 57 16 in decimal) please note the difference in the 3rd byte

Please let me know how it turns out.

Thank you,
Raquel Malinis
Design and Development
Matrix Orbital

Fiery
LCD Geek
Posts: 36
Joined: Wed Jul 09, 2014 2:38 pm
Location: Budapest, Hungary
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Fiery » Mon Aug 25, 2014 5:39 am

Thank you for trying to help me, but I'm on the verge of giving up now :( No matter which way I try (Vrtual COM Port or FTD2xx), my EGLK stops working properly as soon as I change the baud rate to any value other than 19200 bps. At the default 19200 bps it works perfectly though.

Just to make sure I don't miss anything: do I have to change flow control settings or issue any flow control related Matrix Orbital commands to the EGLK after switching its baud rate? Is there any other settings that I would have to alter after increasing the baud rate?

Clark
Matrix Orbital
Matrix Orbital
Posts: 861
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Re: Proper way of changing baud rate on USB GLK?

Post by Clark » Mon Aug 25, 2014 8:30 am

Hi Tamas,

The procedure will be to set up a com port object and confirm communications at 19200, issue the command to the display to change the baud rate, change the speed of the com port object to match the new display baud rate, and confirm communication once more. Other port settings should remain unchanged, our intelligent displays will expect 8 bits data, No parity, 1 stop bit with no flow control by default (please note that the flow control settings can be changed on some graphic units).

Before you give up, I'd recommend trying uProject to send the required commands. You can setup the com port on the Com Setup tab, confirm communication using the backlight on checkbox on the Main tab, and change the baud rate using the Uploader tab. To enter the baud rate command, please use Raw Data in the Other command tab, and enter the parameter string as /254//57//34/ for your GLK unit to change to 57600 baud. Then simply hit F9 to execute. After the command has been sent, move back to the Com Setup tab, change the host buad, and confirm communication in the Main tab once more.

Cheers,
Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests