Baud Rate changes in project

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times

Baud Rate changes in project

Post by Ron »

Hi,

I was wondeirng if I can change the baud rate to different rates in a flowcode project.

Example: Flowcode V3

There is am MP3 player that I can control via RS232, it must work at 2400 baud. I have a few RS232 boards that run at 115K2 baud.

Can I put the necessary "C" code in the MP3 macro, place the "C" code in MYDEVICE maco. I have 2 serial ports on the PIC, when talking to MP3 I want 2400 on it's RS232, when talking to MYDEVICE I want to talk at 115K2.

Is this possible in V3?

Is this possible in V4?

Thanks,

Ron

User avatar
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 changes in project

Post by Benj »

Hello Ron

In v3 you would have to use custom C code to drive the second UART.

In v4 you can create two RS232 components and attached each one to a seperate UART and assign a seperate baud rate. This way you can simply call the different components without having to mess around switching rates etc.

Ron
Posts: 225
Joined: Wed Apr 11, 2007 6:15 pm
Has thanked: 2 times

Re: Baud Rate changes in project

Post by Ron »

Hi Ben,

If I have only one RS232 port on my board and a toggle switch tied to input telling me which device is connected to my rs232 port can i have different "C" code in different loops of code that will allow my program to operate a single RS232 at different baud rates.

Example:

RA3 HIGH means MP3 player is connected so only code for MP3 will ever be solved, with "C" block in MP3 macro set to 2400 baud.

RA3 LOW means Board 2 connected so only code for board 2 is solved, with "C" block in board 2 macro set to 115K2 baud.

Will this work in V3? Eventually I want to get 18F8722 working which has 2 serial ports on it and hope to have a program that allows different devices to be connected.

Thank you,

Ron

Post Reply