32MS250 UART failure

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

Moderator: Benj

Post Reply
Pascal_2016
Posts: 89
Joined: Wed Aug 31, 2016 4:48 pm
Been thanked: 4 times

32MS250 UART failure

Post by Pascal_2016 »

Hello

CPU 32MS250

My config settings are as follows:

#pragma config FNOSC = FRCPLL
#pragma config FPLLIDIV = DIV_2
#pragma config FPLLMUL = MUL_20
#pragma config FPLLODIV = DIV_2
#pragma config FPBDIV = DIV_1

#pragma config DEBUG = OFF

#define GetSystemClock() (40000000ul)
#define GetPeripheralClock() (GetSystemClock())

#include <plib.h>

My config settings for UART are as follows:
channel 2, Baud_List = 9600, DBit = 8bit,TXRemap = PORT B4, RXRemap = PORT A1.
The bits are too slow on Port B4.

With my settings
U2MODEbits.BRGH = 1;
U2BRG = 84;
The data is transferred with 9600 baud

What I am doing as wrong.
Please Can You help me

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: 32MS250 UART failure

Post by Benj »

Hello,
CPU 32MS250
Really not sure what chip you mean by this. Can you please double check this is correct.

Pascal_2016
Posts: 89
Joined: Wed Aug 31, 2016 4:48 pm
Been thanked: 4 times

Re: 32MS250 UART failure

Post by Pascal_2016 »

The CPU ist 32MX250

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: 32MS250 UART failure

Post by Benj »

Sounds like this is linked to the clock issue you're having. If you fix that then this should also be fixed.

Brendan
Posts: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

Re: 32MS250 UART failure

Post by Brendan »

We've overcome a number of... 'challenges' getting the UART baud rate and associated registers correct for a given clock frequency with this PIC family.

The following information may possibly be of some assistance when working with these complex new devices...

http://stackoverflow.com/questions/1770 ... -baud-rate

http://www.microchip.com/forums/m824389.aspx

http://www.microchip.com.tw/Data_CD/Ref ... 20UART.pdf


Best regards,

Brendan

Post Reply