But I have no idea to how to program it without the ATMEL-ICE or the Xplained pro board as they are quite expensive.
Could someone suggest some other way to program the controller using an arduino uno maybe? please help!
There are patches for implementing PDI on USBASP programmers: ATxmega and company: ATxmega programmer for $0.50
It should be possible to do something similar with the "Arduino as ISP" sketch (Hmm. Perhaps not, since the protocol it uses doesn't include PDI commands? I dunno.)
Getting support for the new chip in avrdude may also be a problem.
I thought there were plans to use this in an official Arduino board? But there has been no word of it for months... Making an Arduino core that works with the new peripherals will be a big job, since they are so different - the capability is so far beyond what the normal AVRs can do - I think the harder part is figuring out how to present them in a simple, Arduino-y way.
The Arduino Uno WiFi rev2 will use the ATmega4809. I believe the first indication of how this will be accomplished was made public today. It looks like they are creating a dedicated hardware package for the "megaAVR" architecture:
My initial reaction is that I would prefer that they added ATmega4809 support to the Arduino AVR Boards hardware package but I do understand that the ATmega4809 is significantly different. I haven't looked at the hardware package at all.
There's also something screwy with the Arduino pin labels along the top. They all seem to be shifted over one to the right but the A5* and A4* are just wrong.
Is Slave Select not on pin 10? If it is on 22 then where will that be available at?
Perhaps it is not available. That would prevent the board from being used as an SPI slave, and sidestep the issue that occasionally comes up with "You can't use pin10 as an input if you're using the SPI interface, even if you're using a pin other than pin10 for chip select." (although it seems that the 4809 SPI controller has other ways around that, anyway.)
USART2 seems to be an alt on pins 3 and 6, why is it not set up with the serial library.
Sheesh. Serial to the USB, separate Serial on pin0/1, separate Serial to the WiFi, and you want MORE? Hmmph! Maybe they were worried about using up that extra RAM all on infrastructure...
Waiting for schematic, I guess...