Forbiden tech from China has arrived :-)

Go To Last Post
33 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's right, I ordered a board with the infamous AVR clones from Logic Green. It's an Ocrobot Alpha with the  LGT8F328P MCU. The board itself is pretty crappy, no crystal, uses an internal 32MHz oscillator divided by 2 (16MHz).

So it's kind of an Arduino clone, comes with the optiboot bootloader. But is this MCU a piece of crap, or should Microchip be worried and start preemptive lawsuits? I will test it and find out.

 

 

The markings on the MCU have been erased, but I did a memory dump (the flash is mapped as a RAM address, like the new Tiny models) and it checks out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

El Tangas wrote:
the infamous AVR clones from Logic Green

Are you referring to this: http://www.avrfreaks.net/forum/a... ?

 

The http://www.mcugreen.com/?page_id=5074 link in that post seems to be dead.

 

Bug google suggests this: http://www.electrodragon.com/w/Arduino_LGT

 

Datasheet (Chinese): http://www.electrodragon.com/w/images/4/47/Lgt8fx8p_databook_v1.0.1.pdf

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, it has the same chip, but what I bought is this. It was not easy to find.

 

Edit: There is also a forum (in Chinese, like the datasheet sad fortunately there is google translate).

Last Edited: Wed. Aug 9, 2017 - 03:32 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The most interesting feature of this MCU seems to be the uDSC, which is a math coprocessor. It has a 32 bit accumulator, 2 16 bit registers and can do 16 bit DMA to/from the SRAM. It will take me quite a while to figure it out.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

  Do you have to load a driver for Windows in order to use this new USB-serial IC?   For the Nano, one must download and install the CH341 driver.  Also, with Windows10, I had to disable the "driver signature verification", a weird, paranoid, poorly documented, cumbersome process that Microsoft forces on its customers.

 

Did you get the 12-bit ADC working?  Or the DAC?   Are there guides to the 0.1" break-out board pins/vias?  It looks like D13 (SPI clock) is not on the silkscreen, or, it might have a different name.

 

Does it load Arduino programs using AVRdude like the standard Arduino?

 

It looks like there is a "pop off" USB micro-B style connector.  Do the side mounting tabs go into plated-thru holes or are they simply soldered onto the PCB top?

 

Please keep us informed on your explorations on this new board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chinese, like the datasheet 

Or you can get the English version, the chip can run at 32MHz!!

 

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking at the datasheet it seem to have the M328PB pinout with the extra pin functions.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:

Hello,

  Do you have to load a driver for Windows in order to use this new USB-serial IC?   For the Nano, one must download and install the CH341 driver.  Also, with Windows10, I had to disable the "driver signature verification", a weird, paranoid, poorly documented, cumbersome process that Microsoft forces on its customers.

This one has the Holtek HT42B534 USB to serial. The driver auto-installed on Windows 10 (a "up-to-date" test machine with Win 10 crap), had to install manually on my dev PC (Windows 7, but auto update service is offline, so that doesn't mean anything, it may auto-install on a default configuration), but I have not done extensive test for other windows versions.

 

Simonetta wrote:

Did you get the 12-bit ADC working?  Or the DAC?   Are there guides to the 0.1" break-out board pins/vias?  It looks like D13 (SPI clock) is not on the silkscreen, or, it might have a different name.

ADC: Not tested yet.

DAC: I wouldn't call it an actual DAC, it's a programmable resistor ladder, without buffer, so it has no driving capacity.

Guides: Maybe on that forum link I posted in #3, or on this awful site, but most updated stuff is in Chinese.

SPI: I'll post a pic of the backside, the silkscreen is more detailed.

 

Simonetta wrote:

Does it load Arduino programs using AVRdude like the standard Arduino?

Yes, it comes with a bootloader compatible with Arduino. But there is a problem, the auto-reset via DTR doesn't seem to be working (I don't understand why not, maybe DTR is not connected to reset. Maybe it can be modded to work). So you have to press the reset button manually right before the upload, like in the bad old days.

