Page 1 of 1

PIC 32MX320

Posted: Fri Nov 15, 2019 7:31 pm
by Pascal_2016
Hello

I have a chipKIT-Uno32 board I can also use this under flowcode 8, or i have to consider some special features

Re: PIC 32MX320

Posted: Sat Nov 16, 2019 5:55 am
by QMESAR
Hi
Yes you can use the chipKit u3 directly out of FC8 and it also programs over the boot loader out of FC 8

Re: PIC 32MX320

Posted: Sun Nov 17, 2019 1:43 pm
by Pascal_2016
Hello,

QMESAR thank you so much for pointing that out. I have selected the "ChipKit UNO 32 Bootloader" template and made port E0 blink at 1.0 Hz intervals. My oscilloscope showed a frequency of 1.33 Hz which seems a bit too high to me. After adding the component "UART (Serial)" I wanted "UNO32... "is output. After I build, Serial was only output with confused characters. From my point of view the clock frequency set by FC8 does not match the actual clock frequency of the 32MX320.

With a reconstructed Arduino Sketch the ChipKit board runs without problems.

Do I have to change or adjust anything afterwards?

Can anyone help me solve the problem?

Re: PIC 32MX320

Posted: Sun Nov 17, 2019 1:54 pm
by QMESAR
Hi
What exact board do you have ? there are two hardware variants the UNO32 ind the uC32 from chipkit that might cause issues
also if you have selected the correct board please post your FC chart for the team to investigate the issue for you
:D
P1.jpg
P1.jpg (24.99 KiB) Viewed 4219 times

Re: PIC 32MX320

Posted: Mon Nov 18, 2019 11:13 pm
by Pascal_2016
Hello,

I have a chipkit UNO32. Bootloader as shown in the appendix.

Re: PIC 32MX320

Posted: Sat Dec 07, 2019 7:22 pm
by Pascal_2016
Hello

I have configured the PIC 32MX320F128H as follows:

#pragma config FWDTEN = OFF
#pragma config POSCMOD = OFF, FNOSC = 7, FPBDIV = 0

FRCDIV = 0

So the clock frequency is 8MHz. Proved by blinking LED and oscilloscope.

Then I set the UART as follows:

U1BRG = 103; // Baudrate 19200 at 8MHz Sys-Clock
U1STA = 0;
U1MODE = 0x48008; // Enable UART for 8-bit data and SYS clock
// No Parity, 1 Stop bit
U1STASET = 0x1400; // Enable Transmit and Receive

Result:
the UART sends 9600 Baud instead of 19200

I have the same values when I use the UART initialization component


Adding the register entry CLKSEL in UxMODE has no effect on the behavior of the UART.

Can someone help me set up the UART registers correctly?

Re: PIC 32MX320

Posted: Tue Dec 10, 2019 10:03 am
by stefan.erni
Hi Pascal

You can use the component UART and add a C code below with a simple code. Test if 103 is correct for your speed.

regards

Stefan

32MX320F128H_V2_mod.fcfx
(9.31 KiB) Downloaded 301 times