#156

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ส.ค. 2019
  • An improved ATMega328P with this cheap clone Logic Green LGT8F328P running at 32MHz (eventually)
    $8 off your first order at LCSC Electronics with lcsc.com/?href=ralphsbacon&so...
    Seriously, folks, see all this information with full colour pictures, step-by-step instructions and much more on my GitHub:
    github.com/RalphBacon/LGT8F32...
    Links to all products at the bottom of this description
    So we're looking at the 32MHz Nano-sized drop-in replacement but I'm using a different sized development board just for ease of use in the video. My device looks like this (and well worth it for experimenting with)
    github.com/RalphBacon/LGT8F32...
    But the final device is Nano sized, and a drop-in pin replacement
    github.com/RalphBacon/LGT8F32...
    Or you can have a Pro-Micro sized device that will require a USB-to-Serial adapter to program.
    github.com/RalphBacon/LGT8F32...
    The 6 simple steps to get a LGT8F328P-based board running at 32 MHz are listed on my GitHub.
    github.com/RalphBacon/LGT8F32...
    6 Simple Steps to get a LGT8F328P-based board running at 32MHz
    *1 Download the LogicGreen zipped resources here*
    github.com/LGTMCU/Larduino_HSP
    There's a copy of this zipped folder on my GitHub
    *2 Extract the download (unzip it)*
    and move the unzipped LGT/avr folder to under the hardware folder in your Arduino sketch folder. If you do not have a hardware folder in your Arduino Sketches folder, just create one.
    Your structure should look like this:
    github.com/RalphBacon/LGT8F32...
    *3 Replace the boards.txt*
    In the Hardware - LGT - AVR folder **delete the boards.txt**.
    Then copy the boards.txt in this GitHub there in place of the one you just deleted. Easier than trying to edit it!
    Testing
    -----------------------------------------------------------------------------------------------------------
    Oh no! I've exceeded my TH-cam word count so head on over to my GitHub to complete the process!
    github.com/RalphBacon/LGT8F32...
    -----------------------------------------------------------------------------------------------------------
    What's this GUID then?
    Each LGT8F328P has a unique GUID (serial number) built in. Useful for encrypting things.
    To retrieve the number (it's read-only) do this in your sketch setup():
    uint32_t guid = *(uint32_t*)&GUID0;
    To display that number in its intended *HEX format* do this:
    Serial.println(guid, HEX);
    Simples, right?
    ======================================
    LINKS LINKS LINKS LINKS
    ======================================
    Please visit my sponsor who made this video possible!
    $8 off your first order at LCSC Electronics with lcsc.com/?href=ralphsbacon&so...
    *KEYES Open Source LGT8F328P Control Module Development Board*
    www.banggood.com/KEYES-Open-S...
    *AliExpress Nano/pro Micro replacements*
    LGT8F328P LQFP32 replaces NANO V3.0 HT42B534 chip
    s.click.aliexpress.com/e/cEAUGf6s
    This seller has both variants (SOP20 & LQFP32) but look around there are other sellers too!
    *Logic Green's GitHub for the support files (also on my GitHub)*
    github.com/LGTMCU/Larduino_HSP
    *LGT8F328P Schematic (also copy on my GitHub)*
    www.electrodragon.com/w/image...
    *Chinese Documentation for what it's worth*
    www.logicgreen.io/upload/lgt8f...
    English version of similar family of chips on my GitHub
    *Top 10,000 Prime Numbers*
    www.di-mgt.com.au/primes10000...
    If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite journey
    My channel and blog and GitHub are here:
    ------------------------------------------------------------------
    / ralphbacon
    ralphbacon.blog
    github.com/RalphBacon/LGT8F32...
    ------------------------------------------------------------------
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 596

  • @GnuReligion
    @GnuReligion 4 ปีที่แล้ว +4

    Wow, you made me famous! (blush) -- My own order of these boards is still not here! I am jealous.
    Am interested in trying to compile USBASPLoader and other VUSB projects on these. Will be fun to find out if the RC oscillator is accurate enough for the device to bang out USB 1.0 (shrug). The whole idea is to use serial over USB (ACM) without the need for an FTDI / CH340G companion. Of course, the mega48/8/88/168/328 already do this, but have little time for anything else reliably above 9600 baud.
    I remember using #ifdef clauses undefine/redefine the F_CPU value for my 12mhz boards, then setting the divider from within a sketch w/o a boards definition. Will let you know. Will definitely be using the new, proper LGT8xxx core for the other enhanced features anyway ... and giving your github page a visit. Though subscribed and notified for your channel, I have still received no notification for this one. Maybe it will be along later today.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Enjoy your 15-minutes (well, more than that) of fame, GnuReligion (you still didn't tell me how to pronounce that). Regarding being notified, you have to click the bell AND say you want notifications - something TH-cam seem incapable of fixing. But good luck with your boards (when they arrive), keep us all posted.

    • @davidwillmore
      @davidwillmore 4 ปีที่แล้ว

      @@RalphBacon GNU is pronounced like the animal--"new". So a new gnu sounds like a speech impediment.

  • @bbowling4979
    @bbowling4979 4 ปีที่แล้ว

    Got my boards today. Followed your instructions and it worked a treat! Thanks very much. Now to play around with this.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Glad to hear it, now you get to play with them, as you say!

  • @Ilikeridin
    @Ilikeridin 4 ปีที่แล้ว +1

    Great video. Very informative as I’ve not seen those. Only just ordered stm32 boards due to your video and now I’ll be getting those. Thank you, Ralph.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Sounds like you will be very busy, Chris, have fun!

  • @drelmetbrown
    @drelmetbrown หลายเดือนก่อน +1

    Thanks for covering this Ralph, i enjoy working with the NRF24 modules and have done since your first video years ago. However i moved on to the Rfnano's from keywish V1.0 which worked but had other issues so abandoned them. I recently noticed keywish were selling a V2.0 with ipex ext connection which was what i previously wanted - and i overlooked the fact these new ones were LGT8f328p and had no idea. I managed to get them running, and performance was good but came across the Baud rate issue, the seller didn't initially mention i had to use the nulllab package and i was sucked in with the arduino compatible statement. They also provided a few lines of code including a sysclock and a digital toggle on 13 but i coudnt work out how to use it ! i couldn't get to 32Mhz without using your work and the "boards text" - i found mine unstable, locking up but that maybe down to my coding but it was 32Mhz and isn't that important to me so i run at 16Mhz as i just really wanted the ipex facility.

    • @RalphBacon
      @RalphBacon  29 วันที่ผ่านมา

      Have you considered one of the now many ESP32 variants? Arduino compatible (albeit at 3v3 not 5v) and many have IPEX connectors or built in antennae. I used some of the newer C3 and S3 variants recently and they work well (I usually use the larger ESP32 DEVKITC v4 which gives more GPIO pins).
      The use of an external aerial makes a lot of difference, I've found. I've only used a few like that (two are up in the attic, one at the far end of my house) but the difference was quite amazing!

    • @drelmetbrown
      @drelmetbrown 28 วันที่ผ่านมา +2

      @@RalphBacon Thanks for the reply, I have thought about it but don't know where to start or which board/s to try. I will look through your videos on the subject.

    • @RalphBacon
      @RalphBacon  14 วันที่ผ่านมา

      Look at some of the well known brands, such as Adafruit, Sparkfun, DF Robot, Seeed Studio - they all make the smaller ESP32 variants (C3, S3). They won't be cheap from these sort of places but the quality should be good.
      Amazon will probably sell them all plus all the cheap no-name Chinese clones, some of which are also very good, albeit mostly without much documentation. In the UK, The Pi Hut and Pimoroni are great resellers too.
      The Arduino IDE supports them all so you just scour the Internet on how to add those boards to the IDE and you will soon be up and running.

  • @leachim66
    @leachim66 4 ปีที่แล้ว +1

    I've been eyeing these clones myself. I'm very happy you've been investigating the STM32 and Atmega "Functional Replacements" (aka clones) from a hobbyist perspective! Information regarding these things is quite hard to find.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Now you need to get a couple, Mike, and start using them and see how they perform. That's when it gets really -frustrating- interesting!

  • @Hackvlog
    @Hackvlog 4 ปีที่แล้ว +1

    Thank you for very informative video. Thanks to your video, next batch of Nanos that I'll order could quite likely be LGT8F328P based.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, me too, these seem an ideal replacement for a Nano, just improved!

  • @englishrupe01
    @englishrupe01 4 ปีที่แล้ว +3

    Thank you so much for your work and to dbuezas! As you know I am a real newbie to this but i got both my Wemos LGT8F and my green LGT8F running from your sketch and his board manager url at my first try! These boards are a great deal, and at half the price of a regular Chinese clone of a Nano. Very strange that they don't wish to divulge the name of the chip on the ic itself, though. Thanks again!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      I'm very glad you got it all running, that's awesome! If you want to identify the chip, rumour has it that the name is _underneath_ the chip, so go on, get out your hot air desoldering stations and remove it. Then tell us what it is (if anything). Then resolder it back again. What? You don't want to do that? Me neither! We'll just have to live in ignorant bliss, for now, anyway!

    • @almostanengineer
      @almostanengineer 4 ปีที่แล้ว +1

      At 79p I will have to order one to do just that ...

    • @englishrupe01
      @englishrupe01 4 ปีที่แล้ว +1

      @@almostanengineer Good man! If you need to split it, i will go half with you! Lol!

  • @Poult100
    @Poult100 2 ปีที่แล้ว

    Inspiring! I have one of these boards I've been having issues with. I'll try this out!

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      I see you have been having fun, Simon!

  • @smitcher
    @smitcher 4 ปีที่แล้ว

    Great video again Ralph, that is a very interesting chip and great bit of detective work to get that running at 32MHz. A lot of chip manufacturers actually print the details on the underside so that it's hidden so if you blow up one of these and fancy sacrificing it then you might find writing there...

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      I did think this too but wasn't prepared at the time (pre-video) to desolder one, but as a couple of viewers have suggested I might just do that now (and I feel more confident now about soldering it back on too).

  • @roadeycarl
    @roadeycarl 4 ปีที่แล้ว

    Thanks for making this video! I have been looking for a 5v 12bit ADC Nano or something similar for a while! Super handy. Thanks again.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Glad you found it useful Carl, thanks for posting.

  • @Poult100
    @Poult100 2 ปีที่แล้ว +1

    Following on from my last comment I have just tried adding the extra lines in the code in the blink sketch, as this is an ideal way of "seeing" the clock speed.
    With the Logic Green board selected, it would not load. However, going back to the standard AVR boards, and selecting 'nano', it loaded and ran perfectly! If I coded,
    (clock_div_1);
    The blink sketch ran at twice the normal speed. Coding (clock_div_2); made it run at normal speed.
    A great success, I'm very happy, thank you!
    It may be useful to let your viewers know there are clones out there that use the AVR Board type, and those two extra lines of code are all that is needed.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Nice to know such a simple change gets the full speed of the processor, thanks for sharing.

  • @dl8cy
    @dl8cy 4 ปีที่แล้ว

    The boards arrived, and after reading carefully your instruction (i am not a native speaker) it works like a charm - so many thanks for your time and the sharing of your knowledge!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Glad to hear you had success, Mike. Some would say I am not a native speaker either, the way I mumble through my videos, but they are just rude! Thanks for posting, great to hear from you, wherever you are.

    • @dl8cy
      @dl8cy 4 ปีที่แล้ว

      @@RalphBacon rudeness and quality are not natural enemies :-) I am one of that fu* Germans - so greetings from Berlin

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +2

      I've never been to Berlin, Mike, but my family all live around Stuttgart as my Mutti is German (I am only half). I am the only one in England now, mit diesem Scheisswetter und Brexit jetzt auch noch dazu! Oh well, mustn't complain. Mfg.

    • @dl8cy
      @dl8cy 4 ปีที่แล้ว

      ​@@RalphBacon
      I know the Swabian area quite well - I was married twice with a woman from there :-)
      I really like Scotland, my first visit was in 1984, I wanted to see the island of George Orwell (Jura) - they stay with us - you'll see this :-)

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Er, married twice to the same woman? You know what they say about Schwabishe Frauen - zugeknoepfte Taschen, or in the English idiom, Tight as a Duck's Ar*se! Sorry, I mean to write 'frugal' but my fingers would not obey me.
      I've never been to Scotland. One day, one day...

  • @TheUnofficialMaker
    @TheUnofficialMaker 4 ปีที่แล้ว

    You're a genius with relevant interesting content, clearly explained. Go Ralph!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Wow! High praise indeed. But I'm still not sending you that $20! Glad you enjoyed it and thanks for posting.

  • @FakeButt
    @FakeButt 4 ปีที่แล้ว

    Great video! It was very informative and sparked my interest in this MCU. Thank you!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Great, mission accomplished! Thanks for posting.

  • @gavinsmalley1513
    @gavinsmalley1513 4 ปีที่แล้ว +1

    Another great video sir! Very interested in seeing some tests of that 12-bit ADC (and the 12-bit PWM mentioned in the comments)...

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, I (or others) need to do some experimentation. Why not get a couple and try them out, Gavin?

    • @gavinsmalley1513
      @gavinsmalley1513 4 ปีที่แล้ว

      @@RalphBacon Well funny you should say that... I have indeed ordered one.
      I'm not sure I have the understanding or knowledge to investigate new features though, or to indeed to have got them running at 32MHz by myself.
      I can, and will, follow your wonderfully clear instructions! But that says much more about your knowledge and understanding than mine.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      I just dig and dig and try things out and read datasheets! Even Chinese ones! Win some, lose some.

  • @pekkagronfors7304
    @pekkagronfors7304 4 ปีที่แล้ว

    Nice overview/tutorial. Thank's, Ralph.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      You're welcome, Pekka, glad you liked it. thanks for posting.

  • @killenmyful
    @killenmyful 4 ปีที่แล้ว +1

    Excellent video! Ill have to check the documentation to see if the pinout is the same, or at least share the same banks for adc and interrupt pins. I have some designs in production and would consider swapping the Atmel out for this chip.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      It's pin compatible, Anthony (that's the whole point, really). But as to whether the interrupts work the same... well, you need to test all that out.

  • @mahudson3547
    @mahudson3547 4 ปีที่แล้ว +2

    Excellent video.
    Like many, I got caught by an Ali trader selling WAVGAT pro mini boards (cheap) as Atmega328P chip - which they weren't. They had been consigned to the bad buys bin.
    This video prompted me to see if they were LGT8F328P boards - which they seem to be. At least they perform that way - I ran the primes from your Github and got the results. So there are probably a lot of disenchanted buyers of these boards who don't know they are sitting on a little treasure.
    There are some really interesting 'extras' on this chip which you have mentioned. But also an analogue comparator function with 10mV resolution which opens up all sorts of goodies.
    I look forward to your next episode with great interest.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      The WAVGAT boards are well known for having this chip on them. But, as you rightly say, if buyers are not aware of what they are buying they will wonder what it is they have bought. I'm convinced that on many occasions the seller is not _au fait_ with the things he's selling. S/He is just selling stuff. They (probably) don't use it themselves at all.

    • @robertcoyle1532
      @robertcoyle1532 4 ปีที่แล้ว

      Is there a discreet pin or set of pins that implement the analogue comparator or is it a software thing? How do you set it up?

    • @mahudson3547
      @mahudson3547 4 ปีที่แล้ว +1

      Robert Coyle The ‘details’ are in the dual language data sheet on Ralph’s Github. In/out pins are given and there is a whole section describing it later in the document. There seems to be some digital filtering that can be enabled too. Haven’t had a chance to see if I can make it work - it’s a bit close to the edge of my comfort zone!

    • @robertcoyle1532
      @robertcoyle1532 4 ปีที่แล้ว

      ​@@mahudson3547 Thanks for the response. I'll give it a look.

  • @rogerfurer2273
    @rogerfurer2273 4 ปีที่แล้ว

    Very useful and interesting. Thank you Ralph.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Thank you for your feedback, Roger Furer, noted and appreciated!

  • @robertcoyle1532
    @robertcoyle1532 4 ปีที่แล้ว

    Good info Ralph, keep it up!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Thanks, Robert, I will do my best.

  • @vonries
    @vonries 4 ปีที่แล้ว

    Keep up the great work Ralph.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      I shall try to, Stephen, I hope you liked the video. At these prices, it's a no-brainer, right?

    • @vonries
      @vonries 4 ปีที่แล้ว

      @@RalphBacon It's so hard not to spend money 'hand over fist' to our far eastern friends.

  • @colinmackay852
    @colinmackay852 4 ปีที่แล้ว +1

    great video, never heard of this IC. I will need to find the datasheet and see if it's pin-compatible, it could be a good little replacement ic for a project

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, it's pin compatible, Colin. Datasheet should be in my GitHub. But there are some minor differences, apparently, as it is only 99% compatible. No EEPROM for one, it is emulated in FLASH memory.

  • @getyerspn
    @getyerspn 3 ปีที่แล้ว +1

    excellent video ..saw those boards on eBay and did wonder if they'd work in some of my more 'demanding' Arduino projects ..think i'll have to buy some to try.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      It should - just make sure the chip on the board is actually an LGT8F328P and not some other weird chip!

  • @jamescullins2709
    @jamescullins2709 4 ปีที่แล้ว

    Excellent video Ralph. great job. I'll try one.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Always worth a go, James, easy to use, just watch the so-called EEPROM, it's not! It's just shared program memory, but I guess if EEPROM were essential to a project we'd use a real Nano or add a small module connected to I2C if you need the speed.

    • @jamescullins2709
      @jamescullins2709 4 ปีที่แล้ว

      @@RalphBacon 90% of my little projects do not require an EEPROM. Yes I2C memory would be my choice. Thanks for a very good video.

    • @jamescullins2709
      @jamescullins2709 4 ปีที่แล้ว

      @@RalphBacon got it!

  • @adaml52
    @adaml52 4 ปีที่แล้ว +2

    Hi Ralph,
    Great information, thank you
    ATB Adam

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Glad you think so, Adam, great to hear from you, thanks for posting.

  • @GlennHamblin
    @GlennHamblin 4 ปีที่แล้ว

    Thanks Ralph. Good stuff!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Glad you liked it, Glenn, nice to hear from you.

  • @TheDefpom
    @TheDefpom 4 ปีที่แล้ว +2

    Interesting chip, I should get some to have a play, I’m more interested in the higher voltage reference levels and higher ADC bits

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Indeed, speed is not everything, but there's enough on this chip to make it interesting to a wider audience, I reckon.

  • @maxximumb
    @maxximumb 4 ปีที่แล้ว

    Handy bit of kit to know about.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Indeed. It _might_ take the place of all my Nanos in future. But I'll always keep a Nano handy just to ensure that unknown 1% doesn't come back to bite me!

  • @mrrgstuff
    @mrrgstuff 4 ปีที่แล้ว +2

    Great video and glad to see basic Arduino stuff still has a place. Never found too much use for an UNO, but love the 32u4 boards as the can emulate USB devices and I use the Nano quite a bit too due to cost. I'd rather build projects around multiple cheap boards, especially the Nano rather than build something complicated on a single more powerful device 😀

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, there is still plenty of life in the Arduino Uno/Nano and this sort of device ensures it is not being left behind in terms of capabilities or speed!

    • @TYGAMatt
      @TYGAMatt 2 ปีที่แล้ว

      @@RalphBacon I have two UNO clones. I just use them with boot loader shields fitted. For anything else I use a Nano, Pro Mini or chip on a breadboard

  • @planker
    @planker ปีที่แล้ว

    Excellent. I have the mini's on order, and I'm excited. I use a Nano/Nrf24 setup for RC airplane stuff, this could be a direct drop in with higher resolution for servo control. For a buck I got a few, who would know? Awesome, Thanks for your work!

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Good luck with your project 👍

  • @paulyorke1437
    @paulyorke1437 4 ปีที่แล้ว +1

    Great tutorial video Ralph. Not used this chip but had I used it, I would definitely be one of those people who wouldn't have noticed the fact that is was not operating at 32Mhz. How do you find all this stuff out? Thank goodness you can and do to help people like me make progress with this hobby. So, SPI TFT/OLED with STM32 next? All the best

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Glad you found this useful, Paul. Finding all this stuff out is not easy sometimes, but with Benny doing the purrfect C++ coding and Dougle doing the research (even though he sometimes barks up the wrong tree, he's still my Sherlock Bones) I find it easier, it must be said. Ah yes, STM32 and SPI, still on my TO DO list.

  • @tubical71
    @tubical71 4 ปีที่แล้ว +1

    Great investigation of that little board.
    I would have loved to see if the FASTLed lib works, but for the price i will try it myself ;)

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +2

      And let us know how it goes. Please. Pretty please!

  • @craigstatham5235
    @craigstatham5235 4 ปีที่แล้ว

    Would love to see more video of the smaller board with the dip package chip. Though I do acknowledge the lack of documentation would make that a challenge

    • @zaprodk
      @zaprodk 4 ปีที่แล้ว

      More like SOIC.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      The smaller board (pro Micro clone?) should behave the same with its SOP20 chip. Just be aware it will require a USB-to-Serial adapter to program (easy to do, of course). Regarding lack of documentation, one of my viewers, Jeff, has translated the first page of the spec. I'll put it on the GitHub later today.

  • @ctbully
    @ctbully 4 ปีที่แล้ว +1

    They are the Pro mini and Nano replacements, I really like the fact that it has 12 Bit ADC and DAC. That helps alot ! Im switching :-)

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      If you find the missing 1% (apart from EEPROM being shared program memory) do let us know, John! Thanks for posting.

  • @mkitchen
    @mkitchen 4 ปีที่แล้ว

    A nice video Ralph, thank you. I think I've found some of the 1% that is not compatible with an ATmega328P, the EEPROM, or lack of it. I bought a cheap Nano compatible board and tried it with one of my projects that use the EEPROM for storing calibration and configuration values and it didn't work. Looking at the datasheet (page 19 of the Electrodragon translation) it says it uses the Flash as EEPROM, so if you want 2K EEPROM then you have to give up 4K of the flash (yes double), so you get "only" 28K flash left. Which is a shame as my project was using 30K Flash and all 2K of EEPROM. But everything else I've thrown at it works well. So overall probably an improvement, but with caveats.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, indeed, Mike, there is a bit about 'shared program memory' but I didn't know you needed to give up _twice_ the memory for the same sized EEPROM space, I wonder why? Any ideas?

  • @TheEmbeddedHobbyist
    @TheEmbeddedHobbyist 4 ปีที่แล้ว +1

    it's a good job it's 99% compatible! as looking at the Chinese data sheet your have a real problem to change any of the internal settings for SPI, i2c etc other wise. being old school I wish that fuses were still called configuration bits, in my mind fuses are one time settable as in Programmable Array Logic (PAL's) etc. blow the wrong fuse and throw the chip away and get another out of stores.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      I'm with you on that term! I guess 'fuse' is shorter, trendier but ultimately less accurate (although there _some_ fuses which will brick your chip if set incorrectly; even the RST fuse will do that, so you can't upload - then you'd need to use my fuse resetter PCB with 12v to fix it).

  • @robertparenton7470
    @robertparenton7470 ปีที่แล้ว

    Thank You! From Frisco, TX

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      You're welcome! So, not San Fran, then?

  • @noweare1
    @noweare1 4 ปีที่แล้ว +1

    This chip is pretty amazing. A differential ADC will let you do things you normally can not do with a single ended. I agree with you that for the Chinese to make any money they would have to make millions. So there must be large market in China/Asia for these since it seems no one knows about them around here. This chip narrows the gap between the lower end STM32's and Arduino standard.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      And the fact is it a pin-compatible drop-in also helps, Joey.

  • @dbuezas
    @dbuezas 4 ปีที่แล้ว +3

    Update:
    github.com/dbuezas/lgt8fx has now support for the integrated Differential Amplifier and currently adding SoftwareSerial support for 32Mhz. I actually need testers for that (more info in the issues tab in github)

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Good idea to get independent testers on this new feature, David. When it's all settled down I will do a complete update on its features. Apart from some dodgy analog readings towards the end of the scale it's looking good. One viewer has also report problems swapping a Nano out for this and having the SPI TFT screen not work, something I want to look into.

    • @DCFusor
      @DCFusor 4 ปีที่แล้ว

      Haven't tested the diff amp stuff yet, but fastio is not there from just the board url install. I grabbed a copy of the .h file from the other github and put it in my sketch folder just to test - it works. Else I get the "not defined in this scope" error.

    • @DCFusor
      @DCFusor 4 ปีที่แล้ว

      I found that the fastio_digital.h file is missing from the linux /nome/username/.arduino15/whole bunch of subdirs/lg8t and copied it in from the older github. I still have to #include it to get fastio to work, but now can use instead of "".
      In fact, it appears quite a few files are missing in the dbuezas json version. More when I know more.

    • @dbuezas
      @dbuezas 4 ปีที่แล้ว

      @@DCFusor Oh, interesting, I'm not sure how that happened. Will fix in next version (re copy all files from the original core).
      BTW: if you add those as issues in github I'll not miss them :)

    • @DCFusor
      @DCFusor 4 ปีที่แล้ว +1

      @@dbuezas Will do. I'm doing a blurb on my own sci/tech website and linking back to here, your github, Ralph's, etc, as well.
      This will show up in a few projects there (and in different sub forums as match the situation). This one's just the hardware intro (and not yet complete either): www.coultersmithing.com/forums/viewtopic.php?f=6&t=1149&p=6775#p6775

  • @PeetHobby
    @PeetHobby 9 หลายเดือนก่อน

    11:51 A little bit off topic, but I ported your code to the STM32F750, and it calculates 10,000 primes in 186 ms. You previously benchmarked the STM32F103 at 3 seconds. 😁
    I had the STM32H750 running at 480MHz with L1 caches enabled.

    • @RalphBacon
      @RalphBacon  8 หลายเดือนก่อน

      That's impressive. And you are correct inasmuch that I did not tweak or optimise the STM32F103 at all, which would have probably helped.

  • @EJEuth
    @EJEuth 2 ปีที่แล้ว

    Hi Ralf: Great video and “first” review of this ATMega clone “LGT8F328P”. Along these “Pandemics months”, did you have a chance to check the ADC features?
    That is because for me the most exciting feature would the 12bit ADC increased resolution, and possibly its speed too (at least if not compromised); although running general code twice as fast can be handy, sure.
    In special, if the ADC is Not too noisy and somehow with good linearity - something the ESP(s) are not - then it would compete with the STM32, having the advantage of greater Arduino IDE compatibility through the USB port, with its bootloader working from the start.
    This could be a great hardware tools for DIY Digital Voltmeters in homemade PowerSupplies, battery dataloggers, etc. before going to a dedicated IC for 16+ bits ADC.
    A power consumption doubt: Did you have the chance to check the power consumption in running & sleep modes? Or at 32MHz they are power hungry? In other words, eventually bypassing the onboard Voltage regulator’s idle consumption, is the LGT8F328P “battery friendly”?
    Thank you for sharing, Ralph!

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      I never progressed much with this chip, because the ESP32 took centre-stage, as it was faster, cheap and had Wi-Fi and BT all built in. And a huge amount of memory, meaning OTA updates were easy to do.
      What I do remember about the LGT8F328P is that at 12-bit resolution the noise floor increased; someone mentioned that using the differential method (so, two inputs) worked better, but I never really tried it out.
      Power-wise, I believe the lowest power is 1μA, higher than the 0.2μA achieved (by me) with a fully dormant ATMega328P but there's more to power saving than putting the chip to sleep; even a potential divider in the circuit can draw much more current than that. These days, my dormant power state is usually an Si4599 dual MOSFET chip that leaks picoAmps when OFF and can be switched on by a number of external triggers (one pin to GND). And it powers the _entire_ circuit not just the chip, of course!

  • @colinmurdoch9667
    @colinmurdoch9667 4 ปีที่แล้ว +2

    Hi Ralph. Many thanks for all the video's. Very instructive, however I am now somewhat confused.
    I have a couple of projects related to model railway control, running on Nano's. One of them - an interlocking system for point and signal control - is stretching the 2K memory of the Nano. I have a number of array's holding lever states and locks etc. Which push up the memory requirement. The compiler issues a warning that memory is low and the sketch could be unstable. This is true, as when running the program tries to address an array outside it's bounds and re-boots frequently, despite the code attempting to stop this. When you brought out the video on the ESP32 I thought - great, load of memory, that's what I need. However you have now confused me with all these later options.
    I don’t have an issue with the speed of the Nano - it can run the logic faster than I can pull levers, but I need more memory. What would you suggest out all your recent offerings?
    How about a video on the pros and cons of each chip/board?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      That's a good suggestion, Colin.
      The problem for me is that I don't know what features you are using. for example, is I2C critical? SPI? Timers? Interrupts? You get the idea. Compatibility is going to be important if you use such features. You would have to rewire things anyway.
      The STM32F103 (Blue Pill or Maple) has a relatively massive 20Kb of run-time memory (10 times that of the Nano) but for all I know it might require 10Kb just to compile the Blink sketch! The ESP8266, for example, has to drag in so much code it requires a 100Kb or more for that sketch - but then it does have 4Mb to play with!
      But if it is memory you need, not speed _per se_, then the ESP8266 and ESP32 would both offer you that. The STM32F103 _might_ also do that (others here would know). And, of course, you can code them on the Arduino IDE with the same sketch with just a few pin changes (best scenario).
      I'm going to definitely add this suggestion to my list of things to consider. When, or if, it ever gets done is another matter as I suspect it might be quite some work, but we'll see!

    • @colinmurdoch9667
      @colinmurdoch9667 4 ปีที่แล้ว

      Ralph,
      Many thanks for that. My main requirement is for I2C. I am receiving data from a 3rd part board (Megapoints Multipanel) which is controlling the model railway stuff, and also outputting to a LED screen over I2C. From my recollection of those video's the I2C is comparable.
      Thanks again for the suggestion. I'll obtain a suitable board, revisit your video's and give it a go.

    • @nevellgreenough404
      @nevellgreenough404 4 ปีที่แล้ว

      I'll second the need for more SRAM. 2K runs out too quickly with text, LCD and serial buffers, etc, etc. I've even resorted to external serial RAMs a few times. I'm currently working on a USB-connected paper-tape punch (!!) and really want to reserve 1K SRAM for an input buffer. Thanks for the excellent video and hope the LGT8F328 catches on.

    • @kal9001
      @kal9001 4 ปีที่แล้ว +3

      Are you using bytes such as "Ture" and "False" to record your point data, If so that it taking 8x the memory than you need to. Using bit masks you can use a single bit to store the same data.
      Other tricks could include putting a lot of your static data into flash or even the EEPROM, so data that never needs to be changed, just looked at, can live there. which leaves the ram for the dynamic data.
      You can avoid the use of C++ type things, objects and libraries which bloat the memory footprint. C++ is a great language, but for these small microcontrollers it can be quite sprawling if you're not careful.
      And lastly, the array over runs and such should not be happening at all, It's either a bug in your code... or there's a library doing something silly. a lot of libraries assume the library is used in isolation and don't care much for what else may be using the hardware or memory. As such they can conflicts with memory and hardware. You can try to unpick the libraries and minimise them - a good example of this is libraries which use init functions, that initi will layout an area of memory that the library will use. but you may not be using all of the features of the library and so that area may not be fully used, and could be reduced.

    • @kilrahvp
      @kilrahvp 4 ปีที่แล้ว

      I use Teensy boards for anything that needs extra speed/memory. Sounds pretty strange you do need that much RAM for states though, there must be a lot of optimization potential in your code.

  • @luizcassettari
    @luizcassettari 4 ปีที่แล้ว

    Good job, I love this mcu clones! I am really interested to know how much current draw on deep sleep!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, someone else mentioned this, Luiz, I shall have to do a few tests and find out.

    • @TechnoWit3D
      @TechnoWit3D 3 ปีที่แล้ว

      Any result for deep sleep power consumption?

  • @dbuezas
    @dbuezas 4 ปีที่แล้ว +6

    Here's a more convenient method, Install via board urls:
    github.com/dbuezas/lgt8fx
    This video got me hooked in the topic and for convenience I made a board package definition to install via url. It has all frequencies between 1-32Mhz and the clock prescaler hack is not needed anymore!
    Thanks Ralph!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +2

      I'll add that link into my GitHub too, David, excellent work, very nice to use. Can I pretend I did all the work instead of you... whatsat? No deal? Oh, Ok... credit where credit is due then! 🤣

    • @slm60uk
      @slm60uk 4 ปีที่แล้ว +2

      Just got a few in the mail today, and came across your comment when re-watching the video. Saved me so much time. Thanks dbuezas - great work.

    • @dbuezas
      @dbuezas 4 ปีที่แล้ว +1

      @@slm60uk Thanks! Glad to hear it is already being used :)

    • @dbuezas
      @dbuezas 4 ปีที่แล้ว +1

      @@RalphBacon Haha, well you did get me hooked and provided the initial pointer to clock_preset :)
      By the way, I got the differential amplifier to work with two pins. Now I need to make a proper interface and allow for choosing arbitrary pins and gains.
      Soon we have a new feature in the board!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Sounds great, true collaboration indeed. :)

  • @kosa2004
    @kosa2004 4 ปีที่แล้ว +1

    The LGT8F328PU is the best with oled displays. This chip is amazing!! I use it for a time now and very satisfied with it. I do not recomend the Wemos XI !!!!!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      The question, László, is _why_ you don't recommend the Wemos XI boards that have this chip? But the LGT boards I got certainly are very good and quick, although the analog accuracy is not very good at the extreme range. Thanks for sharing and if you want to answer my question that would be fabulous!

    • @kosa2004
      @kosa2004 4 ปีที่แล้ว +1

      Ralph S Bacon Whenever i wanted to program the XI chip it got a bootloop3 times, and the chip becomes useless. My programmer is CP2102 and FTDI 232. I use the correct installing packages with Arduino IDE. The IDE won't let me program it with Wavgat or LGT packages. Don't understand why 🤔 The other Lgt and pro mini clones can be programmed easily and use them all the time. Because of the installing packages i am having difficulty compiling my sketches with color tft lcd. But!!! Maybe my pc and IDE needs a clean start. Basically i am very satisfied with the LGT8F328PU :) I hope i answered your question 😊

  • @MikesAllotment
    @MikesAllotment 4 ปีที่แล้ว

    Very interesting Ralph. A couple of questions if I may...
    1) Do these clone boards come with the bootloader already installed (I assume so given that you didn't make any mention of having to install it)?
    2) How much RAM do they have?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Yes, the Optiboot bootloader is already installed, Mike. Good question and I didn't really take notice, I just assumed it would have something preloaded to ensure we could upload code via the USB. RAM is the same as the Nano, 2K. I bought three of each type and will be thinking of (simple) projects to use them in soon.

  • @slavric
    @slavric 2 ปีที่แล้ว +1

    Dear Mr. Ralph. It's really a nice and informative video. I'm beginning my research project, because I'm slowly running out original 328p micros. I was lucky enough to buy 200pcs when they were still around $2. Now the same seller sells them at $4. They work normally and have 2102 date code, which is strange. During writing this I went to check the price at the only EU supplier that has stock and it is around $8/pc for 100pcs. Terrible. Nice lady at Alibaba gave me $1.9 for LGT in 200pcs quantity. And that would be OK, but the sleep modes are different and that is one of the things, that are NOT in the 99%, but very important to me. 😬But those chips are at least marked. When I see unmarked chip, I get a bit paranoid. Thanks again and keep on the good work.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Yes, Srečko , unmarked chips are a sure sign they are either fake or different to what the manufacturer specified and now have their markings removed. You got a good price for your micros; it's a pity that the LGT's sleep modes are not 100% compatible. Thanks for the information, it will be of use to others too.

    • @slavric
      @slavric 2 ปีที่แล้ว +1

      @@RalphBacon Thanks for your quick reply. I ordered two different boards to play around and see what I can do with sleep states. For non battery projects I'll use ESP8285H16 with 2MB of FLASH and one I/O expander. It is under $1 and has "all included". Too bad so many I/Os are "wasted". BTW have you heard of GCW /Great Cow Basic)? Interesting stuff. Have fun and thanks again.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      Yes, I looked at GCB a while ago but figured that it was going to be a niche product and I'd stick to C++. I used to use Swordfish (basic) on my PIC chips, very good but once again, fairly niche.

  • @WilliHerda
    @WilliHerda ปีที่แล้ว

    Thank you Ralph for thice informative video.
    One question, please. LGT8F328P. Using I get the message
    "fatal error: Wire.h: No such file or directory"
    #include
    The same sketch with Arduino Nano runs w/o issues.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      If you are using the Arduino framework you must tell the compiler this, so include the following statement at the top of your sketch:
      #include "Arduino.h"
      and see if that solves the issue. The Arduino boards all have this as standard so you don't have to do it.

    • @WilliHerda
      @WilliHerda ปีที่แล้ว

      @@RalphBacon Thank you very much! I'll try it and report.

  • @keen2461
    @keen2461 4 ปีที่แล้ว +2

    Trully interesting! But, for those of us who hate arduino enviroment, what compiler and what programmer (SWD?) should be used?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      I use Eclipse Sloeber but the new Arduino IDE is being built on Eclipse - out later this year.

  • @jeffbluejets2626
    @jeffbluejets2626 ปีที่แล้ว

    Ralph..... old one but have a question you may know the answer to....... are the proceedures herein for the AVR hardware text still applicable to the current day Arduino IDE or does the LININO ONE board type currently in the board selections take care of this.??

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      I'm pretty sure they still work as they always have done, Jorgo. No major changes.

  • @dekipet
    @dekipet 3 ปีที่แล้ว

    Ralph, there was (or IS) Wemos XI ages ago. I made an article about these boards in a magazine here. Not sure I can find it anymore. So many things I get meanwhile.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Yes, I'm pretty sure the Wemos XI was based on an LGT8F328P, so you are correct.

  • @hoggif
    @hoggif 4 ปีที่แล้ว +2

    That was interesting, I never knew about that board.
    I think high output current pins is bigger thing than 32MHz. If I need cpu power, I tend to pick up ESP32 or ESP8266 type boards. For hobbyist a tiny price difference is not an issue usually unlike in high volume product manufacturing. However, in many my applications there seems to be a need for external drivers to drive relays etc.
    I'm sure there are some situations where you are on the edge of enough power and there 32MHz helps though. More cpu power is never a bad thing.

    • @UpcycleElectronics
      @UpcycleElectronics 4 ปีที่แล้ว

      Oh man, that DAC and 12b ADC are the bee's knees for mee's :-)
      I didn't even notice the 80mA bonus feature before I ordered some of these. I don't know if I would connect a relay though. Do you trust a simple clamping diode with a relay coil on a pin directly connected to the μC? I think I'd want to add an additional zener clamp or something, especially with a surface mounted μC design. That would result in the same, if not more complexity, but I do unnecessary foolish stuff out of caution far too often. I could definitely see myself using this to power more peripherals directly from the GPIO though, especially something like a wireless radio connection.
      -Jake

    • @hoggif
      @hoggif 4 ปีที่แล้ว

      @@UpcycleElectronics DAC could really be usefull to keep parts count down and when you need faster output than filtered pwm gives you. I see the point of 12b adc too, even though my projects have been fine with standard 10 bit.
      I see no reason not to rely on something liike diode clamp with a relay. A schottky near relay should do just fine. However, cpu power needs some extra care due to larger currents than normal.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Glad that everyone seems happy with this board!

  • @Hasitier
    @Hasitier 4 ปีที่แล้ว +2

    Interesting chip. But not really for the speed, I’m much more interested in the 4.096v reference and the 12 bit ADC. Could you try out them in comparison to the standard atmega? If they are good enough this cheap board would make a good basis for any voltage measure project or even a self made lab power supply

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +2

      Why not get a couple (at that price it is less than a cup of Kaffee) and try them out - then you can let us all know how they perform. I suspect your testing would be more rigorous than mine!

    • @Hasitier
      @Hasitier 4 ปีที่แล้ว +2

      Ralph S Bacon They are already ordered Ralph. When I have tested them I will report back.

  • @andrewtoogood1429
    @andrewtoogood1429 4 ปีที่แล้ว +2

    Interesting, I wonder how the deep sleep consumption compares. Also I can't see a crystal does it have a internal 32mhz oscillator or some sort of prescaller?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      It has an internal 32MHz oscillator, Andrew, keeps the cost (and size) down. I shall have to investigate the sleep mode, same tests as I did for the Arduino bare chip several videos ago.

  • @JerryEricsson
    @JerryEricsson 4 ปีที่แล้ว +1

    I found one on ali baba for 71 cents, however the shipping was 1.60 so not such a bargain. I find them now on Ebay for around 3 bucks each. Don't need any right now and bucks are short, however just a note. My better half did clam onto my income from selling off my Orange Micro PC on Mac cards, but when it came time to transfer the 2 hundred bucks I got out of the pair, she relented and told me to keep it and spend it on things I need for my hobby. What a sweetheart, no damn wonder I stayed married to her for over 50 years now, and I even neglected to get her a box of candy yesterday on Valentines day, however I have been ill now for a couple of weeks and spent all morning in the Doctor's office whilst he tried to balance my narcotic intake with sleeping pills, anti-PTSD medication and now a needed anti-histamine because of fluid in both my ears that keep making me fall down when I am not concentrating on NOT falling down. Hope this will turn out OK, he as referred me to a major hospital where they will try and get the pain under control and perhaps work on taking me off the damn narcotics he has been pushing into my system for over 25 years,

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Your wife sounds like a real sweetie! Sorry to hear you are having such a mountain of health issues, I wish you well and a speedy recovery. Positive vibes being sent in your general direction.

  • @gl7080
    @gl7080 4 ปีที่แล้ว

    Hellp Ralph Thanks for your excellent explanation about so many things. I learn a lot. Maybe if you search for a topic it's nice to explain when to use a resistor and calculate the Ohm you needed? Also why to use a capacitor? I read sometime's to prevent wrong reads pullup a register with a resistor and to prevent changes on the port use a capaciter that's why I ask this. Nevertheless I'am looking forward to a topic of your choice. Finally I want to ask you which beeper with push button you are using? Have a nice day and thanks again.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      And I was indeed thinking of doing a back-to-basics video, after all this channel is for the novice Arduinite. Thanks for the suggestion, GL.

    • @gl7080
      @gl7080 4 ปีที่แล้ว

      @@RalphBacon Hello Ralph, Your welcome ;) Can you please answer also my qty about the beeper you are using into the video? Greetings from The Netherlands and have a nice day. Bye bye

  • @nektarioskourakis8331
    @nektarioskourakis8331 ปีที่แล้ว

    Thanks again for fresh info !Can this board use all the libraries UNO has?

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      Yes, absolutely, unless the libraries do some very low level ATMega328P-specific register updates in which case it probably won't work. For everyday use, however, I've not had any issues.

  • @tubical71
    @tubical71 4 ปีที่แล้ว +4

    One word about the "slow", "outdated" and "old" Atmega 328 chip....i managed to sample an audio input from an Analog pin and calc a 64bin audio FFT, using the FixFFT library and have it displayed all in realtime on a CRT TV using the TVout library with a nice 25Hz update rate (PAL TV)...the reason why i chosen libraries is i wanted to have something to show off on our "radio-museum society meetup" and also show that there´s no reason to code it all yourself and also there´s no need using inline ASM anymore even for fast stuff, as the libs are already highly optimized by today from the maintainer(s) ....Here´s it: th-cam.com/video/ZPxV5bVl7dI/w-d-xo.html

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      I don't think I was damning about the ATMega328P, but I did say it was being left behind these days when we have STM32s, ESP32s and ESP8266s. But, as you have demonstrated, there's plenty of life left in it yet. Now swap your Nano for one of these and see if it runs any better (or as well, at the very least). And..
      And a question on your 4K video demo. As my monitor is only 1080p should I notice any difference? I watched another one the other day and it looked just the same as other non-4K, standard HD videos but I'm not an expert on 4K.

    • @tubical71
      @tubical71 4 ปีที่แล้ว

      @@RalphBacon As you also said, it always depending on what you want to do....i´ve tried to do a stereo VU meter using 2x64 WS2812B and i first used a 328p and it was about ok, but when i tried it with the ESP8266 it was a lot smoother and also it´s roll-off was not as "bulky" as with the 328p...good eye-candy needs some more execution cycles ;)
      I didn´t expect much difference using 4k in first place it was only a tryout, i also have an UHD TV and i can see a little bit more crispynees but i just was curious how 4k was handeled by the YT-algo as i have the souce and the processed YT to do a 1:1 comparisson..it´s noticable if you are about half a meter close to the UHD screen....but who does whatch stuff this close to a 42inch screen, anyway...

  • @rupert274
    @rupert274 ปีที่แล้ว

    Hi Ralph, do you think there's any point in the LGT8F328P-LQFP48 which gives some additional GPIO compared to the 32-pin chip? It looks like there might be the same amount of GPIO pins as the STM32 blue pill (which I never got to grips with but maybe I should try again instead of messing with the LGT8F since it has so much more speed/memory).

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว +1

      There is better support for the Blue Pill. The LGT8F328P is fine for simpler stuff but there are some reported anomalies (not surprisingly for a reverse engineered design).

  • @mehmetyldz8407
    @mehmetyldz8407 2 ปีที่แล้ว

    thanks for technical info. what is working voltage level 3.3v or 5v essepically for serial communications? i didnt hear

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      It's a 5v board, same as the Nano. There's a whole bunch of information by David Buezas now at: github.com/dbuezas/lgt8fx

  • @vajskidsconsoles2005
    @vajskidsconsoles2005 2 ปีที่แล้ว +1

    Works with my PXSTAL project but only with detecting the region of game and switching clock mode accordingly (V1.00B) on SI5351 clock board. SPI is broken, it kills my in game reset coding. Not sure why. I haven't had any luck with any of these. I can't even us the 128P nano clone for my modchip (uberchip) but works for PSXTAL. 328P clone works for PSXTAL and Uberchip. I can't be bothered finding out why all these clones have issues. I tried other clones as well that were even worse. I run these @ 16Mhz (onboard xtal)

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +2

      I've heard on the grapevine that not all LGT7F328Ps are created equal - there are several versions out there (clones of clones, perhaps?). OK for simple stuff, but if SPI doesn't work, well, that a non-starter.

  • @thetechcompany2468
    @thetechcompany2468 4 ปีที่แล้ว

    Ralph, Thank you for this video! Were you able to determine if this chip has 128K of flash?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      No, this has 32K Flash just like the Arduino (as in PROGRAM CODE memory) but has no EEPROM memory (it you need it, it will share the 32K Flash Memory).

  • @MrEdwardhartmann
    @MrEdwardhartmann 4 ปีที่แล้ว

    This looks like a great board to play around with. I just love the STM32, but these might make some projects a little easier. Any idea how the ram/rom counts compare to the Arduinos?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      It's the same as the Arduino Nano, Edwad, 32Kb Flash, 2K SRAM but the EEPROM is shared with the 32Kb Flash (and is configurable, so if you only need 1K then that's all you steal from the FLASH).

  • @yogeshitaliya473
    @yogeshitaliya473 4 ปีที่แล้ว

    Have a good day sir

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      You too, Yogesh, nice to hear from you.

  • @UpcycleElectronics
    @UpcycleElectronics 4 ปีที่แล้ว +1

    Thanks Ralph. I purchased several of these too about 2 weeks ago but still haven't received them. I think it was that same AliEx seller too. They must have rowed the boat past you first.
    I tried to find somewhere selling Logic Green inventory but nowhere I buy from, foreign or domestic, carries them. I was really bummed LCSC didn't have them. I want to get my hands on that LQFP-48.
    1.) Did you try the analogue stuff yet? I'm really curious if the Arduino core was updated for the DAC and how they incorporated it with the PWM "digitalWrite" stuff. I'm also curious why they skipped the standard 6 pin ICSP header, and how the new debug features work.
    I noticed the logic green website shows they have a few PIC clones too, but I didn't see those floating around for sale either.
    BTW, if you happen to pick up some of the newer nano compatibles with the CH340E chip (the tiny MSSOP-10 version that doesn't require a crystal) they work well. They just use the "old nano bootloader" setting in the IDE, if you use the default Nano setting they don't work.
    I just started learning Flash Forth 5 using one of these Nano boards. I'm currently building a little PIC18 prototype so I can compare FF5 with a PIC and AVR. Plus I have a detailed whitepaper tutorial for the PIC18 that is easier to follow. I like the idea of playing with a modern PIC without MPLabX's XC8 -subscription- _extortion_ nonsense.
    This is my first adventure into Forth. 2.) Have you ever tried the Forth language before?
    Thanks for the upload.
    -Jake

    • @noweare1
      @noweare1 4 ปีที่แล้ว +1

      Check out 0033mer youtube channel. He does all his coding in 4th. Pretty interesting stuff.

    • @UpcycleElectronics
      @UpcycleElectronics 4 ปีที่แล้ว

      @@noweare1 yeah I've been talking to him quite a bit over the last couple of days. That's how I got the PIC18 paper. He has given me a few different references in reply to my foolish questions. He's a cool dude and a lot of help :-)

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      I have no idea how AliExpress got them to me so quickly - as the video shows I was totally unprepared for their arrival! I'm obviously a VIP!!!
      Yes, more testing required on the DAC and just about everything else really, now that the fundamentals of SPI and I2C
      have been done.

    • @noweare1
      @noweare1 4 ปีที่แล้ว +1

      @@UpcycleElectronics He knows his hardware really well. He probably never used a library in his life. Definitely old school. Not all engineers are created equal. He's top shelf.

  • @wires4auto
    @wires4auto 4 ปีที่แล้ว

    Great video, tho if I needed a MCU to run at 32mhz I would probably go with a ESP, your right about the cost! That's crazy cheap, if I ever find time with no projects on the go then I will probably order these. Thanks

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      ESP32 or ESP8266 can just be overkill/wasteful for some things, Gordon; these can be viewed as a humble Nano on speed!

  • @Klakier1995
    @Klakier1995 4 ปีที่แล้ว

    Good explanation! I have one problem with Serial communication. In serial monitor i can't see anything. I'm using pro mini version. What is the problem?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      I've never plugged in the Pro Mini version, Sebastian. Does it even have a USB-to-Serial chip on board? If not you will have to connect an FTDI or CH340G device tot he TX/RX pins on the module just like you would with a bare 328P chip. If you've already done this then you probably have the RX/TX swapped over. Or the wrong baud rate selected. Do you know for sure the µC is running your sketch? For example, can you get the BLINK sketch running OK?

    • @Klakier1995
      @Klakier1995 4 ปีที่แล้ว

      @@RalphBacon I'm using USB-to-TTL converter based on CH340G chip(just lik this one robu.in/product/usb-rs232-pl2303-ttl-converter-adapter-aurdino-nano-raspberry-pi/). When I upload for example blink sketch it works fine, but when i want to print something on serial monitor, it's not printing. I changed baudrate, 32 to 16 MHz and nothing worked. Is it problem in my USB-to-TTL converter? Or I have to use USB-UART FTDI FT232R?

  • @Tarbard
    @Tarbard 4 ปีที่แล้ว

    Cool topic. Didn't know this existed.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Nor did many others (me included) but now lots of people know!

  • @andymouse
    @andymouse 4 ปีที่แล้ว +1

    Fantastic Ralph! I'm a real 328p fanboy and gonna get one of these right away, 32 Mhz @1.28v brill!
    will it work with Atmel Studio 7 (my prefered IDE at moment) I wanna check out deep sleep specs and 12 bit operation......good work Sir!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Yes, check it out, Andy, so far I've plugged it into various places and it all works as expected. I still wonder what the unidentified 1% non-compatibility is (perhaps some stress related thing).

  • @thecalif2914
    @thecalif2914 3 ปีที่แล้ว

    Great video!
    Can you tell if the USB-Serial chip is more a FTDI or a CH340 type?
    And, more important, the clock_prescale_set() looks pretty generic so the code might also work correctly on a standard UNO?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      I haven't got one to hand but I'd be (pleasantly) surprised if it were an FTDI chip; the CH340 is much cheaper so I bet it's that one. Or a clone of the FTDI chip, of course!

    • @sloveofficial3040
      @sloveofficial3040 ปีที่แล้ว +1

      CH9340 in my lgt8f328P Purple type c from aliexpress

    • @thecalif2914
      @thecalif2914 ปีที่แล้ว

      @@RalphBacon AFAIK there are no real working FTDI clones since they manage their copyright pretty well, the same as MAX.

  • @JerryEricsson
    @JerryEricsson 4 ปีที่แล้ว

    I had to check back here, seems i must have watched this video a few weeks back and got all excited about these boards, since I love the Uno and it's clones, I must have ordered one of the multi pin ones because I found it in my order list at Banggood. Now I don't remember clicking the order so perhaps I had it in my basket when I ordered something else, but I found it there today, and clicked the location button, the thing is in Chicago, right now, about 900 miles from my home so I may have it in a few days, before Christmas and Impeachment anyhow. Must watch the rest of your video so I can figure out what the hell I ordered it for, I get particular hell from my old lady now if I order crap from China. Funny isn't it, I bring home the paycheck but can't even get a damn allowance like I did when I was a kid. Ah well 50 years with the same gal, we must be doing something right. Just caught hell over Octobers 30 bucks from Paypal!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      You need a secret drop off point like you local post office so you can go and collect the items quietly! And joint accounts are never a good idea! But this LGT device is just very quick and almost 100% UNO compatible too. Have fun when it arrives!

    • @JerryEricsson
      @JerryEricsson 4 ปีที่แล้ว

      @@RalphBacon Ah yes, the board has arrived, and I am back here trying to figure out how to make it work. I had spent the majority of the morning trying to program an ESP-8266 but was having a ton of troubles with it. So the postman drops off the package (Wife left at 5:30 AM to drive our daughter to the City for a doctors appointment so they will be gone all day) So I plug in the new board, and NOTHING! Man I was about to have kittens, which would really piss off our cats, as they think the house is overcrowded with 2 of them! So I look for the driver, but no avail, this with a new USB cable I just unpacked, not the one that came with it though, Then the thought hits me, perhaps this is a charge only cable! Indeed, that was the problem, I hooked her up with the cable that came with the new board, and windows sang her song of love and acceptance, the board is now found and happily playing along as I watch your video once more to figure out how to put her in overdrive. This did, of course solve my ESP problems as well, that damn power only cable is getting decapitated and rebuilt into something else so I don't repeat my error! Next, figuring out what to build with this board, I am always seeking more power, more speed from my little devices. I think the 76 cent deal may well be a must order for building my little jukeboxes.

    • @JerryEricsson
      @JerryEricsson 4 ปีที่แล้ว

      @@RalphBacon Have been trying to set the unit at 16 MHZ and run a i2c oled. Can't get it to show anything on the screen, it was driving me nuts, till I decided to go with the 32 MHZ and include those little jewels, works wonderfully, every thing I have tried on the OLED has worked just fine if I paste in your two commands, it is a blast, I can see all sorts of possibilities with these! Love it, thanks so much for the Christmas Gift of this video!

  • @giuseppean9705
    @giuseppean9705 3 ปีที่แล้ว

    Did you try to use SPI interface?
    you add definitions just after the #include group
    like: #define PIN_SPI_MOSI 11
    ecc..
    or add some lines at Pins_Arduino_h

    thank you very much

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      TBH I can't remember what I tested out. If it's not in the demo video then I guess I did not, but I know lots of others have expanded on what I did. Try a search on GitHub for that chip name to see what you get.

  • @thevoice4758
    @thevoice4758 4 ปีที่แล้ว

    Hello, I understood that these boards have there own microcontroller on board (not ATMEL).
    However I want to test them because they are 2x fast and cheap.
    Do you have to install a WAVGAT library/software of specific drivers ? where can I find this software ?
    How to program ? do I have to select a "normal" arduino in the IDE or can I select this board ?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      1. Follow the steps here: github.com/dbuezas/lgt8fx
      David has taken what I did to the next level and then some, and has automated everything required to get this board to run at 32MHz (and every other speed).
      Good luck!

    • @thevoice4758
      @thevoice4758 4 ปีที่แล้ว

      Ralph, thanks for this info.

    • @rupert274
      @rupert274 4 ปีที่แล้ว

      @@RalphBacon Thanks very much for posting this link. Do you still need the power.h thing included in your sketch with David's board manager addition?

  • @beamer.electronics
    @beamer.electronics 4 ปีที่แล้ว

    Great video. Is the oscillator quartz, ceramic or internal RC?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      It's internal, Beamer, which keeps the cost and size of the board down too. So why couldn't Atmel do this with the ATMega328P, they must have much larger resources than a Chinese fab? The Xtal is usually the biggest thing on Nano-type boards, it looks well out of place. But this one looks neat. BTW it _can_ take an external Xtal too, though why you would want to I don't know.

    • @kilrahvp
      @kilrahvp 4 ปีที่แล้ว +1

      @@RalphBacon The Atmegas DO have an internal oscillator, but it's not considered precise enough and for timing-sensitive applications it's best to use a crystal. Don't know about the precision of the Green's one, but they might have been able to do better since... well, the design of the atmel one is what, 15+ years old now?

  • @paulyorke1437
    @paulyorke1437 4 ปีที่แล้ว

    Hi Ralph. I bought a few of these LGT boards. Followed your (as usual) excellent instructions and the modified simple blinking program compiled and loaded fine. Excellent I thought. I have a 128x160 1.8inch TFT SPI display working perfectly with a Nano on one of my projects. Based on the manufacturers testimony that the LGT is 99% compatible with the trusty Nano, I swapped the LGT into my project board. (Thank goodness for sockets). Well I think I have found one of the non compatible 1%s. I added the #include line to my working Nano project. Compiled and loaded successfully to the LGT. Output is a blank screen. Very disappointing. I am certainly not blaming you as I'd seen these 32MHz clones a few months ago and wondered how good they might be. Well my experience hasn't been at all good. I've shelved the LGTs and moved on. They would have been a nice to have but my new and future projects are using ESP32 variants. 240MHz - awesome. Driving a 2.8 SPI TFT with great results now. All the best. Paul

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      In my demo I did have both I2C and SPI running successfully (simultaneously) so I just wonder, Paul, what it was in your case that caused this. I mean, the protocols either work or they don't, so SPi should work with a screen, SD card or whatever. Hmm, I'll park that idea and dig it out when I next get this LGT board out in the near future.
      Edit: thanks for not blaming me!

    • @paulyorke1437
      @paulyorke1437 4 ปีที่แล้ว

      @@RalphBacon Hi Ralph, I often doubt my skills (with justification ) as at 68 I am prone to the odd mistake when wiring or coding. In this case though, I have a working project with a nano. Added the avr\power.h library line to the working code for the LGT. Compiled and loaded without error or warning. Just wouldn't work the display. I cannot figure out why it doesn't work, quite strange. I recompiled the same sketch (including the avr\power.h library call) for the nano, loaded it up and it worked perfectly with the nano. Sods law at work perhaps.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      It's probably something else, Paul. So the screen you're using is just a standard, no-name TFT running on the SPI bus? I have several screens so might be able to try this over the next few weeks (I'm off to Germany soon for a week to see my Mum and things grind to a halt at that point).

    • @paulyorke1437
      @paulyorke1437 4 ปีที่แล้ว +1

      @@RalphBacon Yes, Ralph. Written on the back of the tft is Driver: ST7735 and below this, NOMEN_TEC V2.0. Works well with Nano. FYI, I'm using 5v as 3.3 was clearly not enough. SCL/SCK on pin 13, SDA/MOSI on pin 11, DC/AO on pin 8, CS on pin 10 and RES on pin 9. I'm using these libraries #include
      , #include , #include , #include , #include . Enjoy your trip to Germany. Used to go monthly to Duisberg on business before I retired three years ago. All the best

    • @DCFusor
      @DCFusor 4 ปีที่แล้ว

      I just got a few of these and got one working via the dbuezas board url method (the nano clone version). The pin for Slave Out Master In (pin 12 on an uno) has a led to ground on it - it's what's blinking out of the box. This led (blue in the case of my wemos board) limits the high voltage value to less than what might be needed as an input logic level, even with the uP driving it, no telling about some probably-weaker device...I'd guess that any SPI that needed any input from the slave would have issues due to that. You might try unsoldering the led?

  • @PeetHobby
    @PeetHobby ปีที่แล้ว

    AVR AtXmega's run also at max 32MHz, they can be overclocked to 48Mhz or so I think.
    Edit: Test the delay function in C lib, If the delay function is correct the core runs the instructions at 16Mhz like the compiler, if runs twice as fast the core runs at 32Mhz and compiler compiled the delay function at 16Mhz. They maybe just divided the clock intern, many uC can do that, but the original atmega328p not, but this clone may have some improvements so can use more variation of parts that are available or have more control over the clock speed.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      Yes, checking the delay() function is a necessity to ensure the clock ticks are happening at the correct frequency.

  • @Conservator.
    @Conservator. 4 ปีที่แล้ว

    TY!
    Liked & subscibed.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Great! Welcome to my Arduinite journey!

  • @caroman6761
    @caroman6761 4 ปีที่แล้ว

    Hi Ralph, it seems to get modern to deliver chips without any printed code or lasered information. Yesterday I opend and decomposed a big solar inverter. O one of the boards I found a chip in size of an atmel 328P, without any print. If you want to know, what chip this is, how do you try to find out?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      If it is also not printed _underneath_ the chip (which you will only know if you desolder it) then the whole point of having anonymous chips is that it makes it _very_ difficult to reverse engineer the circuit.
      A common chip like an Atmega328P would be easy enough to spot just due to the familiarity we have with its design but as for others.. well.. good luck on that one. You might, with your experience of what the circuit is doing and what chips _might_ have been used, narrow it down but it might take a long while.
      As I say, it's often done for a reason.

    • @boldford
      @boldford 4 ปีที่แล้ว

      @@RalphBacon In a former life we had a line building devices using 74XX series logic. This was before the days of laser etching. To provide it with a measure of intellectual protection the silk-screened chip IDs were wiped off using acetone. There nothing new in the world. ' - )

    • @kilrahvp
      @kilrahvp 4 ปีที่แล้ว

      Hadn't seen that before, but it sure saves manufacturers from having to mill the top of the chip to hide what it is to make attempts to copy the design more difficult...

  • @thepvporg
    @thepvporg 4 ปีที่แล้ว

    Have you tried a simple program and measure how hot the chip gets?
    Also with the higher clock speed, what sort of current draw is there?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      I haven't done that, Mark, but the question I'd ask is: What would you do if you found getting somewhat warm? I'd stick a Raspberry Pi type heatsink on it for pennies and assume it would survive! I believe the DataSheet (the translated one on my Github) has details of current consumption. Great to hear from you, thanks for posting.

  • @hansdegroot652
    @hansdegroot652 4 ปีที่แล้ว

    Hi Ralph. Great video as usual :) I have the WavGat Uno R3 which is not really an uno clone (it only looks the same) since it has a different mcu. Wavgat calls it AVGA328P but I have read that is the same as an LGT8F328P. Uno shields don't work and the pins are 3.3 volt. They look to be of good quality. Anyway I tried to do an analog read with it's 12 bit ADC and never got to 4095 (or 993 when using 10bit) and it turned out these LGT8F328P "loose" some accuracy at the max voltage? so They only go to 4064 at 3.3 volt. Anyway. Before I discovered that i tried the arduino internal 1.1 reference trick using the wel known readVcc function but on my wavgat I just got useless ramdom numbers. Do you think these boards would still need this trick or do they allready have internal fixes for this? I ordered some 16 bit adc breakout boards from Ali but that will take a long time before they arrive. So I thought to get more accurate reading using the Wavgat Uno r3 board but if the boards power source affects the measurements I just get more acucurate false readings.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      If your chip really is an LGT8F328P, Hans, (no markings on mine, might be underneath) then the analog precision does start to tail off, just as you say. Try running the battery monitoring sketch in my video #160 to see what results you get (in conjunction with a multimeter). Don't forget the 100nF cap on the AREF pin. Of course, you might just get "...more accurate, false readings" - love that phrase!
      It would be useful if you posted your results back here for others (including me!) should you decide to do this.

    • @hansdegroot652
      @hansdegroot652 4 ปีที่แล้ว

      Hi Ralph, I tried ReadInternalBatteryVoltage.ino on the WavGat uno R3 and tried to read the voltage on the AREF pin but all I got was 0.15 volts. I double checked with an other wavgat board that never had the sketch and it also read 0.15 volt Tried the sketch there too and still got 0.15. Runnning the sketch on a real clone I got 1.07 volt which is more like it. So ignoring these results I ran ReadBatteryVoltage.ino on the wavgat and that just returns The value 2226.18. I changed from usb power to a mains adapter and the value did not change at at all. I guess the registers or something are different. I did get my ADS1115´s (video #104) last week and those are amazing. They use i2c so no voltage fluctuations at all using the ACS712 current sensor. So I am going to use those to track mAh in and out to measure battery capacity. I did test the voltage on +5 ad +3.3 volt pins and they were spot on. (my multimeter agreed with the pins 5.01 and 3.30). So maybe those LGT8F328P do get calibrated in the factory and analog reads are accurate as long as you stay below say 3.3 volts?

  • @juanriofrio6872
    @juanriofrio6872 3 ปีที่แล้ว +1

    Hello SIr... hope you read this.
    I 'm going to use one of those LGT8F328P to replace the Arduino nano in a Arduino cnc. I'm wondering which files i need to change in the grbl files in order to use this clone Arduino nano. Would be kind and give me some idea/direction please.
    I hope is something doable,... looking forward to hear from you. Best regards.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I'm pretty sure all the information you need to use this board is in the video and my GitHub, the link will be in the video description. And what are grbl files?

    • @juanriofrio6872
      @juanriofrio6872 3 ปีที่แล้ว

      @@RalphBacon I got a chuckle with ur question... I assumed you would know that well enough,.. but if not. This is the definition: grbl (Software)
      Software description: an open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino.
      That's the reason of my question...I wouldn't know which files to modify in the grbl files in order to take advantage of the LGT8328P mcu faster clock rate.
      Anyway, in case you find out.
      Could you please let me know.
      Thanks for your attention... I enjoy your videos, very good indeed.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      I don't have a CNC machine, Juan. Sigh. I don't even have a 3D printer. Double sigh. I certainly don't know what grbl files are! Well, I do now!

    • @juanriofrio6872
      @juanriofrio6872 3 ปีที่แล้ว +2

      @@RalphBacon :)Thanks for your time anyway... Take care

    • @pwkoert6594
      @pwkoert6594 3 ปีที่แล้ว

      I have not been working GRBL files lately but, GRBL are commands for the CNC machine (interpreted by the Arduino or something else and are used to control the CNC machine, not the Arduino its self). There should be no need to parse those files because you use another processor.
      But you do need to change the Arduino software (and/or library) and (re)upload it to the Arduino, Wich means you need the source code for the GBRL-interpreter that you are using. Or get an other GRBL-interpreter and make the required changes in that.

  • @dougreed5311
    @dougreed5311 4 ปีที่แล้ว

    Hi Ralph...Have bought several of these boards and have downloaded and installed as per your instructions, I am using the Arduino IDE and can see the different board options, but I cannot select a com port as my computer does not have a driver for this device (nano version) where can i get the driver for windows 7.
    Thanks
    Doug

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      At great expense (cough, cough) I used my Win7 Virtual Machine to try this out. If you plug in the device you should see Microsoft trying to install a driver (which it does partially, but fails on the USB to UART part). Fire up Device Manager and open the PORTS section. You will see the device there with an exclamation mark.
      Go to Holtek's webpage for the missing driver (assuming that your chip is also from HOLTEK) www.holtek.com/productdetail/-/vg/42B534-x
      switch to the DOCUMENTS Tab and scroll down to the Documents section and download the file that says USBBridgeSetup_CA.zip. Ignore ALL other files.
      Unzip this and run the USBBridgeSetup_CA.exe and you will find your HOLTEK device working perfectly. I can now see my LGT8 device on COM3 in my Win7 machine.
      Let me now how it goes. NOTE: the installation seems to stick at the end but be patient - it finishes normally after a few minutes.

    • @dougreed5311
      @dougreed5311 4 ปีที่แล้ว

      @@RalphBacon Mate...Thanks for that , it went exactly as you indicated and I now have access on port 3 also, next step is to see what happens when I have 2 occurrences running with these boards but I need to find another cable first, will let you and everyone know the results.
      Thanks
      Doug

    • @dougreed5311
      @dougreed5311 4 ปีที่แล้ว

      Ok..plugged a second board in and it displays on port 9 all good so far, ran the prime generator and got the results in 59 secs, left it running and it only runs for 2 seconds, any ideas?? main thing is I now have access to these boards.
      Thanks

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      When you say "runs for 2 seconds", what do you mean? It crashes? Stops? Let me know! I'm very happy that you got it working on Windows 7, I may copy my response onto my GitHub for others to find too. On Windows 10 I did not have to install a driver, it all "just worked".

    • @dougreed5311
      @dougreed5311 4 ปีที่แล้ว

      @@RalphBacon
      I mean it runs and calculates for 2 seconds and then prints out the result, I have tried this with and without the #include, no difference, with full results printout...here it runs for 20-30 seconds but never gets to the 10000 mark, the first time I ran it went full cycle and gave a result of 59 seconds so it proved the operation, hope this helps.
      thanks again for you help
      Doug

  • @WagnerSilva-fq2tu
    @WagnerSilva-fq2tu 3 ปีที่แล้ว

    Good. Have you any information about the lock bits(readout protection) for these ICs? I've searched in datasheet, but there's nothing regarding this matter.

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      No, sorry, I don't have that info. Furthermore, I never discovered a way (despite the datasheet hints) of writing (or overwriting) the bootloader.

    • @WagnerSilva-fq2tu
      @WagnerSilva-fq2tu 3 ปีที่แล้ว

      @@RalphBacon I've found a way searching how to do ISP for LGT8F328P. Please check this link blog.csdn.net/nicechao/article/details/102875388

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว

      Interesting. If Google can translate it better I will have a go.

    • @534659123
      @534659123 3 ปีที่แล้ว

      LGT mcu Unreadable,You try to read,Flash will be deleted automatically

  • @_tinkerBOY
    @_tinkerBOY 4 ปีที่แล้ว +1

    Can I also burn the bootloader the same way as the original 328p where you use an Arduino Uno and connect to the pins MOSI, MISO, SCK, RST?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +2

      No you can't, I'm afraid, as I am having exactly the same problem (Jan 2020). Well, I say "problem" but is it? I can change the chip speed "on the fly" and the everything else is as we want it - apart from not having a bootloader at all (thus avoiding any delay at power on). I've asked David Buezas for guidance but I think a specialist programmer unit might be required to upload a new bootloader. If you ever get a solution do let us all know!

    • @_tinkerBOY
      @_tinkerBOY 4 ปีที่แล้ว +2

      @@RalphBacon Yeah I have tested it and really works fine when uploading code from Arduino. Uploaded a code I use for an original 328p and it works very well. :)

    • @hakandemir2668
      @hakandemir2668 3 ปีที่แล้ว

      @@_tinkerBOY I have the similar problem. I have SSOP20 board and bricked while upload a sketch. Could you explain how did you upload bootloader?

    • @_tinkerBOY
      @_tinkerBOY 3 ปีที่แล้ว

      Hakan Demir Im uploading the same way as an atmega328p.

    • @nexuzinnovation-com
      @nexuzinnovation-com 3 ปีที่แล้ว

      @@_tinkerBOY , hi will it be ok for you to describe how you manage to upload "BOOTLOADER" ?
      I posted this issues to:
      forum.arduino.cc/index.php?topic=720242.msg4839787#msg4839787
      Please advise.

  • @xDR1TeK
    @xDR1TeK 4 ปีที่แล้ว

    What prevents the arduino from being a standard in industry level development? Could it be the licensing that dictates everything to be disclosed as open with schematics as well?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      It's probably the fact that we have no control over the supply of this chip, nor total control of it. Whilst it is capable there are some anomalies (compared to a genuine AVR chip). But if the supply chain were to break the only recourse would be to revert back to an AVR chip anyway (with different pin arrangements so not a drop in replacement by any means). And I have discovered that it is impossible (for me, and others) to either update the bootloader, or to flash the chip using the ICSP/SPI method, thus not requiring a bootloader in the first place. If I were in the business of making commercial products I would not use this chip - but for hobbyists it's great!

    • @xDR1TeK
      @xDR1TeK 4 ปีที่แล้ว

      @@RalphBacon this greatly complements my research as well. I find each manufacturer goes about doing things their way, to the point where no standard would be common amongst them all. Atmel with their 8 bit chip that supports a bootloader, and microchip's base and mid range 8 bit pics that don't. Yet pic's 18F 8 bit higher end range do support but their IDE doesn't offer support over EZBL or MCC support. I don't mind dabbling in datasheet but somehow I am wondering when does the IDE become a tool to save time rather than just a compiler? Simple example of such conflict in selecting my tools is when I need to interface an ethernet chip. Should I just dig out the manufacturer's libraries and include them in my firmware? Unlike arduino libraries which appear to be more like Lego brick building compared to finding myself having to reinvent the wheel with other off the shelf components for large projects. How far back should one regress considering the many standards that involves in terms of a learning curve?

  • @jackevans2386
    @jackevans2386 ปีที่แล้ว

    Hi Ralph, Does the LGT8F328P use the same 'device signature' as the ATMega328P ? If not it won't be able to be programed within Studio 7.

    • @RalphBacon
      @RalphBacon  ปีที่แล้ว

      It contains a different device signature Jack; but the boards.txt file in an Arduino environment expect this. Does Studio 7 not do this too?

    • @jackevans2386
      @jackevans2386 ปีที่แล้ว

      @@RalphBacon Hi Ralph, Thankyou for the reply. I've managed to solve all the issues with the LGT8F328P. Studio 7 doesn't work with this chip directly, but there is a work around.
      Any Hex file, whether created in Studio 7 ( Assembly Language or C) or Arduino IDE can be written to the board using AVRdude. A programmer for the LGT8F328P board can also be created using another nano board with code readily available on the internet.
      So the good news is that you are not limited to Arduino IDE in order to use this chip.
      This opens up a whole new world for this remarkable little beast of a micro !

    • @jackevans2386
      @jackevans2386 ปีที่แล้ว

      @@RalphBacon PS: AVRdude acknowledges it as an ATmega328P. Same device signature.

  • @TYGAMatt
    @TYGAMatt 2 ปีที่แล้ว

    Watched your LGT8F328P vids the first time around. Just be reading through the dbuezas github and the functions such as fastio and the PMW are quite interesting. The extra analogReference voltages also very handy.
    Think I'll order one and see how it goes.
    Maybe something worth revisiting? Or too old now? I know I'm too old for all this extra learning LOL!!
    Cheers.
    Matt.

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว

      These are good boards as a replacement for a Nano (same size, better performance). However, there a couple of compatibility issues that most user won't encounter, like differential analog inputs when it behaves a bit differently. Oh, and we are _never_ too old to learn something new. I'm the living proof!

    • @TYGAMatt
      @TYGAMatt 2 ปีที่แล้ว

      @@RalphBacon Thanks Ralph. I've ordered one so will have a play. A tad cheaper than a Nano but that really makes little difference. Cheers!

    • @afkafkafk
      @afkafkafk 2 ปีที่แล้ว

      @@TYGAMatt I bought some recently too but both came without a bootloader, I am at my wits end on how to flash them

    • @TYGAMatt
      @TYGAMatt 2 ปีที่แล้ว

      @@afkafkafk I've seen reference to bootloaders for this chip but haven't looked into it. Hopefully I won't have to but the info is probably out there.

    • @TYGAMatt
      @TYGAMatt 2 ปีที่แล้ว

      @@afkafkafk well, the postie delivered my LGT8F328P board today so I'll have a bit of a play with it later.

  • @superdau
    @superdau 4 ปีที่แล้ว +1

    If I had to guess the 1% that's not compatible would be EEPROM and clock cycle count for some instructions. Not in the sense that it won't work, but that it behaves differently. EEPROM could be faster/slower to write for example or some instructions might take a clock cycle more or less. So if you wrote a program that relies on a certain piece of code take a known exact number of clock cycles to get timings in the tens of nanoseconds right, you might have to rewrite that.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      There's no separate EEPROM chip on this board, apparently, it's 'shared' with program FLASH, but is user-configurable in size. Of course, you could always add a FLASH chip module. I think that should equate to more than 1%, however!

  • @TechnoWit3D
    @TechnoWit3D 3 ปีที่แล้ว

    Hi Scott do you know .. what is the max frequenecy this board able to emit ? is it 65khz as arduino ?

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Scott's not here right now but I might be able to help. I would expect this board to be able to generate frequencies far beyond 65KHz. Whether PWM or just rolling your own using digitalWrite commands.

    • @TechnoWit3D
      @TechnoWit3D 3 ปีที่แล้ว

      @@RalphBacon hi sorry for miss typo your name with Scott.. May mistake. Thanks. I will give a shot. But I dont know how to measure over 65khz or not.

  • @leachim66
    @leachim66 4 ปีที่แล้ว

    Interesting that I can't seem to find the bare ICs in SOP or LQFP from the usual suppliers (Aliexpress, LCSC, ebay) I can find tons of modules, but there doesn't seem to be a source for the chips themselves

    • @leachim66
      @leachim66 4 ปีที่แล้ว +1

      FWIW I found a source for them on taobao (chinese):
      item.taobao.com/item.htm?spm=a312a.7700824.w4004-2729707598.25.bf1d374cKGeTlP&id=537735990461
      Double Update: Man these are not easy to find, but I found a single seller that will sell them to westerners easily:
      www.aliexpress.com/item/32821636647.html (not an affiliate link)

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Me neither, Mike. I even queried this with my sponsor LCSC.com and they said it wasn't one of the products they stocked. I suspect this chip is prevalent in the Chinese home market and has now been made available via modules to us in the West. Whether we will ever get the bare chips is somewhat doubtful. I suppose it would be feasible to buy the cheapest board (the SSOP20 version can be had for $0.74, or the LQFP32 for $1.29) and just desolder the chips. Or use the modules as plug in devices for a bigger PCB.

  • @davidwillmore
    @davidwillmore 4 ปีที่แล้ว +1

    Ralph,. You briefly mention the small SOP20 boards. Have you tried to use them? I picked up a few and haven't had any luck getting them to program. There is a swd/swc pair on it which I assume is for debugging. I wonder what protocol it uses? Does anyone know? Thanks for the great videos. Glad to see your eye has recovered!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +2

      The small version of this clone (the SOP20) needs the SPI route to program using ICSP. I haven't used the tiny board (yet) but others have. Kind of you to mention my eye but recovered it has not, I'm afraid. I'm seeing the cataract surgeon in two weeks' time to talk about all this. Then it may be all plain sailing if I get a new plastic lens! We shall see (pun intended).

    • @davidwillmore
      @davidwillmore 4 ปีที่แล้ว

      @@RalphBacon Thank you for taking the time to reply to me. I have spent a day or so beating my fists against the keyboard to only come to the same conclusion. I have yet to find a way to do it by that method. If you have any recommendations, I would appreciate hearing them. One of my friends had a lens replacement for the same reason and come out with better vision than they had had for decades. So, there is something to look forward to. ;) I wish you the best and thank you for the videos.

    • @dbuezas
      @dbuezas 4 ปีที่แล้ว +3

      If you are talking about the green SOP20 boards which are somewhat similar to the pro minis: mine came with a bootloader preinstalled, it uploads like a pro mini through tx/rx except that the pinout is a bit different.
      Be sure to select the right board from the menu though.
      Note: my board matches the second board from the bottom here (ehem ehem shameless plug): github.com/dbuezas/lgt8fx

    • @janvda39
      @janvda39 4 ปีที่แล้ว

      @@RalphBacon Hello Ralf, First Thank you for your amazing videos. The SSOP20 version can be programmed via Rx/TX and Arduino IDE. The best results come with WEMOS XI board but.. Serial.print() not working on the 3 modules I bought ! Debug is possible via SoftwareSerial and I2c displays. Hoping the best for you. Regards. JC

    • @davidwillmore
      @davidwillmore 4 ปีที่แล้ว

      @@dbuezas What wiring is necessary to use the SSOP20 boards? I currently have one hooked up with a PL2303 USBSerial adapter that has TX, RX, and DTR--exactly like I use with the AVR Pro Mini boards. I'm getting timeouts from avrdude. "Programmer is not responding." "not in sync: resp=0x00", etc. The board came with a blink sketch on it and *I assume* a bootloader. I'm starting to think that assumption is false and I may need to flash them.

  • @krisgachify
    @krisgachify 3 ปีที่แล้ว

    Have problems with I2C, board working but what ever i try connect over A4, A5 its not detected ?? cant make sensors work with those boards ( lgt8f328p) help please....

    • @RalphBacon
      @RalphBacon  3 ปีที่แล้ว +1

      Two things to do to test this.
      1. Load up the standard BLINK sketch and make sure it really is flashing the LED at 1Hz not quicker or slower. This gives an indication that you have selected the correct board description.
      2. Load up the I2CScanner program (from github.com/RalphBacon/LGT8F328P-Arduino-Clone-Chip-ATMega328P ) and see what it thinks is connected.
      If you detect nothing, suspect that your wiring is wrong (SDA/SCK reversed) or the clock speed is wrong (incorrect board selected despite step (1) being done). Also repeat this step with a standard UNO just to prove the device _can_ be detected using this sketch.
      We know this works just fine on I2C so it is a matter of doing things detective like, one step at a time!

  • @josephslaviero
    @josephslaviero 4 ปีที่แล้ว

    Hi, would swapping the 16Mhz xtal with a 32Mhz xtal work? sorry if it's a dumb question,,, (do they even make a 32Mhz Xtal)???

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      They do make 32MHz crystals, Joseph, but you can't put a 32MHz one into an Arduino - the chip can run at a maximum speed of 20MHz. Better to use a different device entirely if you really need that speed. An ESP8266 is an obvious candidate (80MHz or 160MHz) or an ESP32 (160MHz or 240MHz).

  • @saturdayscience5540
    @saturdayscience5540 4 ปีที่แล้ว

    Good video at approx 11:46 you hint at telling us about GUID. Were you going to say something about it?

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      It's all in the GitHub, Michael, but you have to look hard!

  • @dbuezas
    @dbuezas 4 ปีที่แล้ว +2

    Update:
    github.com/dbuezas/lgt8fx
    Easy way to add arduino IDE/vscode support with easy in menu clock setup
    SoftwareSerial support for 32Mhz thoroughly tested and more goodies (e.g. diff op amp API)
    Add an issue if something differs from atmel chip :) me and others actively work on the repo.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Thanks for the update link, David, greatly appreciated. Thanks for posting here.

    • @nexuzinnovation-com
      @nexuzinnovation-com 3 ปีที่แล้ว

      Hi David,
      I have posted the LGT8F328P issues to:
      forum.arduino.cc/index.php?topic=720242.msg4839787#msg4839787
      Please advise.

    • @dbuezas
      @dbuezas 3 ปีที่แล้ว

      @@nexuzinnovation-com use another lgt board as ISP and follow this tutorial github.com/dbuezas/lgt8fx/blob/master/lgt8f/libraries/LarduinoISP/readme.md

  • @kilrahvp
    @kilrahvp 4 ปีที่แล้ว +1

    Looks like the nano/promini-like variants are gone from BG, and price for the EVB has gone up. Need to go on aliexpress for the small ones.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Yes, they are still available from AliExpress. The EVBs are coming back to Banggood mid August 2019 but at a higher price, apparently. We shall see.

  • @letrung9199
    @letrung9199 2 ปีที่แล้ว

    Hello, I tried to find your email but couldn't see it. So I ask you a question here, hope you can see. Im using lgt328p ic as my project with main frequency 32mhz. However, when I tried to reduce frequency to 4mhz from selectable list in IDE, the LCD display was just running with strange characters. When I change to 8mhz it's okay. I also look and research but have no clue. Do you have any suggestions or recomendations for me about my issue?
    Thanks so much!

    • @RalphBacon
      @RalphBacon  2 ปีที่แล้ว +1

      I'm guessing here, but if your clock frequency drops by that much you may have to run I2C at a reduces speed of 100kbps. If it's already running at that frequency then I am out of ideas, I'm afraid, other than trying to reduce it further, as there is no "minimum" I2S clock speed.

    • @letrung9199
      @letrung9199 2 ปีที่แล้ว

      @@RalphBacon thank you so much for answering my question. Could you tell me how to know the iic running with what bps? Then I might have solution for my issue.

  • @oladunk9986
    @oladunk9986 4 ปีที่แล้ว +1

    Speed has never been the biggest issue with Arduino's running @16MHz. Flash memory size is. Try loading the Adafruit TFT libraries.
    I have used Mega's and Atmega 644P too. STM32's are for future projects and ESP32 for IOT stuff.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      Indeed, Ola. code bloat is definitely our enemy when it comes to flash size. But as my ATTiny13 challenge will / may show there is a lot to be gained by working around such large libraries.

  • @petely9501
    @petely9501 4 ปีที่แล้ว +1

    Good stuff!
    I bought some of these without knowing they were "special" Arduinos. I tried one and couldn't get it to program. Last week I had an idea they might be without a bootstrap, so I tried programming that via an ISP - which also failed. Only later did I come across links to "WAVGAT" Arduinos and their differences. Since then, success. I even have the Adafruit ILI9341 display running across hardware SPI @ 32MHz.
    One thing I've noticed, you have some LGT's with an onboard serial-USB. The ones I've seen on Aliexpress say they have Holtek Serial-USB chips. (I don't have one of these yet, on order). Those Holtek devices are programmable with different IDs and description fields .... if they are genuine parts.
    Might be worth a tinker.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Interesting that these can be "reprogrammed" with a different Vendor USB IDs, Pete. I suppose it depends on whether you really want to use the USB port. I'm currently using one in a new project but it's the MiniEVB version (EValuation Board?) without USB anyway so I'll just use an FTDI USB-to-serial to flash it (or perhaps ICSP). It will be interesting to see how our respective projects turn out - keep tuned!

  • @braveheart9275
    @braveheart9275 4 ปีที่แล้ว

    Hello , and thanks for your video. I have a problem , how upload sketch to LGT8F328p -SSOP20 ???.

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Do you mean on a bare chip or one mounted on a board? If the latter you should be able to use the USB connector (if one exists, and a bootloader has already been uploaded to the chip). Otherwise you will need to use the ICSP method (SCK, MOSI, MISO, S-RST + power lines) from another Arduino running the Arduino-as-ISP sketch. I've demoed that many times. The same method can be used on a bare, naked LGT8F328P chip (which I've also demoed). Any help?

    • @braveheart9275
      @braveheart9275 4 ปีที่แล้ว

      @@RalphBacon
      Thanks sir for your reply. Mine is one mounted on a board, with no usb connector. And I supposed it have the bootloader inside it. So, how can uploas sketches in it ? I'm using - for now - Arduino IDE.
      My board is like this : github.com/dbuezas/lgt8fx/wiki/Pro-Mini-Style---SSOP20

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว

      You will know if a bootloader is present because the LGT8's blue LED will blink rapidly at first, then a slow blink. That LED is on GPIO 13 by the way.
      Ensure you have the correct boards URL set in your preferences (File > Preferences > Additional Boards Manager):
      raw.githubusercontent.com/dbuezas/lgt8fx/master/package_lgt8fx_index.json
      See David Buezas' excellent GitHub for more information:
      github.com/dbuezas/lgt8fx
      Ensure you picked the right board (ending with "... pro mini alternative")
      Let's assume a boot loader is already loaded.
      1. Connect up an FTDI Serial-to-USB adapter with the RX and TX pins from the FTDI going to the TX and RX of the LGT8 (ie swapped over).
      2. Additionally connect the VCC and GND to the usual places.
      3. Finally connect the FTDI's DTR to the LGT8's DTR (see markings under the board). I didn't connect CTS on the FTDI to anything but sometimes you may need to connect this to GND.
      Now load up the BLINK sketch (ensure the LED is set to GPIO13) and you should be fine. Worked for me, anyway!

    • @braveheart9275
      @braveheart9275 4 ปีที่แล้ว +1

      @@RalphBacon
      Thanks....