head's up: LGT8F328P is allegedly a chinese clone of the atmega328p
Something to be aware of, in case you order one but get the other.
On the positive side, it can run at 32mhz, and it has some other improvements, so it's not all bad. I'd be curious as to how its power consumption compares.
Looks like the same chip than in the Wemos XI.
I didn't manage to get a decent sleeping consumption with it so I gave up. Didn't try too much to be honest, I didn't see the interest in wasting time to pay the board 1$ instead of 2.
It's far from a perfect clone, it has enough differences to need a different arduino core.
Doesn't look interesting!
huex last edited by
this only 3RMB, from LGT-QQ chat group ,someone sleep and get 10UA, and LGT timer bester than atmega ..
Some of the youtubers are saying it can run at 32Mhz all the way down to 1.8v. That could maybe lead to interesting power savings, though sleep current will probably dominate in most use cases. Has anyone else here heard as to whether sleep current is 10ua?
Many, if not most, of the AVR's, including the newer ones, have sleep currents of 100na, which is still pretty awesome for battery applications. I'd like to give some of the newer chips a test drive. Anyone have any favorites? The only thing gluing me to AVR is the extensive range of arduino libraries, both official and on github, and I'd be reluctant to give that up. Am I right that with MCUDude's libraries, a vast array of the AVR's can run arduino code and arduino libraries? I think even just incremental improvements over the venerable atmega328p are worth exploring. Simple things like more SRAM, maybe more flash, an RTC, more timers with more bits, multiple UART's, SPI's, and I2C's. That seems to be what's on offer. Strangely, no speed improvements that I'm aware of.
Well, answering my own question, the atmega4809 seems to be the best of the most recent AVR chips--more memory, more flash, more UARTS, an RTC, and still has a sleep current of 100na in shut down mode while retaining the contents of all of its memory. And, interestingly, the cost is less on mouser than it is for the atemega328p. It's the chip used in the Arduino "Nano Every". However, it has no extra SPI's or I2C's as compared to the atmega328p. In fact, if I'm not mistaken, none of the low power AVR chips do.
virtualmkr last edited by virtualmkr
Hi @NeverDie, I also like the Atmega4809. I have an Nano Every here to play with. It has 6KB RAM and 48KB flash memory. That's all nice. But software compatibility is the problem.
Looks like it needs a new HAL architecture implememtation for MySensors. When I try to build a simple MyS project with Arduino IDE I get:
~\Documents\Arduino\libraries\MySensors/MySensors.h:89:2: error: #error Hardware abstraction not defined (unsupported platform) #error Hardware abstraction not defined (unsupported platform) ^~~~~ exit status 1 Error compiling for board Arduino Nano Every.
@virtualmkr I don't speak for mysensors, but while it may not yet be officially supported, I would imagine that it should work, other than maybe OTA updates/bootloader, provided that it's wired up correctly. I could be wrong, but I think you may just need to comment out whatever it is that's causing the compilation to abort with an error. Maybe some of the pin mappings need to change, but I wouldn't imagine it's terribly dramatic. If you have the gumption, give it a try and report back. After all, the atmega4809 has more flash and more ram. Running on lesser hardware would be potentially not feasible, but running on superior hardware shouldn't be a show-stopper if you work around the obstacles.
virtualmkr last edited by
@NeverDie No thanks
To write a complete architecture HAL for MySensors is a lot of work. Search e.g. in the MyHwSAMD .cpp code for "TODO: Not supported!". And this HAL already exists since years!
There are other construction sites in MySensors that are more worth the development effort.
@virtualmkr If you say so. I'd wadger if SPI is working on the atmega4809, and just regular arduino basics, that there's not a lot of adaptation needed. But I guess to prove it I'd have to do it, and I have other priorities at the moment.