The Arduino stuff can be downloaded from the MCU manufacturer site. As usual, only the Chine version is up-do-date.

 

Simonetta wrote:

It looks like there is a "pop off" USB micro-B style connector.  Do the side mounting tabs go into plated-thru holes or are they simply soldered onto the PCB top?

Its mounted through-hole, however the leads are very short and don't reach the other side. See the picture bellow.

 

js wrote:
Or you can get the English version, the chip can run at 32MHz!!

You know how Atmel has the "Summary" and "Complete" datasheets? That one is the summary. The complete one is Chinese only.

 

Simonetta wrote:

Please keep us informed on your explorations on this new board.

 

I willyes

 

 

Backside pic:

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there a 'head in pillow' solder defect on the mcu pin 4 decoupling cap, or is it just an illusion?

 

 

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You mean on the smaller cap? Yes, it might, I can't tell for sure. Good catch, I will rework it a bit.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh!  They have a 32k flash version now?  I noticed when the LGT88 was announced, but and 8k chip wasn't very interesting (particularly with ATmega8 selling for $1.  Though perhaps those are actually the LGTs in counterfeit packaging...)

 

You said you confirmed 32k was present, right?

 

(and: another cheap SOIC USB chip!   that's cool, too!)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I programmed the chip to do a memory dump, and the bootloader is at word address 0x3A00 (mapped to data address 0xB400), so it must have 32k flash, as expected.

 

This is the memory map from the datasheet, with a few notes of my own.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Huh.  The text might be in Chinese, but those are REALLY NICE diagrams (pretty much throughout the manual!)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This time, I'm posting a simple timer output test.

 

The LGT8F328P has 4 timers, 3 of them are compatible with the ones on the Mega 328P, plus one extra 16 bit timer. These timers have several extra features, for example, they can be connected to an internal clock source than runs at twice the main internal oscillator, i.e. @64MHz.

 

This means that irrespective of the CPU frequency, high frequency signals can be generated from the timer outputs. The following are square wave outputs from timer0 @32MHz, 16MHz and 8MHz. Due to the rise and fall times of ~20ns for the I/O ports, the higher frequency outputs are hardly "square". The CPU is running @16MHz in every case.

 

1) CTC mode with internal 64MHz clock source and OCR0A = 0 (32MHz square wave output)

 

2) CTC mode with internal 64MHz clock source and OCR0A = 1 (16MHz square wave output)

 

3) CTC mode with internal 64MHz clock source and OCR0A = 3 (8MHz square wave output)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The rise and fall times seemed a bit slow to me, so I compared with one of my Chinese nano clones, with a real Mega 328P. Indeed, the Mega has sharper edges than the LGT clone.

 

Nominal 62.5 ns pulse (8MHz square wave)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As I remember (from reading about the 8k part), is that one port it extra high current:

Is this a "normal" IO or high current?

 

 

One of the reasons I was looking at those parts (but never tried them), was the speed, like a rcall with ret take 3clk where it on a normal avr take 7clk, and MUL only 1 clk

 

Do you have a feeling for how big the gain on a "real" program is ? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hai

Interesting chip and added features than real 328p.
Did you order from Singapore ?

Regards
Tiro

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

As I remember (from reading about the 8k part), is that one port it extra high current:

Is this a "normal" IO or high current?

 

 

One of the reasons I was looking at those parts (but never tried them), was the speed, like a rcall with ret take 3clk where it on a normal avr take 7clk, and MUL only 1 clk

 

Do you have a feeling for how big the gain on a "real" program is ? 

 

About the current, I'm not sure... there are several series with the AVR clone CPU, that they call LGT8XM core. The high current peripheral doesn't seem to be always present. The chip I have doesn't seem to have it, I'm not sure because the datasheet I have doesn't have electrical characteristics!

Datasheet examples for different series:

