PIC32mx270f256b timing issues

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

PIC32mx270f256b timing issues

Post 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 4166 times
2.jpg
2.jpg (2.9 KiB) Viewed 4166 times
Thanks
Attachments
Flowcode3.fcfx
(7.93 KiB) Downloaded 287 times

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: PIC32mx270f256b timing issues

Post 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.
Attachments
32MX270F256B.fcdx
(52.73 KiB) Downloaded 250 times

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: PIC32mx270f256b timing issues

Post 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

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: PIC32mx270f256b timing issues

Post 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

Post Reply