Microchip questions for you all.

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Microchip questions for you all.

Postby chad » Tue Oct 22, 2019 11:05 pm

Hi all. I have a project that I want to work on and I had been using the St arms.. FLowcode has some shortcomings with the ST chips so I wanted to see what Pic's you all are working with.

What 24 / 32 bit pics are you guys using? What do you use to program them pickit3? or something else..
Any other Pic info that is useful?

Thanks,

Chad

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Wed Oct 23, 2019 12:37 am

I am looking at Pic 32MZ0512EFE064. Does any one have any experience with this family and flowcode?
Matrix says it's supported. Do the peripherals and dsp stuff work?

Chad

User avatar
Benj
Matrix Staff
Posts: 14313
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4405 times
Been thanked: 4128 times
Contact:

Re: Microchip questions for you all.

Postby Benj » Wed Oct 23, 2019 11:05 am

Hi Chad,

The PICkit 3 or 4 is used to program most if not all PIC devices and can be integrated into Flowcode so the complie to chip uses this.

We often use the dsPIC33EP256MU806 device family in house and so this should be fairly bullet proof. The PIC32 devices and ST ARM devices are the two newest families to Flowcode but we do try and jump on issues as they arrise.

If you do find a problem with a specific device then let us know and we can investigate.

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Thu Oct 24, 2019 8:53 pm

Hi Ben,

Thanks for the info. I ordered the PiCkit 4 and will get some chips to play with...

chad

stefan.erni
Posts: 513
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 161 times
Been thanked: 146 times
Contact:

Re: Microchip questions for you all.

Postby stefan.erni » Fri Oct 25, 2019 9:05 am

Hi Chad

I've had a great experience with PIC32MZ2048EFG100 and Flowcode. For the evaluation you will find many cheap demoboards, very well documented. Some even add Eagle or Altium files. Also to develop your own board is easy. You have so many PIC32MZxxxx with more or less pins available.
Some more infos here
viewtopic.php?f=76&t=21332


regards

Stefan
These users thanked the author stefan.erni for the post:
QMESAR (Fri Oct 25, 2019 4:28 pm)
Rating: 5.26%
 

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Fri Oct 25, 2019 4:34 pm

HI.
For your reference you can also use the Mplab Harmony SW framework to configure and setup the PIC32 and use the normal C code in FC

https://www.microchip.com/mplab/mplab-harmony

P2.jpg
P2.jpg (89.74 KiB) Viewed 657 times

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Fri Oct 25, 2019 6:19 pm

That's great guys, Keep it coming! It's been a decade since I have touched a pic.

Chad

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Fri Oct 25, 2019 7:52 pm

Something else
if you go the the device page https://www.microchip.com/wwwproducts/e ... 2048EFG100 under documents you will find all related documents / Application notes and code examples a useful resource all put in one place

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Fri Oct 25, 2019 10:12 pm

It's nice that they dump it all right there.. I am also looking at the smaller PIC32MX174F256B for little things. I am glad to hear that they work well with flowcode.. What oscillator frequencies are people using?

Chad

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Fri Oct 25, 2019 10:24 pm

One more question... Do any of these have any program writable registers or do I have to add some external flash i2c/spi to store changeable variables?
I am still going over the datasheets but the answer hasn't jumped out at me yet... (eeprom)

thanks,
Chad

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Sat Oct 26, 2019 3:34 pm

Hi
on the MX devices most people use the 80 MHz and the MZ devices 200MHZ
you can write to flash but here starts the limits with FC, you have to do that by C code ,I did not need that up to now may be Stephan knows more about this he played quite a bit with FC and PIC32MZ - adding SPI and I2C eeprom is easy as FC supports that directly

Just as an info any special features of these chips is not supported by FC we do this by using C calls and do our own config and drivers

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Thu Nov 07, 2019 8:59 am

Hi Guys,

Ok so after fighting with the pk4 it sometimes shows up in IPE and I can see the chip on my protoboard.

Ok so it seems to be programing ok now.


Also I have a 12mhz oscillator How should I be setting the clock stuff?? Sorry new chip, still learning..
Does any one have a blank program for the mz with the goods set?

I made a little program that just toddles a bit in a while loop and It is toggling at 144khz. I played with some of the multiplier settings and it doesn't seem to change the freq. I could use some guidance on config stuff..

**edit:
Qmesar: thanks for the info it is starting to click a little. I have a hello world on a little i2c display working now.. YAY just not sure what I am missing in the config.


Thnaks!!
chad

stefan.erni
Posts: 513
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 161 times
Been thanked: 146 times
Contact:

Re: Microchip questions for you all.

Postby stefan.erni » Thu Nov 07, 2019 10:07 am

Hi Chad

Which of this PIC are you using now?

PIC32MX174F256B (80Mhz)

PIC32MZ0512EFE064 (200Mhz)

Are you using just the PIC or do you have a complet demoboard?

regards

Stefan

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Thu Nov 07, 2019 10:50 am

Hi Stefan,

I am using the PIC32MZ0512EFE064 (200Mhz). I used a tqfp breakout board board and soldered it up, so I don't have a real demo board.

