There isn't many examples for PIC32MZ demonstrating register level programming,
and what there is, isn't collected in one place.
This forum: General PIC32 Topics is maybe the closest you will get.
In the product webpages for PIC32MZ devices, there are a couple of register access examples hidden in plain sight, between all the Harmony stuff.https://www.microchip.com...s/en/PIC32MZ2048EFG100
Select the Documents tab, and scroll down to Code Examples.
Many peripherals in PIC32MZ devices,
are very similar to corresponding peripherals in PIC32MX, PIC24 and dsPIC33 devices,
so with sensible coding, and use of device support files: <xc.h>,
it is possible to make code portable between these devices, for many peripherals.
There are differences in Oscillator Setup, many more options in MZ, especially around PLL.
On top of that, there are Errata on Crystal oscillators, so most development boards use selfcontained external oscillator modules.
Differences in Interrupt handling: All IRQ and Vector numbering is different.
There are other differences and some tricks with Interrupt setup also, most will be taken care of by the compiler.
ADC in PIC32MZ is the same as in PIC32MK, and very different from PIC32MX.
Family Reference Manual for the ADC, have good descriptions, and source code examples using register access.
I have example program running on PIC32MZ2048EFG100
on a Digilent Wi-Fire board:
I2C Master and Slave,
FatFs filesystem from ELM Chan writing to Micro SD card,
ADC inputs from on-board Pot and Power voltage divider, and from external Analog connector,
UART output U4TX to RF8 (and U4RX input from RF2) to USB bridge, at 38400 bit/s.
But with FatFs long filename configuration enabled, and corresponding Unicode support source file,
the Package file is 794 kB, and that is too large to upload in this Forum.
post edited by Mysil - 2019/04/10 05:33:14