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
Baud Rate changes in project
- 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
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.
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.
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
Re: Baud Rate changes in project
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
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