Page 1 of 1

PIC32mx270f256b timing issues

Posted: Sun Mar 05, 2017 1:23 am
by Zane
Hi,

I am running a program that is sending a string out at 2400 baud and also turning an LED on and off every 500 mS. When you look at the attached trace from the LED it is turning on and off every second. Also with the baud rate set to 2400 in FC the actual baud rate is 9600. I have had a look at the config data and think that the config bits are set correctly. The crystal i am using is 19.6608 Mhz and set accordingly in the config. I am running the Beta version V7.2.0.3
1.jpg
1.jpg (3.98 KiB) Viewed 4664 times
2.jpg
2.jpg (2.9 KiB) Viewed 4664 times
Thanks

Re: PIC32mx270f256b timing issues

Posted: Mon Mar 06, 2017 12:16 pm
by Benj
Hello Zane,

Maybe try changing the "peripheral clock divisor" configuration setting to /2 or /4 and hopefully that should bring down the speed of the UART peripheral to the required baud rate.

Also here is a new definition file you can try to see if this improves the 2X delay problem.

Simply copy the file to your "Flowcode 7/FCD/PIC32/" folder and restart Flowcode.

Let us know how you get on.

Re: PIC32mx270f256b timing issues

Posted: Tue Mar 07, 2017 7:27 pm
by Zane
Hi Ben,

Thanks for the new definition file.
Maybe try changing the "peripheral clock divisor" configuration setting to /2 or /4 and hopefully that should bring down the speed of the UART peripheral to the required baud rate.
I will try adjusting the peripheral clock divisor and see how that goes with sending out the correct baud rate.

Cheers

Zane

Re: PIC32mx270f256b timing issues

Posted: Tue Mar 14, 2017 10:58 am
by Zane
Hi Ben,

I have tried the new definition file, unfortunately the the Led still turns on and off every second instead of every 500mS. I have adjusted the peripheral clock divisor and that has solved the problem with the baud rate.

Thanks