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!
Best Regards,
Steve
Flowcode V5 : PIC 18f14k50 and RS232 baudrate
Moderator: Benj
- 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
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.
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.
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: Flowcode V5 : PIC 18f14k50 and RS232 baudrate
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.
Best Regards,
Steve
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.
Best Regards,
Steve
-
- 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
Hi Steve,
You do not have to stick with the fixed values.
Martin
You can manually enter 18432000 for the clock frequency in flowcode.Steve_L wrote:The highest quartz in the datasheet is 18.432MHz but this frequency does not appear in Flowcode
You do not have to stick with the fixed values.
Martin
Martin
Re: Flowcode V5 : PIC 18f14k50 and RS232 baudrate
Thank you Martin , I finally used a 11059200Hz quartz.