Page 1 of 1

Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Posted: Tue Feb 04, 2014 5:14 pm
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

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Posted: Tue Feb 04, 2014 5:34 pm
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.

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Posted: Wed Feb 05, 2014 11:56 am
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

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Posted: Wed Feb 05, 2014 4:28 pm
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

Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate

Posted: Mon Feb 10, 2014 12:01 pm
by Steve_L
Thank you Martin :D , I finally used a 11059200Hz quartz.