how to configure different baud rate for single UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello Everyone,

   

 

   

I am using PSOC 3 family right now am working on UART communication where am trying to use only one  UART component then it should able to work on different baud rates based on the input (actually the input signal is available on various baud rates )so it has to detect the input baud rate automatically and then able to function accordingly based on the  baud rate

   

so can anybody suggest me how to configure different baud rates for same UART component 

   

Note :Actually if i set individual baud rate (using clocks it is working correctly) but i would like to create the functions to detect and respond accordingly for various baud rate inputs

   

ANy help or ideas or suggestion would be greatly apppreciated

   

 

   

thank you

   

prabhu

0 Likes
1 Solution
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I did a similar project but it is very old it here:  Uart baud rate

View solution in original post

0 Likes
8 Replies
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I did a similar project but it is very old it here:  Uart baud rate

0 Likes
Anonymous
Not applicable

Thank you for your kind reply in thE psoc3 i am  allowed to use only 8 clocks so how can i use different clocks for different baud rate could you please explain me some more information about you code how it is selecting the baud rate and in your program i did not see too many clocks for various baud rates could you also explain how your clock is working for different baud rate in your program the clock is mentioned 48mhz abd how it is getting converted for 1200, 2400 etc baud rates 

   

your informations could be really helpful for me to understand and implement in my logic

   

actually i understood your clock diving fucntionality mathmatically but logically i did not understand how it will divide and how it will select the respective clock

   

 

   

thank you

0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

The clock is always alone - in the Divider mode.
You simply change the divider and wait for some time for the changes to have taken place (can not remember how many msec).
May be be easier for you to create a simple test project.

0 Likes
Anonymous
Not applicable

Thank you so much for your kind reply and in my psoc creator 3.3 it is showing master clock 24MHz so i should set the divider to 13 or 26 (honestly i did not understand clearly what is the value of divider 26)? it means the UART clock divider will automatically change its baud rate after certain delay and how it will choose the respective baudrate? based on any input or we need to give any values?

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

26 - initially, when the   power  on.
For 24MHz :   Divider = 24000000 / (8 * baudrate)
those baudrate is 115200 for the divider = 26

0 Likes
Anonymous
Not applicable

Thank you so much for your kind reply i have understood the basic baud rate configuration but my aim is to continuously check the baud rate how can i change the divider value because my project should always searching for baud rate

   

for example at the begining the baud rate is 115200 and then after 0.5 seconds the baud rate is 1200 and then 0.5 delay baud rate is 2400 so how can i set the divider value i have gone through your example and i implemented the same logic as yours but my baud rate is not getting changed after certain delay what should i do inorder to obtain the periodical clock input change

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Yes, the task was more difficult.
I did not make the input velocity analysis function.
Can someone tell us ideas.

0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

My project for HC-04 does not analyze Rx baudrate.
He's just waiting for the device response to the command "AT" on different baudrate.
If the answer is the same as the standard ("OK"), it is considered that the baudrate defined.

   

add a simple example baudrate change.

0 Likes