LGT8F328P (a 32MHz ATmega328P Clone?)

Just found out about the LGT8F328P - and my first thought was that it would make for a great beefed-up homemade Arduboy? (can run at 32MHz on an operating voltage of anywhere from 1.8V to 5V, and has an 8-bit DAC that could be used for improved sound?)

Boards can be found for super-cheap (under a buck) and the chips themselves can be had in QFP48, QFP32, and even a dual in-line SSOP20 package!

There’s a bunch of collected knowledge / documentation here:


I would love to see this.
Games like Starduino might run better on such a system.

If it’s based on an ATmega328P then that means it’ll probably only have 2KB of RAM instead of the ATmega32u4’s 2.5KB, which would prevent some games with higher RAM use from running.

There’s also the possibility of not supporting certain opcodes, but that’s probably less likely.
I’m not sure where that could be checked, but I know a likely candidate would be MUL.

32Mhz would be awesome but Starduino wouldn’t run at all: The 328P has only 2KB of ram.

If they also offer a 32Mhz version of a ATmega32u4 clone then it’d work, or anything with 2.5KB (or more) of RAM.

The current Turbo version will have to do for now :stuck_out_tongue:

@Pharap I’ve checked the datasheet, it looks like a complete clone, including MUL opcode. And not only does it runs at 32Mhz but a lot of opcodes are 1-2 cycles instead of the original’s 2-3 cycles.

I guess in theory I could cut the framebuffer in half (getting back 512 bytes) to fit and render in two halves but that’d take double the CPU time and there’d be an ugly visible tear in the middle of the screen. :thinking:

1 Like

Only way to get it to work properly would be to use TWO LGT8F328Ps and render in parallel.

It’d be easy enough to lockstep the two MCUs to render and transfer two halves of the screen.
Only need to transfer the inputs to make sure there isn’t any differences causing a de-sync and a frame-stepping signal.

Heck, put 4 in parallel so there’s enough RAM for the vertex cache. :rofl:

I think the ATXMEGA32AU4 Is more interesting. It’s basically an beefed up ATMEGA32U4. runs on 32MHz and has 4KB RAM for $2.00 :smiley:


Yes, but these chips cost around $0.20 - $0.40 USD each - you can’t build a $5 Arduboy with a $2 chip? :smile:


(Yes, this taobao page is the manufacturer’s official shop! :grimacing: )

$2 if you buy 5000 of them?!

I can kick in for 2 or 3 of them if it helps. :slight_smile:

1 Like

That’s cheap. And yes that would be a better candidate for $5 Arduboy

My bad. But I wouldn’t care if I had to pay $1 more if I only needed one.

I’ve looked up more info hoping to find a 32u4 clone which they don’t have, BUT!
The LGT8F328P also has a co-processor that does 16x16->32bits multiplication.
Just this would be a great speed up.

Most of the CPU time is spent doing 32bits fixed point mat3x4 * vec3 multiplication.

It’s too bad they don’t have a version with 2.5KB of RAM.
Would have to render in 64x64 to fit.

Sounds like a nice MCU to calculate 3D/4D curves (3D+extruder) and stepper motor speed scaling.

I wouldn’t call it a clone, it’s more of a (mostly) “compatible MCU”. Just like a AMD K6 isn’t a 486 clone.

Many opcodes run faster (1 cycle instead of 2, or 2 cycles instead of 3)
It uses flash to emulate the EEPROM, so you lose some of the 32KB if you want “EEPROM”.
It’s got an integer math co-processor.
It has a few more timers & PWM pins.
A x2 timer multiplier for 64MHz pin toggling / timer base (but the GPIOs can’t slope fast enough so I guess you’d need an amplifier to help it)
According to some avrfreaks forum posts a few of the more obscure less-used 328P features/glitches don’t behave exactly the same.

its probably designed from scratch.

1 Like

Hi I’m here now, what the hell is this thing, is it actually a clone?


The manufacturer promises 99% compatibility with popular ATMEga328P microcontroller by Atmel/Microchip.
What is the 1% uncompatibility nobody knows.


Curious though maybe this could work for the low cost version of Arduboy with an LCD screen? Just needs a some cheap chinese usb to serial bridge right? (and a fork of the library obvs)

Not neccessary, you could implement V-USB to add a low speed bootloader. When powered at 3.3V it only requires two resistors to hook it to USB

Doing so would extend the need for it to be it’s own build target but, would be stupid cheap with an LCD and that chip on it’s own, it would only be about a dollar or two potentially.

Especially if you drop the lipo and just use AA or AAA

Maybe you can even save on USB connector by using a thicker PCB (unless that’s more expensive then the connector though)

With LCD a CR2032 would problably be enough. those battery holders are most likely cheaper too.

coin batteries are hard to find, don’t last long for how much they cost, you can use rechargeable AAA’s pretty easily

Also designed to just run off usb, so a power bank is fine too.


And burn caustic holes in the windpipe/oesophagus of children and pets who may put them in their mouths and swallow them. Please don’t use coin cells if you make batteries user-replaceable.

I know this conversation is about a very BoM-cost-sensitive concept but I’d love to see a single AA/AAA running an Arduboy + LCD via e.g. Nanjing Micro One Elec ME2188.


Single AA with boost circuit would be pretty dope.

I actually think about this product from time to time:

Kinda like that general design feel.