It is kind of working, but I am new to the chip and programmer and config bits so I am going through all of the learning curve.
I have a PK4, and I am using a 12mhz oscillator. I had a hard time getting the programmer to like my computer. It would show in windows but FC or X IPE wouldn't see it. I played the usb port shuffle game and it is mostly working now. I am able to get FC to toggle a bit and have got a i2c display to print a hello world and mostly successfully program it.
My big question mark is the clock configuration. I have been reading the clock flow chart from the datasheet but I am too new to it and it hasn't sunk in yet. I am just trying to get the chip clocked up to ~200 and stable then I can get back into FC and start in on my project.

Thanks,
Chad

It's almost 3 am here and I am going to head to bed... lol

stefan.erni
Posts: 513
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 161 times
Been thanked: 146 times
Contact:

Re: Microchip questions for you all.

Postby stefan.erni » Fri Nov 08, 2019 1:57 pm

Hi Chad

At first... there is a wrong config from FC8 for the PIC32MZ0512EFE064.
The max clock is 200MHz and not 80Mhz.

Maybe Ben can fix it....

You are using a 12 Mhz Osci external. You can use MPLAB IDE with Harmomy to generate the Fowcode-Project Options- configure- parameter.

It looks like the pictures. Do you know that the PIC has a built-in 24 Mhz osci that you can use?

regards

Stefan

pic32mz0512EFE64.PNG
pic32mz0512EFE64.PNG (120.09 KiB) Viewed 318 times
These users thanked the author stefan.erni for the post:
QMESAR (Fri Nov 08, 2019 2:44 pm)
Rating: 5.26%
 

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Fri Nov 08, 2019 2:48 pm

Stefan thanks for the nice post :D
@chad if you are not aware Harmony is not installed if you install MPLABX, you need to go to the Harmony page on MC web page and do it manually the configuration addin I am not 100% sure but I think you have to installed that also once you have installed Harmony worth while checking this out

User avatar
Benj
Matrix Staff
Posts: 14313
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4405 times
Been thanked: 4128 times
Contact:

Re: Microchip questions for you all.

Postby Benj » Fri Nov 08, 2019 5:56 pm

Hello,

At first... there is a wrong config from FC8 for the PIC32MZ0512EFE064.
The max clock is 200MHz and not 80Mhz.

Maybe Ben can fix it....


Thanks for the spot, done! :D
These users thanked the author Benj for the post:
QMESAR (Fri Nov 08, 2019 6:04 pm)
Rating: 5.26%
 

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Fri Nov 08, 2019 7:54 pm

Thanks, guys great information!

Stefan, I Knew it had an internal oscillator, I didn't know it was 24mhz. I was always under the impression that internal oscillators weren't very accurate. If it is good enough for usb's and and serials then that would be great! One less thing to put on the board!

I did install harmony and play with it a little. I hadn't found the OCI config stuff yet but it will look for it!

Thanks! Keep the good info coming!

Chad

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Sat Nov 09, 2019 1:45 pm

I didn't know it was 24mhz. I was always under the impression that internal oscillators weren't very accurate

The MC internal Fast oscillators are very accurate !
never used the PIC32MZ Internal OSC but on the P16/18 they are very accurate I am using Internal with Serial and USB on a PIC16F1455
they actually have a OSCTUNE register that allows you to calibrate it but in my experience the standard OSCCON setting is accurate enough by far :D

chad
Posts: 131
Joined: Sun Nov 04, 2018 7:13 pm
Has thanked: 23 times
Been thanked: 28 times
Contact:

Re: Microchip questions for you all.

Postby chad » Sat Nov 09, 2019 8:43 pm

That is really interesting!. I have my chip running with the internal oscillator right now.
I have been playing with the harmony configurator. I used it to help me figure out the clock configs then just changed them in the configuration in FC. I haven't figured out what files it generates need to get imported into fc and where to stick them yet, but slowly things are coming into place.

Thanks again guys for helping get a newbie up to speed. I bought fc almost a year ago for my st arms and had to give up because of issues. Switched to pic32 and hopefully they can get things working on them. I have yet to complete a project with fc.

chad

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Sun Nov 10, 2019 6:58 am

Hi chad,

I think the chances for you to get a project done in FC with a PIC32 is quite good as there are more support from users and Ben on PIC32
I am quite sure we will get you to do a project (Hopefully :D )

good luck the PIC32 is not the PIC you worked with 10 years ago :D :D

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: Microchip questions for you all.

Postby QMESAR » Sun Nov 10, 2019 8:26 am

Hi Chad

I have been playing with the harmony configurator. I used it to help me figure out the clock configs then just changed them in the configuration in FC. I haven't figured out what files it generates need to get imported into fc and where to stick them yet


Well this is how I do it also and I think Stefan too , there is not really any way to include external generated files into FC.
for example - I use MPLABX code configurator to generate me a driver for UART then I use the functions created by MPLABX in a C call block in FC works fine for PIC32MX,and PIC16/18 however MZ is only supported in the high level Harmony and did not try that as yet but it should be possible also
maybe Ben can help us with some info here :D