Baud rate change in the software
Moderator: Benj
-
- Posts: 33
- Joined: Tue May 08, 2012 3:48 pm
- Location: Germany
- Has thanked: 7 times
- Contact:
Baud rate change in the software
Sorry? Translated with Google
I use a serial LCD display from 4D Systems.
It always starts with 9600 baud.
How can I start at 9600 baud, and then switch to 38.000baud (115.000 baud).
The command for the display, I can send. Then I have to change the baud from the PIC. Are there any C code for it? I do not know C code.
Thanks in advance Uwe
I use a serial LCD display from 4D Systems.
It always starts with 9600 baud.
How can I start at 9600 baud, and then switch to 38.000baud (115.000 baud).
The command for the display, I can send. Then I have to change the baud from the PIC. Are there any C code for it? I do not know C code.
Thanks in advance Uwe
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Baud rate change in the software
Hello,
Which 4D display are you using? I think by default the baud rate is started at 9600 and then automatically ramped up when possible but this may not be the case for all the displays.
Also are you using software or hardware mode?
Which 4D display are you using? I think by default the baud rate is started at 9600 and then automatically ramped up when possible but this may not be the case for all the displays.
Also are you using software or hardware mode?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 33
- Joined: Tue May 08, 2012 3:48 pm
- Location: Germany
- Has thanked: 7 times
- Contact:
Re: Baud rate change in the software
I use PIC18f46k80 and the hardware interface. 64Mhz
The display uLCD-43PT.
It starts at 9600 baud.
Then I want to increase the baud.
so I analyze the data from the touch display quicker.
at 9600 baud, it takes about 0.5 seconds.
Regards Uwe
The display uLCD-43PT.
It starts at 9600 baud.
Then I want to increase the baud.
so I analyze the data from the touch display quicker.
at 9600 baud, it takes about 0.5 seconds.
Regards Uwe
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Baud rate change in the software
Hello Uwe,
Which display type do you currently have selected in the gLCD component properties. I believe the best choice may be the EB076 option.
With the EB076 display option the speed is ramped up to 19200 after the init but only if you are using a hardware UART to control the display.
Can you attach your program so I can see what you have got so far?
Which display type do you currently have selected in the gLCD component properties. I believe the best choice may be the EB076 option.
With the EB076 display option the speed is ramped up to 19200 after the init but only if you are using a hardware UART to control the display.
Can you attach your program so I can see what you have got so far?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 33
- Joined: Tue May 08, 2012 3:48 pm
- Location: Germany
- Has thanked: 7 times
- Contact:
Re: Baud rate change in the software
The display is controlled via the serial interface with your own commands.
I can write on the screen, draw, view pictures.
I check the touchscreen.
I query the TS whether an area is pressed.
answer 1
I query the TS whether an area is pressed.
answer 2
I query the TS whether an area is pressed.
answer 3
Now I ask the TS to get the position.
Answer 00 20 00 35
From this I calculate the Touchpukt a = 00 b = 00 * 256 +20 * 256 +35
The display has 480 x 272 pixels
That I must show measurements.
This all works.
Just not fast enough.
Regards Uwe
I can write on the screen, draw, view pictures.
I check the touchscreen.
I query the TS whether an area is pressed.
answer 1
I query the TS whether an area is pressed.
answer 2
I query the TS whether an area is pressed.
answer 3
Now I ask the TS to get the position.
Answer 00 20 00 35
From this I calculate the Touchpukt a = 00 b = 00 * 256 +20 * 256 +35
The display has 480 x 272 pixels
That I must show measurements.
This all works.
Just not fast enough.
Regards Uwe
-
- Posts: 33
- Joined: Tue May 08, 2012 3:48 pm
- Location: Germany
- Has thanked: 7 times
- Contact:
Re: Baud rate change in the software
Sorry, an error has crept.
a = 00 * 256 + 20
b = 00 * 256 + 35
Regards Uwe
a = 00 * 256 + 20
b = 00 * 256 + 35
Regards Uwe
- Attachments
-
- MCP3421_x3_18f14k50_2.fcf
- Test
- (76.65 KiB) Downloaded 217 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Baud rate change in the software
Hello Uwe,
Aha I see now your simply using the RS232 component to control the display. What about trying the gLCD component instead and setting the properties to the EB076 type display. This should give you all the display functions plus touchscreen and should also perform the speed increase for you.
Otherwise you perform the speed increase like this.
UART_Send(0x51); //Update Baud Command
UART_Send(0x0C); //Update to 57600bps
UART_Receive(255); //Try to collect Ack
UART_Update_Baud(6); //Update UART baud to 57600bps
Other baud rates are available but you will have to change the 0x0C for the correct 4D baud command, 115200 is 0x0D.
0 - 1200
1 - 2400
2 - 4800
3 - 9600
4 - 19200
5 - 38400
6 - 57600
7 - 115200
Aha I see now your simply using the RS232 component to control the display. What about trying the gLCD component instead and setting the properties to the EB076 type display. This should give you all the display functions plus touchscreen and should also perform the speed increase for you.
Otherwise you perform the speed increase like this.
UART_Send(0x51); //Update Baud Command
UART_Send(0x0C); //Update to 57600bps
UART_Receive(255); //Try to collect Ack
UART_Update_Baud(6); //Update UART baud to 57600bps
Other baud rates are available but you will have to change the 0x0C for the correct 4D baud command, 115200 is 0x0D.
0 - 1200
1 - 2400
2 - 4800
3 - 9600
4 - 19200
5 - 38400
6 - 57600
7 - 115200
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 33
- Joined: Tue May 08, 2012 3:48 pm
- Location: Germany
- Has thanked: 7 times
- Contact:
Re: Baud rate change in the software
Hi Benj,
This change I do not unfortunately.
I think the change in the PIC.
In Flowcode RS232 is initialized at 9600 baud.
So I can talk to the display.
I can change the display to a different baud.
Thereafter, the RS232 connection is interrupted.
The PIC runs at 9600 and the display with 115000Bautrate.
How do I turn now to the PIC to 115000 baud?
Regards Uwe
This change I do not unfortunately.
I think the change in the PIC.
In Flowcode RS232 is initialized at 9600 baud.
So I can talk to the display.
I can change the display to a different baud.
Thereafter, the RS232 connection is interrupted.
The PIC runs at 9600 and the display with 115000Bautrate.
How do I turn now to the PIC to 115000 baud?
Regards Uwe
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Baud rate change in the software
Hello,
You call the function I suggested above.How do I turn now to the PIC to 115000 baud?
If you don't have this function in your RS232 component then please ensure you are using the latest version of Flowcode which is v5.4 for PIC.UART_Update_Baud(6); //Update UART baud to 57600bps
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 33
- Joined: Tue May 08, 2012 3:48 pm
- Location: Germany
- Has thanked: 7 times
- Contact:
Re: Baud rate change in the software
I have not seen.
One should be able to read!
Thank you.
This brings me on now.
Thanks again
Regards Uwe
How can I make the forum a self programmed baud error calculator is available?
One should be able to read!
Thank you.
This brings me on now.
Thanks again
Regards Uwe
How can I make the forum a self programmed baud error calculator is available?