CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC24EP - Change baud rate speed at runtime

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
benoitstjean



Joined: 30 Oct 2007
Posts: 568
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PIC24EP - Change baud rate speed at runtime
PostPosted: Wed Feb 05, 2025 9:20 am     Reply with quote

Device: PIC24EP512GP806
Compiler: 5.026

Hi guys,

Its been a little while.

Is it possible to change the UART speed at runtime?

Reason you ask? Because my PIC is tied to a modem which runs at 115200 by default. Initially when the PIC boots, to make sure that it talks to the modem and configures it properly, I want them both to run at 115200 and when all has been successfully initialized, I want both the PIC and modem to switch to 230400. For the PIC, it's just a matter of sending AT+IPR=230400 but once that is sent, how to I switch the PIC's UART to 230400?

Thanks!

Ben
Ttelmah



Joined: 11 Mar 2010
Posts: 19730

View user's profile Send private message

PostPosted: Wed Feb 05, 2025 10:53 am     Reply with quote

Yes.

set_uart_speed

Obviously with stream name, and required baud rate.
Only for a proper hardware UART though.
benoitstjean



Joined: 30 Oct 2007
Posts: 568
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Wed Feb 05, 2025 1:16 pm     Reply with quote

Oh geez, was looking in the help and didn't see that!

Great, thanks!

Ben
Ttelmah



Joined: 11 Mar 2010
Posts: 19730

View user's profile Send private message

PostPosted: Thu Feb 06, 2025 3:54 am     Reply with quote

For some reason that is missing in the 'linked' stuff at the end of the #USE
RS232 page in the manual, but is mentioned in the setup_uart entry.
One of the manual 'oddities'.... Sad
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group