Flowcode V5 : PIC 18f14k50 and RS232 baudrate

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
Steve_L
Flowcode v5 User
Posts: 10
Joined: Tue Feb 04, 2014 4:39 pm
Has thanked: 6 times
Contact:

Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Post by Steve_L »

Hello everybody!

I am trying to use a PIC 18F14k50 in order to communicate with a module using serial communication.
This module works with an 115200 baud rate.
In the RSR232 properties (in flowcode), the baud rate is limited to 38400. An option exists to use a custom baud rate. I used it and set the baud rate to 115200 as my module.


My final aim is to find which quartz I have to use to get this baud rate.
After reading the Datasheet (http://ww1.microchip.com/downloads/en/d ... 41350c.pdf) I found at pages 190,191,192 and 193 informations about that. Something like 8 arrays are giving the quartz's value according to three parameters (SYNC, BRGH and BRG16).

I do not know how are configured those parameters when flowcode send my program to the chip. :(

Is there someone who knows which configuration I have to use?

Thanks! :D

Best Regards,

Steve

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: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Post by Benj »

Hi Steve,

The faster the crystal the more likely you will be able to hit the frequency. A baud crystal e.g. 19.6608MHz will help to hit the correct baud delay on the nose.

Flowcode does all the calculations for you so as long as the clock speed is set correctly in the project options and delays seem to be correct then the baud should also be correct.

If your having problems then start with a 1 second flasher program to sanity check all the basics and take it from there.

User avatar
Steve_L
Flowcode v5 User
Posts: 10
Joined: Tue Feb 04, 2014 4:39 pm
Has thanked: 6 times
Contact:

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Post by Steve_L »

Hi Ben,

Thank you for your answer!

The highest quartz in the datasheet is 18.432MHz but this frequency does not appear in Flowcode. Then I hope 12MHz (present in the datasheet and in Flowcode) will be suficiente for a speed of 115200. :wink:

Best Regards,

Steve

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Post by medelec35 »

Hi Steve,
Steve_L wrote:The highest quartz in the datasheet is 18.432MHz but this frequency does not appear in Flowcode
You can manually enter 18432000 for the clock frequency in flowcode.
You do not have to stick with the fixed values.

Martin
Martin

User avatar
Steve_L
Flowcode v5 User
Posts: 10
Joined: Tue Feb 04, 2014 4:39 pm
Has thanked: 6 times
Contact:

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Post by Steve_L »

Thank you Martin :D , I finally used a 11059200Hz quartz.

Post Reply