Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove support of lgt8f88x and lgt8f328d/e ? #109

Closed
SuperUserNameMan opened this issue Feb 20, 2021 · 24 comments
Closed

remove support of lgt8f88x and lgt8f328d/e ? #109

SuperUserNameMan opened this issue Feb 20, 2021 · 24 comments

Comments

@SuperUserNameMan
Copy link
Contributor

SuperUserNameMan commented Feb 20, 2021

Hello,

as discussed here #108, we were wondering if it is worth it to keep support of the 88x, 328d and 328e variants ?

My point is :

  • 88x : this variant seems to be not available anywhere (could not find on Aliexpress)
  • 328d : is only available as Wemos XI board which is marked as retired by Wemos (and they already provide support for it)
  • 328e : does it really exist ?
  • edit : also 88x, 328d and 328e are not well documented compared to 328p ! (edit : found datasheet of 88x and 328d : add documentation for lgt8f88a and lgt8fx8d variants ? #107 )

Maybe we could focus on the 328p variants only ?

Does anyone use boards with other MCU than lgt8f328p ?

@SuperUserNameMan
Copy link
Contributor Author

( @dbuezas : poke ! )

@LaZsolt
Copy link
Collaborator

LaZsolt commented Feb 20, 2021

1.) I think 328d and 328e is a different name of 328d
In file lgtx8e.h the definition:

#ifndef _IOLGT8F88D_H_
#define _IOLGT8F88D_H_

2.) Boards with Larduino brand names equipped with LGTx8D MCU.

Red Larduino uno Green Ladruino uno Larduino mini (BTE17-10) Larduino nano (BTE17-11)
Larduino UNO red front small150 Larduino w (UNO) 328D front small150 Larduino w mini 328D front1 small150 Larduino w nano 328D front small150
  • and boards with Massduino names equipped with LGTx8D MCU too.

@SuperUserNameMan
Copy link
Contributor Author

SuperUserNameMan commented Feb 20, 2021

About Massduino boards :

They say they use a MD-328D mcu : is it different clone or a rebranded LGT8F328D ?

--
Regarding Larduino : I could not find any board on aliexpress, but the LGTMCU/Larduino_HSP redirects to OCROBOTS where we can find these :

EDIT : but they are "已停产产品" (discontinued products)

@jg1uaa
Copy link
Contributor

jg1uaa commented Feb 20, 2021

