PIC32MZ2048ECH Example File Support

General discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
ckelley
Posts: 9
Joined: 14 Feb 2019 22:28

PIC32MZ2048ECH Example File Support

#1 Post by ckelley » 28 Aug 2019 21:28

I am very new to the MikroE PIC32 platform. I ordered the EasyPIC Fusion 7 PRO, with the intent to do some prototyping using mikroPascal. Currently I am using mikroPascal PRO for PIC32. None of the PIC32 examples are for the PIC32MZ,the default MCU is a PIC32MX series controller. Consequently, I need to have prior knowledge of the meaning of the registers to be able to interpret and port over examples for the PIC32MX to a PIC32MZ device, which I do not have.

I don't use PICs often, and I don't have any kind of established process or intuition to be able to comb through the nebulous datasheet and find what registers on one PIC32 are implemented as in another PIC32. I would appreciate if someone would either teach me how to fish or provide examples for me to learn from here.

I'm a pretty well established programmer, so I'm not looking for coding lessons, just how to become more familiar, quicker with the implementation details of with the PIC32MZ (and others) so I can get more out of my time.

Thanks in advance,
ckelley

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PIC32MZ2048ECH Example File Support

#2 Post by stefan.filipovic » 29 Aug 2019 09:11

Hi,

There are some examples for PIC32MZ in the compiler\Examples\Internal MCU modules\P32MZ2048EFH144.

Kind regards,
Stefan Filipović

ckelley
Posts: 9
Joined: 14 Feb 2019 22:28

Re: PIC32MZ2048ECH Example File Support

#3 Post by ckelley » 29 Aug 2019 15:32

Yes, but not many. And in particular, not the ones that would be directly helpful for me.

Also, as I mentioned, I am not familiar with the PIC32MZ, particularly not all of the registers needed to fix the automatically generated code for the TFT code generated by the compiler for the PIC32MZ.

Since, as I mentioned I am not familiar with these registers, I am having difficulties doing basic conversions from the code generated by the TFT, and all the examples dealing with PIC32MX MCUs to code that is immediately applicable, or helpful while using the EasyPIC Fusion 7 Pro.

So as I mentioned, my intent with the original post was to get help learning how to do these conversions to help myself learn more about how I can use the PIC32MZ for my projects.

Thanks
ckelley

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PIC32MZ2048ECH Example File Support

#4 Post by stefan.filipovic » 30 Aug 2019 11:29

Hi,

You need to use ANSELx registers instead of AD1PCFG for configuring pins to digital I/O. Also, you need to map pins which need to be mapped using PPS Mapping library and MCU datasheet as a reference.

Could you tell me which example from the \Examples\Development Systems\EasyPIC Fusion v7 folder would be useful for you?

I will try to adjust the one example from this folder for PIC32MZ2048ECH and attach it here for you.

Kind regards,
Stefan Filipović

ckelley
Posts: 9
Joined: 14 Feb 2019 22:28

Re: PIC32MZ2048ECH Example File Support

#5 Post by ckelley » 05 Sep 2019 15:18

I am trying to get up and running with the EasyTFT for the EasyPIC Fusion v7. As I mentioned before, the automatically generated code doesn't work. If you could prepare a sample project implementing some simple functionality with the EasyTFT, I would appreciate it.

I am trying to understand the difference between what the automatically generated EasyTFT code and what working code looks like. I know you mentioned that the ANSELx registers need to be used instead of the AD1PCFG, and I changed the ANSELx register I thought was applicable, but when I download, the EasyTFT screen doesn't show any of the buttons that I added, and just displayes all white.

This is my first time using this board and the MikroE compiler, and the first time using EasyTFT. So, it is very possible that I am doing something incorrectly.

Thanks for the help,
Caleb

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PIC32MZ2048ECH Example File Support

#6 Post by stefan.filipovic » 10 Sep 2019 08:24

Hi,

Please find the simple VTFT example for PIC32MZ and EasyPIC Fusion v7 in the attachment.

Kind regards,
Attachments
TFT.ZIP
(648.42 KiB) Downloaded 95 times
Stefan Filipović

ckelley
Posts: 9
Joined: 14 Feb 2019 22:28

Re: PIC32MZ2048ECH Example File Support

#7 Post by ckelley » 10 Sep 2019 14:16

Thank you for sending the example Stefan, but I have mikroPascal compiler. Can you tell me how I can convert it, or send one for mikroPascal?

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PIC32MZ2048ECH Example File Support

#8 Post by stefan.filipovic » 10 Sep 2019 15:55

Hi,

I apologize for the misunderstanding, please find the example written in mikroPascal in the attachment.

Kind regards,
Attachments
TFTPascal.ZIP
(448.1 KiB) Downloaded 81 times
Stefan Filipović

Post Reply

Return to “mikroPascal PRO for PIC32 General”