Series A and B, have the high current pins: http://www.lgt-semi.com/wp-content/uploads/2015/06/LGT8F88AB_databook_v1.1.2.pdf

Series D, has opamps: http://www.lgt-semi.com/wp-content/uploads/2016/03/LGT8FX8D-Series-Databook-v1.0.5.pdf

Series P (the one I have), has math peripheral: already linked in post #2. Note that this link is not from the manufacturer, they don't have the datasheet on their site (weird), and the datasheet is incomplete, like I said, no electrical characteristics.

 

Regarding the performance, I intend to test it eventually. Do you have a suggestion that I could use as benchmark? Also, the model I have (LGT8F328P) has a math peripheral that can do 16x16 bit multiplies to generate a 32 bit result and other operations, like division.

 

Using the math peripheral (with a specialized library), and given that it needs to move data around a lot, because of the limited number of registers and move operations available, I estimate 1/4 to 1/2 the math performance of a Cortex M0 at the same frequency. But normally 8bit MCUs are not used for tasks involving high math performance, right?

 

Edit: This may all seem a bit strange to us, but it looks like their official sales channel is a shop in TaoBao, and I think that is not unusual in China. Here is the link.

Last Edited: Sat. Aug 12, 2017 - 04:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interestingly under "Special processor functions" it shows "SWD Two-line debugging / Mass production interface" not quite DW??

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Edit: This may all seem a bit strange to us, but it looks like their official sales channel is a shop in TaoBao, and I think that is not unusual in China. Here is the link.

 

They sell AU MEGA328P-AU for $0.86 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

China has already made numerous counterfeit (or working clones with low quality). But the only real thing in those clones were the microcontrollers. From now-onward even the MCUs are going to be clones!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I disagree.   There is excellent technology that comes out of China.    Often far in advance of U.S. or Japan.

 

Atmel produced a pin-compatible 8051 with their AT90S8515.

 

It looks as if the Logic Green Silicon is a pin-compatible ATmegaxx8 with significant 'extras'.

 

There are a whole range of Silicon designed for and used by the Chinese domestic market.

The manufacturers often do not bother to produce English language datasheets.   And do not bother with the non-Chinese market.

 

It is not surprising that a clever Silicon design team can improve on a 20 year old AVR core and peripherals.    CAD tools,  ideas,  fabrication have all advanced over this period.

And Compiler technology has improved too.

 

Just look at Expressif.   ESP8266 and ESP32 have documentation, tools,  and real life modules that are very impressive.

Compare their performance with an AVR.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

China also manufactures REAL and high-quality iPhones, PCBs, etc, etc. But I am talking more specifically about the "counterfeit" product market of china. Despite of some added features in their 100% AVR compatible clones, it does not seem that it is any sort of legitimate production without the permission of Atmel and Microchip.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why should they have a permission?

Do Atmel(microchip) have one for the 80LP51 ? I don't think so!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is a big difference between stealing a complete silicon design and a pin-compatible or tool-compatible.
No one ever complains about fab-less startup companies. Plenty of ASICs start this way. And many clever CPU cores and peripheral silicon.
.
Yes, I am always a bit suspicious of cheap electronics on Ebay. Some will be QC rejects. Some are just good marketing. e.g. Arduino clones with genuine ATmega328P but cheaper CH340 USB chips.
.
I have ordered some 328P and a 328D boards. I would like to buy a SWDICE too. But I can't make any sense out of the link in #20.
Google translate works on the home page but not on any 'shopping' page. At least with Firefox.
.
David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use Firefox also, sometimes it helps if you translate Taobao in a "private mode" navigation window. It's strange, like they have some kind of anti-translate protection.

 

Edit: or google translate has some built-in weakness, that only allows some pages to be translated using their browser...

Last Edited: Tue. Aug 15, 2017 - 02:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cyber Freak wrote:

China also manufactures REAL and high-quality iPhones, PCBs, etc, etc. But I am talking more specifically about the "counterfeit" product market of china. Despite of some added features in their 100% AVR compatible clones, it does not seem that it is any sort of legitimate production without the permission of Atmel and Microchip.

 

Creating compatible clones can be done in a perfectly legal way, Western companies do it all the time.  Generally, Western companies prefer to create original designs but that is, more to do with marketing. They want you to think they have some special stuff. If you are only interested in making a thin margin by copying a product, then cloning is very common. Just look at the supermarket brands that are cheaper copies of the originals, often mimicking the shape and style. Smart manufacturers play along, by actually making the copies! e.g. same cereal, different box.

 

What is not allowed :

1) "passing off" - applying someone else's brand and styling

2) trademark violation

3) improperly accessing "trade secrets"

4) patent violation

5) copying software, e.g. that might be in ROM

6) copying "mask works"

 

Low cost economies often start in the counterfeit market, then move to clones, then to original products as their skill bases increase. There are certainly plenty of smart people in China, I've worked with some.

Bob.

Last Edited: Tue. Aug 15, 2017 - 02:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

El Tangas wrote:

I use Firefox also, sometimes it helps if you translate Taobao in a "private mode" navigation window. It's strange, like they have some kind of anti-translate protection.

 

Edit: or google translate has some built-in weakness, that only allows some pages to be translated using their browser...

 

I have not got anywhere.   If anyone can navigate around this website,  please could they help.

 

AliExpress and other Chinese sites are quite capable of mailing an item to an address in the UK.   

All that they need is : the item,  my postal address and debit card.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In a recent thread, the process of buying on Taobao was somewhat explained. Seems complicated and I've never tried, in fact I think they deliver to the US, but not Europe, so I didn't bother. But maybe they'll deliver to the UK? Who knows.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why should they have a permission?  Do Atmel(microchip) have one for the 80LP51 ?

Probably.  My understanding is that one of the reasons that the 8051 architecture has been so successful is that Intel's licensing terms (even back when it was actively licensing the architecture) were extremely reasonable.  No royalties, for example.

 

 

There is a big difference between stealing a complete silicon design and a pin-compatible or tool-compatible.

These chips appear to be a significant re-design of the AVR (16bit ALU, for instance.)  So they're not "stolen silicon."

What they have copied is the basic architecture, instruction set, and basic peripheral operation; things that have always been a pretty gray area.   An instruction set doesn't quite qualify for a patent, nor for copyright protection (although vendors have tried.  and done stuff to avoid "infringing" (thus the z80 has a different set of instruction mnemonics than the 8080.)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

when Atmel made 2051 and 4051 they paid royalties to intel, that was why they started with AVR!

(and could only make  small chips that couldn't replace  "real" 8751).

 

I really think that the LP versions got around that.

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My TTGO XI boards have arrived !!!

Ordered on 12 Aug.   Delivered on 18 Aug.   This must be the fastest shipment that I have ever received from China.

(I think that I paid $1.50 extra for China Post instead of "Free" delivery)

 

I suppose that I will have  play with them.

 

David.

Last Edited: Fri. Aug 18, 2017 - 02:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I soldered the board into a Protoshield.   So I can swap hardware from Uno, Mega, Zero, NUCLEO, ...

First test is to rotate LEDs on D0 - D13.   Worked first time.

However pinMode() does not seem to work on A0 - A5 pins.  i.e. digital mode does not work.

I2C seems to work ok on A4, A5

 

There does not seem to be a separate AVCC pin.   Do I need to connect the SWC, SWD pins?

I presume that AREF already has a 100nF and you do not connect it to power.

 

I am using the Arduino core from https://github.com/wemos/Arduino_XI

 

David.

 

Edit.   Solved it.   lgt8fx8x_init() disables digital with DIDR0 register.   Subsequent pinMode() should enable/disable digital as required.   i.e. needs a patch in wiring_digital.c

Last Edited: Fri. Aug 18, 2017 - 11:22 PM