Before reading this issue, I ordered MassDuino(https://www.aliexpress.com/item/32655296623.html) and it might be arrived in next month if there should be no derivery problem.
I could not find the evidence that MD328D is completely same as LGT8F328D. But I think MD328D is close to LGT8F328D by comparing bootloader code.

And I ordered WAVGAT's Arduino R3 with WAVGAT-printed processor (https://www.aliexpress.com/item/4000587200875.html) 10 days ago. Do I have to check WAVGAT's BSP to identify LGT8F328-D or -P?

@SuperUserNameMan
Copy link
Contributor Author

@jg1uaa :
About the MassDuino, if they provide you datasheet to MD328D, that would be interesting.

About the WAVGTAT board, the aliexpress page says it is ATmega328. Maybe a rebranded genuine ATmega ? maybe counterfeit clone ? maybe recycled ? ...
If they don't tell you the truth about it, a benchmark might help you find if it is a real ATmega, a real LGT or an other clone version ...

And BTW : I'd be interested to see the results of the benchmarks here on your boards once you'll have them !

@SuperUserNameMan
Copy link
Contributor Author

SuperUserNameMan commented Feb 20, 2021

@jg1uaa :
Actually, the Wavgat MCU is printed : AVGA328P

EDIT : and according to this WAVGAT Arduino SDK the boards.txt files says :

  • the WAVGAT UNO R3 board uses optiboot_lgt8f328p.
  • the WAVGAT NANO 3.0 uses optiboot_lgt8f328d
  • and the WAVGAT Pro Mini uses a optiboot_lgt8f328d

@SuperUserNameMan
Copy link
Contributor Author

@LaZsolt
Copy link
Collaborator

LaZsolt commented Feb 20, 2021

@jg1uaa :

Do I have to check WAVGAT's BSP to identify LGT8F328-D or -P?

LGT8F328P core could work on 32 MHz.
LGT8F238D maximum working frequency is 20 MHz.
So if you set the internal clock prescaler without dividing at least 2, the CPU won't work.

@pixelwaster
Copy link

WAVGAT's Arduino R3 with WAVGAT-printed processor (and the Nano) are LGT8F328P chips. There is a link on the page for driver updates. The bootloader is optiboot_lgt8f [88/328] {a/d/ds/e/p}

@jg1uaa
Copy link
Contributor

jg1uaa commented Feb 20, 2021

Thanks everyone, I will test #77 benchmarks when I have received boards.
Programming sketch that works at 32MHz will be also good test... ok.

We can get MD328D stuff from http://www.inhaos.com/product_info.php?products_id=156#fragment-2 and datasheet is at http://www.inhaos.com/uploadfile/otherpic/DS-MD-328D-V01-20160412.pdf but this is same one (DOC ID:DS-MD-328D-V01-20160412) introduced by previous comment.

I hope SWDICE mkII/SWDISP will tell correct processor name to us, maybe this test needed.

@jg1uaa
Copy link
Contributor

jg1uaa commented Mar 8, 2021

Today I got MassDuino MD328D board and I am testing now.
tp3084284
tp3084287

To program MassDuino board, avrdude requires to set 115200bps, not 57600bps like this.
/home/pi/arduino-1.8.13/hardware/tools/avr/bin/avrdude -C /home/pi/arduino-1.8.13/hardware/tools/avr/etc/avrdude.conf -v -c arduino -p atmega328p -P /dev/ttyUSB0 -b 115200 -D -Uflash:w:bench_primenumbers.ino.hex:i

I used LGT8Fx (our project) to build sketch and I set variant as 328P-LQFP32 wemos-TTGO-XI. Variant 328D(rare) did not work.

the result of prime number benchmark(bench_prime numbers) is:
118sec @ 16MHz (UART 9600bps)
236sec @ 8MHz (UART 19200bps curiously)
did not work at 32MHz

And finally I tested tiny uDSC test (http://www.uaa.org.uk/gomitext/2021/20210301/udsc_test.ino), there is no evidence of uDSC.
At this point, I think MD328D is LG8F328"D" and we have to some work for supporting this board.

I have not connected SWDICE mkII/SWDISP yet, is this test needed?

@SuperUserNameMan
Copy link
Contributor Author

@jg1uaa :

At this point, I think MD328D is LG8F328"D" and we have to some work for supporting this board.

I think you're going to become the MD-328D and LGT8F328-D specialist from now.

If you want to improve support for this D variant, I wrote this wiki page that might help you with the preprocessor :
https://github.com/dbuezas/lgt8fx/wiki/Identifying-MCU-and-board-variants-using-preprocessor

@jg1uaa
Copy link
Contributor

jg1uaa commented Mar 11, 2021

Have anyone tested D variant already?
I tried to run Blink.ino, something strange... the code turns LED on and off with each 1000ms delay, but it looks about 2000ms. I changed LGT8Fx's optiboot_lgt8f328d_extosc.hex bootloader from MassDuino's default, same result.

postscript:
I found Green Ladruino uno at taobao, https://s.taobao.com/search?q=larduino+lgt8f328d

@SuperUserNameMan
Copy link
Contributor Author

@jg1uaa : @LaZsolt mentionned issues with D variants here : #64 (comment)

@LaZsolt
Copy link
Collaborator

LaZsolt commented Mar 11, 2021

@jg1uaa
I ordered a Massduino nano. Perhaps it will arrive next week.
Try to run the blink sketch both D and P variant parallel.

@jg1uaa
Copy link
Contributor

jg1uaa commented Mar 28, 2021

This issue is related to #118, bootloader.
Currently there is five bootloaders; for lgt8f88a, lgt8fx8ds20, lgt8fx8e, lgt8fx8p and lgt8fx8ps20. If dropping support for 88x series, we can maintain bootcode easier.
I think source tree for 328D, 328P and 328P-SSOP20 can be merged.

@LaZsolt
Copy link
Collaborator

LaZsolt commented Mar 28, 2021

@jg1uaa
Yes, I agree.

@youxiaojie
Copy link

youxiaojie commented Mar 31, 2021

Have anyone tested D variant already?
I tried to run Blink.ino, something strange... the code turns LED on and off with each 1000ms delay, but it looks about 2000ms. I changed LGT8Fx's optiboot_lgt8f328d_extosc.hex bootloader from MassDuino's default, same result.

postscript:
I found Green Ladruino uno at taobao, https://s.taobao.com/search?q=larduino+lgt8f328d

I have some 328d and one 328p how to test?
l just test eeprom seems 512bytes available. howto set it to 1k?

@LaZsolt
Copy link
Collaborator

LaZsolt commented Apr 1, 2021

I found an article which tells how to modify the Arduino bootloader of LGT8F328P to support a baud rate of 115200bps and adjusting the system clock frequency to decrease baud rate error.
https://www.programmersought.com/article/44233408885/

@youxiaojie
Copy link

I found an article which tells how to modify the Arduino bootloader of LGT8F328P to support a baud rate of 115200bps and adjusting the system clock frequency to decrease baud rate error.
https://www.programmersought.com/article/44233408885/


Error 1020 Ray ID: 639393675adf3b3f • 2021-04-01 17:35:45 UTC
Access denied
What happened?

This website is using a security service to protect itself from online attacks.

Cloudflare Ray ID: 639393675adf3b3f • Your IP: 240e:82:2f00:• Performance & security by Cloudflare

why?

@LaZsolt
Copy link
Collaborator

LaZsolt commented Apr 1, 2021

@youxiaojie :

I don't know why but
try to open https://www.programmersought.com and type into the search bar bootloader of LGT8F328P

@youxiaojie
Copy link

MD328d is the same as lgt8f328d,
md3248p = 48pin lgt8f328p
from lgt official web shop.

@dwillmore
Copy link
Collaborator

Has a consensus been reached on this issue?

@LaZsolt
Copy link
Collaborator

LaZsolt commented Jan 24, 2023

Yes, consensus has been reached because in v2.0.0 LGT8F328P and D are supported but none of the LGT8F88x variants.

@LaZsolt LaZsolt closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants