LGT8F328P Arduino Nano Clone

LGT8F328P Mini EVB

03/15/2021


I recently read about a copy / clone of the ATMega328p processor most commonly used in the Arduino boards (Uno, Mini, Nano Pro-Mini) and wondered what it was all about.
Hard to believe this has been around since 2015 and I’m just looking at it now.

The LGT8F328P is an instruction, register and pin compatible clone of the ATMega328p which means it will execute most binary code for that chip.

Ok so it’s a copy that maybe cost a few pennies less but what’s the big deal?

Well a closer look reveals that Logic Green made their clone chip just a little bit better in some areas than the original chip.

For one thing it can run at 32MHZ compared to 16MHz for the ATMega. The internal clock generator has improved accuracy so in most cases there’s no need for an external crystal or clock source.

The next feature that impressed me is the inclusion of an actual Digital to Analog converter providing true analog output on one pin. Furthermore the DAC and ADC modules share an internal reference voltage generator that’s of greater accuracy and has three output selections instead of only two. The analog to digital converter (ADC) resolution has also been increased from 10 bits to 12 bits.

The designers of this chip also managed to provide 7 additional GPIO pins (although not all are available on the little boards I got) and this chip can run at full speed on as little as 1.8vdc supply.

Other nice features are a handful of high current (80ma) outputs, a computing accelerometer (DSC) for high speed 16 bit calculations and PWM dead zone control.

The programming method is very different from the ATMega328p using a JTAG/SWD method so you will not be able to flash these devices with the standard programmers like USBASP or other AVR programmers but the units I got came with the a serial bootloader that works with the Arduino IDE and WinAVR’s avrdude. There’s also an Arduino sketch out there that will turn an Arduino (or another of these clones ) into a flash programmer if you really don’t want to use a bootloader or need to install or upgrade the bootloader.

It was easily able to follow online instructions for setting up the Arduino IDE to recognize this new device and with a couple of tweaks suggested online had the blink sketch working. Later I set up a couple of batch files to program the device using WinAVR and avrdude via the command line.(sample code is available for download at the bottom of this page)

I was able to get 3 of these little Nano V3 Clone boards for around $2.35 each on ebay.
The board contains the microcontroller with absolutely no markings whatsoever, a USB-Serial converter chip that’s new to me (HT42B534 ), 5v voltage regulator, reset button and a couple LEDs.

My Windows 10 system had no problem loading the driver for the USB-Serial chip.



Resources and Tools:

Here's a link to the instructions for installing the support files into the Arduino IDE: https://github.com/RalphBacon/LGT8F328P-Arduino-Clone-Chip-ATMega328P


The excellent Ralph Bacon Video: https://www.youtube.com/watch?v=Myfeqrl3QP0


LGT8F328P Installed on a Breadboard

CPU connection map

Board selection in Arduino IDE

Arduino sketch serial monitor output

LGT8F328P QFP32L Pins

Description of download links:

boards.txt Replacement boards.txt referred to in instructions

Lardunio_HSP-master.zip board support files

LGT8F328P_MiniEVB_Schematic.pdf my version of the Mini EVB schematic.

LGT8FX8P_databook_v1.0.5-English.pdf LGT8F328P translated datasheet

SerialMenu.ino Arduino sketch demonstrated UART, DAC & ADC @32MHz

uart_pb.zip WinAVR / command line demo program files.