Very first try at PIC32MZ2048EFH144, please Help!

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
Yves32
Posts: 49
Joined: 05 Aug 2013 15:53

Very first try at PIC32MZ2048EFH144, please Help!

#1 Post by Yves32 » 26 Jun 2018 01:27

I have a new EasyPIC Fusion v7 board
I have also a new MCU module with 32MZ2048EFH144
(I also have a PIC32MX460F512L)

The original led blinking program already installed in the new PIC32MZ is working as it should.
If I make a program, no matter what it is, it is compiled but not transferred to the board.
[If I change the MCU module to the PIC32MX, all is fine)

All I changed for PIC32MX to PIC32MZ is:
In the little program, I change Ad1PCFG to ANSELA=0, ANSELB=0 etc....
I go to the Project editor and and change the MCU number and frequency. I do the same for the mikro program suite.
Then, the transfer just start (the blue led blinks a little) but no program data is transferred to the board.
I guess something else must be done in the parameters. (????????)
I need help to get started, at least with the led blinker program.

User avatar
marko.stankovic
mikroElektronika team
Posts: 108
Joined: 18 Dec 2017 15:44

Re: Very first try at PIC32MZ2048EFH144, please Help!

#2 Post by marko.stankovic » 27 Jun 2018 08:35

Hi,

Can you attach a screenshot from mikroProg for Suite?
Select USB and then Show Devices from the drop down menu.
and then left click on mikroPog Firmware to get the firmware version.

Best regards,
mikroProg_Suite_For_PIC.jpg
mikroProg_Suite_For_PIC.jpg (48.41 KiB) Viewed 1932 times
Marko Stankovic.

Yves32
Posts: 49
Joined: 05 Aug 2013 15:53

Re: Very first try at PIC32MZ2048EFH144, please Help!

#3 Post by Yves32 » 27 Jun 2018 21:25

Thanks Marko for trying to help me.

This morning, I had a fresh start. I removed all ME stuff on my PC. I had my PC cleaned etc...
Then I downloaded again the compiler and programmer.
I loaded the Led Blinking program and changed the MCU in the project edit section as well as the code to
make all pins digital.
It works!
The Delay_ms(1000) is however out of "calibration". There must be a parameter to change.(???)
If I use a small program of my own it does not work. The compiler give me "unresolved extern 'hidInit0'
+bla=bla.
So, I will now try to start with the led blinking program and modify it.
I will post results later.
BTW: Progr Firmware 2.11
WDM Internal Version 6.00.16386
HW: v01.16.12.21

Yves32
Posts: 49
Joined: 05 Aug 2013 15:53

Re: Very first try at PIC32MZ2048EFH144, please Help!

#4 Post by Yves32 » 28 Jun 2018 13:27

OK, I have a project called Led Blinking working. I can modify it to do something else.
If I save it under another project name, while changing all references to LedBinking I still get this "Unresolved extern :
0 360 Unresolved extern 'hidInit0' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'configDescriptor1' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'device_dsc' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'stringDescriptors' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'hidInit0' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'configDescriptor1' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'device_dsc' __Lib_USB_MZ_HS.c
0 360 Unresolved extern 'stringDescriptors' __Lib_USB_MZ_HS.c

I have saved, in Project Edit, all the configs. Then loaded it into the new (name) project.
I still get this unresolved thing. (It is very sticky). Yet the original Led Blinking has something magic in it, what I cannot get in other programs.
-----------------------------------------------------------------------------------------
Using the Led Blinking program with changes, I first tried to make the TFT work:
This code is not recognized by the compiler:
sub procedure Init_Display()
TFT_Set_Default_Mode() ' Set TFT in default mode
TFT_Set_Font(@TFT_defaultFont,CL_Black,FO_HORIZONTAL)
TFT_Init_ILI9341_8bit(320,240)
TFT_Fill_Screen(CL_YELLOW)
end sub
sub procedure Cls() 'Clear screen
TFT_Fill_Screen(CL_YELLOW)
end sub
-----------------------------------------------------------------------------------------
I tried SPI:
this is not the proper code for MZ:
SPI2_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, 64,_SPI_SS_DISABLE, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE)
So it is for Mmc......
------------------------------------------------------------------------------------------
Well, I doubt I will ever get started, this MZ beast seems too different than the PIC32MX,
I am not any good at breaking this horse!

Post Reply

Return to “mikroBasic PRO for PIC32 General”