#156

  Рет қаралды 47,149

Ralph S Bacon

Ralph S Bacon

Күн бұрын

Пікірлер: 601
@leachim66
@leachim66 5 жыл бұрын
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 5 жыл бұрын
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!
@englishrupe01
@englishrupe01 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
At 79p I will have to order one to do just that ...
@englishrupe01
@englishrupe01 5 жыл бұрын
@@almostanengineer Good man! If you need to split it, i will go half with you! Lol!
@Poult100
@Poult100 2 жыл бұрын
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.
@Ilikeridin
@Ilikeridin 5 жыл бұрын
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 5 жыл бұрын
Sounds like you will be very busy, Chris, have fun!
@mahudson3547
@mahudson3547 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
​@@mahudson3547 Thanks for the response. I'll give it a look.
@drelmetbrown
@drelmetbrown 7 ай бұрын
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 7 ай бұрын
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 7 ай бұрын
@@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 6 ай бұрын
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.
@dl8cy
@dl8cy 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@RalphBacon rudeness and quality are not natural enemies :-) I am one of that fu* Germans - so greetings from Berlin
@RalphBacon
@RalphBacon 5 жыл бұрын
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 5 жыл бұрын
​@@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 5 жыл бұрын
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...
@bbowling4979
@bbowling4979 5 жыл бұрын
Got my boards today. Followed your instructions and it worked a treat! Thanks very much. Now to play around with this.
@RalphBacon
@RalphBacon 5 жыл бұрын
Glad to hear it, now you get to play with them, as you say!
@GnuReligion
@GnuReligion 5 жыл бұрын
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 5 жыл бұрын
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 KZbin seem incapable of fixing. But good luck with your boards (when they arrive), keep us all posted.
@davidwillmore
@davidwillmore 5 жыл бұрын
@@RalphBacon GNU is pronounced like the animal--"new". So a new gnu sounds like a speech impediment.
@TheDefpom
@TheDefpom 5 жыл бұрын
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 5 жыл бұрын
Indeed, speed is not everything, but there's enough on this chip to make it interesting to a wider audience, I reckon.
@mrrgstuff
@mrrgstuff 5 жыл бұрын
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 5 жыл бұрын
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
@smitcher
@smitcher 5 жыл бұрын
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 5 жыл бұрын
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).
@noweare1
@noweare1 5 жыл бұрын
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 5 жыл бұрын
And the fact is it a pin-compatible drop-in also helps, Joey.
@TheUnofficialMaker
@TheUnofficialMaker 5 жыл бұрын
You're a genius with relevant interesting content, clearly explained. Go Ralph!
@RalphBacon
@RalphBacon 5 жыл бұрын
Wow! High praise indeed. But I'm still not sending you that $20! Glad you enjoyed it and thanks for posting.
@Hugatry
@Hugatry 5 жыл бұрын
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 5 жыл бұрын
Yes, me too, these seem an ideal replacement for a Nano, just improved!
@JerryEricsson
@JerryEricsson 4 жыл бұрын
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 жыл бұрын
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.
@ctbully
@ctbully 5 жыл бұрын
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 5 жыл бұрын
If you find the missing 1% (apart from EEPROM being shared program memory) do let us know, John! Thanks for posting.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 5 жыл бұрын
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 5 жыл бұрын
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).
@d.jensen5153
@d.jensen5153 4 ай бұрын
The built-in DAC is what compels me to adopt this board. Previously I was using expensive and bulky DUE boards with the humongous Atmel ATSAM3X8E chip. Was really disappointed the RPi Pico had no internal DAC. Same with the Blue Pill. I guess the expectation is that we'll add an external serial DAC or use PWM and an external LP filter.
@RalphBacon
@RalphBacon 2 ай бұрын
The ESP32 has a built in DAC, but even then I'm not so sure about the overall quality.
@d.jensen5153
@d.jensen5153 2 ай бұрын
@@RalphBacon Right. When the extra throughput is needed, the ESP32 is a great value. OTOH the LGT8F328P version of the Pro Mini is only 83 cents and will suffice for at least 90% of μC projects here.
@hoggif
@hoggif 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
Glad that everyone seems happy with this board!
@colinmurdoch9667
@colinmurdoch9667 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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.
@adaml52
@adaml52 5 жыл бұрын
Hi Ralph, Great information, thank you ATB Adam
@RalphBacon
@RalphBacon 5 жыл бұрын
Glad you think so, Adam, great to hear from you, thanks for posting.
@colinmackay852
@colinmackay852 5 жыл бұрын
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 5 жыл бұрын
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.
@vonries
@vonries 5 жыл бұрын
Keep up the great work Ralph.
@RalphBacon
@RalphBacon 5 жыл бұрын
I shall try to, Stephen, I hope you liked the video. At these prices, it's a no-brainer, right?
@vonries
@vonries 5 жыл бұрын
@@RalphBacon It's so hard not to spend money 'hand over fist' to our far eastern friends.
@gavinsmalley1513
@gavinsmalley1513 5 жыл бұрын
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 5 жыл бұрын
Yes, I (or others) need to do some experimentation. Why not get a couple and try them out, Gavin?
@gavinsmalley1513
@gavinsmalley1513 5 жыл бұрын
@@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 5 жыл бұрын
I just dig and dig and try things out and read datasheets! Even Chinese ones! Win some, lose some.
@roadeycarl
@roadeycarl 5 жыл бұрын
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 5 жыл бұрын
Glad you found it useful Carl, thanks for posting.
@getyerspn
@getyerspn 4 жыл бұрын
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 4 жыл бұрын
It should - just make sure the chip on the board is actually an LGT8F328P and not some other weird chip!
@superdau
@superdau 5 жыл бұрын
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 5 жыл бұрын
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!
@slavric
@slavric 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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.
@Stuart-AJC
@Stuart-AJC 5 жыл бұрын
The smaller board without a USB connector is a clone of the Arduino Pro Mini (my favourite Arduino, comes in 8/16 MHZ and 3.3/5.0V versions)
@RalphBacon
@RalphBacon 5 жыл бұрын
Ah ha! That was my initial reaction (you may have noticed I did a sort of double-take in the video as I tried to remember exactly what the Pro Mini looked like). Cool. Good to know.
@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!
@pekkagronfors7304
@pekkagronfors7304 5 жыл бұрын
Nice overview/tutorial. Thank's, Ralph.
@RalphBacon
@RalphBacon 5 жыл бұрын
You're welcome, Pekka, glad you liked it. thanks for posting.
@Hasitier
@Hasitier 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
Ralph S Bacon They are already ordered Ralph. When I have tested them I will report back.
@craigstatham5235
@craigstatham5235 5 жыл бұрын
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 5 жыл бұрын
More like SOIC.
@RalphBacon
@RalphBacon 5 жыл бұрын
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.
@kosa2004
@kosa2004 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 😊
@oladunk9986
@oladunk9986 4 жыл бұрын
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.
@rogerfurer2273
@rogerfurer2273 5 жыл бұрын
Very useful and interesting. Thank you Ralph.
@RalphBacon
@RalphBacon 5 жыл бұрын
Thank you for your feedback, Roger Furer, noted and appreciated!
@andrewtoogood1429
@andrewtoogood1429 5 жыл бұрын
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 5 жыл бұрын
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.
@Pixelwaster
@Pixelwaster 5 жыл бұрын
Logic Green has links for the QFP-48 (item.taobao.com/item.htm?id=549915535039 ) and the 32 pin. The SSOP-20 link is grayed out. At the current exchange rate the chips are less than 3 cents each. I couldn't get taobao website to work so that is as far as I got.
@RalphBacon
@RalphBacon 5 жыл бұрын
Interesting. Bare chips would make it interesting in being able to use our own PCBs.
@dbuezas
@dbuezas 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@slm60uk Thanks! Glad to hear it is already being used :)
@dbuezas
@dbuezas 5 жыл бұрын
@@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 5 жыл бұрын
Sounds great, true collaboration indeed. :)
@robertcoyle1532
@robertcoyle1532 5 жыл бұрын
Good info Ralph, keep it up!
@RalphBacon
@RalphBacon 5 жыл бұрын
Thanks, Robert, I will do my best.
@kilrahvp
@kilrahvp 5 жыл бұрын
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 5 жыл бұрын
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.
@NotMarkKnopfler
@NotMarkKnopfler 4 жыл бұрын
If the 328P had any issues at all it's the memory size. It's execution speed is generally more than good enough IMHO.
@RalphBacon
@RalphBacon 4 жыл бұрын
There's always the Mega2560, now available in a variety of compact formats with pretty much the same performance as the Mega328P but with umpteen more pins, several hardware UARTs and 256Kb Flash and 8K SRAM. uk.banggood.com/RobotDyn-Mega-2560-PRO-(Embed)-CH340G-ATmega2560-16AU-Development-Module-Board-With-Pin-Headers-p-1397734.html?p=FQ040729393382015118&
@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 👍
@PeetHobby
@PeetHobby 2 жыл бұрын
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 2 жыл бұрын
Yes, checking the delay() function is a necessity to ensure the clock ticks are happening at the correct frequency.
@vajskidsconsoles2005
@vajskidsconsoles2005 2 жыл бұрын
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 жыл бұрын
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.
@paulyorke1437
@paulyorke1437 5 жыл бұрын
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 5 жыл бұрын
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.
@maxximumb
@maxximumb 5 жыл бұрын
Handy bit of kit to know about.
@RalphBacon
@RalphBacon 5 жыл бұрын
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!
@GlennHamblin
@GlennHamblin 5 жыл бұрын
Thanks Ralph. Good stuff!
@RalphBacon
@RalphBacon 5 жыл бұрын
Glad you liked it, Glenn, nice to hear from you.
@jamescullins2709
@jamescullins2709 5 жыл бұрын
Excellent video Ralph. great job. I'll try one.
@RalphBacon
@RalphBacon 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
@@RalphBacon got it!
@tubical71
@tubical71 5 жыл бұрын
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 5 жыл бұрын
And let us know how it goes. Please. Pretty please!
@uwezimmermann5427
@uwezimmermann5427 5 жыл бұрын
the "old" ATmega328 is rated at a max clock speed of 20 MHz, 25% faster than the 16 MHz utilized on those Arduino-boards... yet still this chip by itself also would be interesting...
@uwezimmermann5427
@uwezimmermann5427 5 жыл бұрын
very interesting details in the datasheet - in the English texted pictures at least: - they have stripped off some of the power supply pins to make place for some PORTE-pins even on the 32pin chip - a 16 bit ALU promises faster calculations - 16 bit load/store to the SRAM - a variable size EEPROM memory which is partitioned from the Flash memory Most functions are probably not supported by the gcc-compiler if it assumes it is compiling for a standard AVR chip though...
@RalphBacon
@RalphBacon 5 жыл бұрын
I was wondering about the last point too. How do you use the DAC if the standard Arduino core does not support it?
@RalphBacon
@RalphBacon 5 жыл бұрын
It might be answered here: wiki.wemos.cc/products:xi:lgt_nano (scroll to bottom, Arduino Core)
@uwezimmermann5427
@uwezimmermann5427 5 жыл бұрын
@@RalphBacon like you can do with every feature in the original Atmega328 which is not covered by Arduino. Just go into the hardware directly by using the C-primitives, like addressing the hardware registers directly. Since all functions in these types of microcontrollers are mapped into the memory, it should absolutely not be a problem. Next step would be to write your own library.
@keen2461
@keen2461 4 жыл бұрын
Trully interesting! But, for those of us who hate arduino enviroment, what compiler and what programmer (SWD?) should be used?
@RalphBacon
@RalphBacon 4 жыл бұрын
I use Eclipse Sloeber but the new Arduino IDE is being built on Eclipse - out later this year.
@PeetHobby
@PeetHobby Жыл бұрын
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 Жыл бұрын
That's impressive. And you are correct inasmuch that I did not tweak or optimise the STM32F103 at all, which would have probably helped.
@tubical71
@tubical71 5 жыл бұрын
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: kzbin.info/www/bejne/kIHbh2iYi9Fqmqs
@RalphBacon
@RalphBacon 5 жыл бұрын
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 5 жыл бұрын
@@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...
@mkitchen
@mkitchen 5 жыл бұрын
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 5 жыл бұрын
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?
@UpcycleElectronics
@UpcycleElectronics 5 жыл бұрын
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 5 жыл бұрын
Check out 0033mer youtube channel. He does all his coding in 4th. Pretty interesting stuff.
@UpcycleElectronics
@UpcycleElectronics 5 жыл бұрын
@@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 5 жыл бұрын
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 5 жыл бұрын
@@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.
@paulyorke1437
@paulyorke1437 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
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?
@dekipet
@dekipet 4 жыл бұрын
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 4 жыл бұрын
Yes, I'm pretty sure the Wemos XI was based on an LGT8F328P, so you are correct.
@proxy1035
@proxy1035 5 жыл бұрын
to be honest though they could've done 40 MHz to exactly double the speed of the orginal chip. since the 328p can run at 20 MHz, but all arduino boards only run it at 16 MHz for some reason
@RalphBacon
@RalphBacon 5 жыл бұрын
The reason is all historical, the original ATMega8 only ran at 16Mhz and they kept it like that to ensure it was compatible. Allegedly.
@proxy1035
@proxy1035 5 жыл бұрын
@@RalphBacon aww, yet again does legacy support hinder progress! seriously though the chip itself could still support 40 MHz but just use a 32 MHz Crystal on the board, so like with Arduino if you really want to you could run the chip itself at faster speeds
@RalphBacon
@RalphBacon 5 жыл бұрын
Probably. But if it's speed (as in its ability to do work) you want then an STM32 or ESP32 is a better choice!
@petely9501
@petely9501 4 жыл бұрын
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 жыл бұрын
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!
@robertparenton7470
@robertparenton7470 Жыл бұрын
Thank You! From Frisco, TX
@RalphBacon
@RalphBacon Жыл бұрын
You're welcome! So, not San Fran, then?
@werner7156
@werner7156 Жыл бұрын
Hey.. what you didn't mention is that the chip doesn't have a real EEProm like the Adruino Nano. if you need EEProm space you have to emulate flash memory, but this is not as long writable as a real EEProm memory. if you write something every few seconds, the cip is worn out in a couple of days.
@RalphBacon
@RalphBacon Жыл бұрын
Good point. Although writing something every few seconds to _any_ EEPROM is not the best design I can think of. Ideally use an external flash memory chip or a proper filestore system, whether that is an old fashioned SD card or the newer LittleFS (now standard on the ESP32s, replaces SPIFFS).
@werner7156
@werner7156 Жыл бұрын
@@RalphBacon Well i find Out .. that Atmel only fools the light with the alleged EEProm Funktion which is specified with a maximum of 100,000 writable cycles, which is actually the same as a flash memory .. A real EEProm can be written up to 1 million times. Unfortunately, the LGT8F328P also needs more flash memory for its temporary variables than the 328P because it has a higher resolution on the analog inputs/outputs.. I had to switch back to the 328P in order to to use the couple of Kbytes i needend . In the end I don't see any other way, i have to switch over to the STM3F103T8 or F401 . but I don't know anything about it and just Start learn by doing. Thank you for informing users with videos. you helped me out many times.
@RalphBacon
@RalphBacon Жыл бұрын
Well, let's do some maths! We'll assume that "every few seconds" in your scenario is every 5 seconds, that you are writing to flash memory (EEPROM). So in one day (86,400 seconds) you are writing 17,280 times. If the flash memory is good for 1,000,000 (one million) writes that means you can write at the 17,280 rate for just 57 days before it gives up. Not very long is it? And this all assumes that the flash memory can actually be written to a million times without giving errors or storing the wrong value. OK, we're assuming we're writing to the same memory location, and not having any kind of wear levelling, but, as I said, still not the best way to log data! But if you're happy with this, then carry on, there's no definitive right or wrong way to do it in a hobbyist environment.
@werner7156
@werner7156 Жыл бұрын
@@RalphBacon Well, describing it with the EEProm didn't grow on my idea, I only have a program for an FPV station which I have to rewrite so that I can use 4 RX5808 receivers with the additional setup of an RSSI antenna tracking and I noticed that the EEProm function plays a very central role such as Calibrations so far. That's why I had to delve into the matter to see what is possible and what is inappropriate.. I was only disturbed by the fact that the 329P is said to have an EEProm Ram that neither the "LGT8F328P" nor the "STM32" series has. That's why I bought the board "AT24C256 24C256 I2C interface" because I find the function itself very practical if you don't want to deal with a huge number of variables. The core of my problem is just... with this program, the emulated EEProm is written with the line, for example with "EEPROM.write(EEPROM_ADR_RSSI_MIN_A_L,(rssi_min_a & 0xff));" while with an external EEProm the expression is used like: "Wire.beginTransmission(i2c_address);" "Wire.write((int)(address >> 16)); // MSB" " Wire.write((int)(address & 0xFF)); // LSB" Here I would have to adjust the EEProm.h include file so that I don't have to change all the entries in the existing program. At around 5 ms, the access times are also longer than if you were to write to the internal flash memory of the MCU. I'm not that experienced in programming, but I'm getting better and better not least because I keep watching your videos, i also download various files from you on GitHub. Whatever.. I'm no longer a fan of the 329P or the LGT8F328P (but the clone is super successful). I need space at the top for programming, I don't know where my programs will end up., At the very beginning of my project I wanted to use an Adruino for the divesity and another 328P for the RSSI tracking, but the program for the diversity already occupies 99% of the 328P after including the two additional receivers and it still needs to get more variables. That's why I'm going to switch to the STM32 series. I wish you a great new year Werner
@iceberg789
@iceberg789 5 жыл бұрын
all the secrecy, may be all because they want to avoid copyright issues.
@RalphBacon
@RalphBacon 5 жыл бұрын
I very much doubt that is concern for Chinese fabs!
@tubical71
@tubical71 5 жыл бұрын
it´s more like...."we don´t give a damn" about these EU/Overseas customers....as they already have a huge marked in their own country (140million people in china alone;)
@SpeccyMan
@SpeccyMan 5 жыл бұрын
The thought crossed my mind - maybe the chip text is on the underside of the package? We need a bare chip to see if this is so. I've always pronounced Gnu after the animal, as in the song by the late Charlie "Hello my darlins" Drake - I'm a Gnu ;) As I understand it, it's actually a recursive acronym for "Gnu Not Unix" 12 bit ADC's are a bonus as is the DAC - though no mention of the bit precision of the DAC. On a final note, it is perfectly possible to clock a Uno (or a Nano etc.) at 20MHz with a change to the crystal and some tweaks here and there. Oh, I was wrong, another final note, an English datasheet - www.electrodragon.com/w/images/b/b6/LGT8F88P_LGT8F168P_LGT8F328P_translated.pdf Edit: reference to that datasheet tells me the DAC is 8 bit. Nice. Oh (he he) and another final thought occurred to me, how nice would a 28 pin DIP version of this be? I'd be perfectly content to sacrifice one channel of ADC for the DAC pin. Sadly that would prevent its being a drop-in replacement but we real "hackers" are happy to modify PCB tracks if needs be. Hopefully done with fresh thoughts now.
@GnuReligion
@GnuReligion 5 жыл бұрын
The datasheet in your link is a little hard to read, but the position of the DAC is clear. The QFP32 mega package has dual VCC and GND pins on the left, while the QFP32 version of the LGT8F328P dispenses with two of these, making way for PE4 and PE5. The ADC is on PE4. Looks like they simplified some of the power in on the right as well, making room to pin out some mysterious E and F registers. Yes, it would be a an interesting hack to mount the QFP chip above a little 28-pin DIP, so it could be dropped into an Uno. You are probably aware the mega's C6 and C7 pins can be used for AIN, but not output ... looks like LGT has additional functions on these. And since no crystal is necessary, the XTAL pins B6 and B7 are freed for GPIO at high speed. At a glance, it, looks like there are are a whopping 6+ useful GPIO pins to play with on the LGT QFP32 package.
@RalphBacon
@RalphBacon 5 жыл бұрын
That's great, Nick, I'll put a copy of that pdf on my GitHub with a link too, in case they ever get around to putting back all the lines and blocks, to make it easier to read! Now, if you 'overclock' the Nano to 20Mhz it breaks all the timing routines for the delay and Serial clocks doesn't it (albeit reasonably easily rewritten)? electronics.stackexchange.com/questions/33166/why-do-arduinos-ship-w-16mhz-crystal-instead-of-20mhz Frankly, I think the answer is to use on of these chips from now on!
@SpeccyMan
@SpeccyMan 5 жыл бұрын
@@RalphBacon That is always assuming you are programming the chip via the Arduino IDE and not using a different method to compile and upload your code. ;-) Hint: I do have a nice shiny AVRISP MkII programmer.
@GnuReligion
@GnuReligion 5 жыл бұрын
@@RalphBacon Finally got my order ... of all 5 small ones labeled "BAITE BTE17-13" and "LGT8F328P-SSOP20". No markings on the chip whatsoever! BAITE's store has a picture showing the board selected through Arduino IDE in Chinese, but no docs or downloads. Sadly, the Larduino core does not support these chips. Serial.print() does not work. I read the github discussion. Found that the Wemos XI core *DOES* support it though, as an "LGT Pico." Your QFP32 based boards are more like WAVGAT Pro Mini types. Also found that regular SPI ISP does not work on these. Takes a special program, or perhaps an AVR ICE. Not going to be so simple as planned, replacing the bootloader, or making it default to 32mhz. Gotta put this project away for a sleep cycle. Am rather aGNostic about how to pronounce Gnu[whatever].
@davidwillmore
@davidwillmore 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
@@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.
@WilliHerda
@WilliHerda 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@RalphBacon Thank you very much! I'll try it and report.
@H2ON_MEA
@H2ON_MEA 2 жыл бұрын
THANK YOU FOR SHARING. PWM Pins on Uno, Nano, Mini is 3, 5, 6, 9, 10, 11 ) . 490 Hz (Only pins 5 and 6 (980 Hz)) WHAT ABOUT LGT8F328P..
@RalphBacon
@RalphBacon 2 жыл бұрын
Actually, you can have _any_ frequency PWM you want on the Arduino. Essential for controlling fans, otherwise you can _hear_ the buzzing of the PWM! I might have covered this in my videos #14 / #15 kzbin.info/www/bejne/m2OmgaGjgdKGrdU
@TheMte23
@TheMte23 5 жыл бұрын
EVB is probably evaluation board.
@RalphBacon
@RalphBacon 5 жыл бұрын
Yes, agreed, I did say that once in the video but it was a guess.
@dbuezas
@dbuezas 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
@@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
@luizcassettari
@luizcassettari 5 жыл бұрын
Good job, I love this mcu clones! I am really interested to know how much current draw on deep sleep!
@RalphBacon
@RalphBacon 5 жыл бұрын
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?
@EJEuth
@EJEuth 3 жыл бұрын
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 3 жыл бұрын
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!
@giuseppean9705
@giuseppean9705 4 жыл бұрын
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 4 жыл бұрын
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.
@andymouse
@andymouse 5 жыл бұрын
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 5 жыл бұрын
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).
@yogeshitaliya473
@yogeshitaliya473 5 жыл бұрын
Have a good day sir
@RalphBacon
@RalphBacon 5 жыл бұрын
You too, Yogesh, nice to hear from you.
@mannhansen9337
@mannhansen9337 4 жыл бұрын
Unmarked chips could be factory rejects ? Failed during some test maybe? Remember addon memory for ZX Spectrum back in 1984 ?
@RalphBacon
@RalphBacon 4 жыл бұрын
I had a Spectrum around then and my memory expansion pack was faulty! WH Smith replaced it though!
@_tinkerBOY
@_tinkerBOY 4 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@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 4 жыл бұрын
@@_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 4 жыл бұрын
Hakan Demir Im uploading the same way as an atmega328p.
@nexuzinnovation-com
@nexuzinnovation-com 4 жыл бұрын
@@_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.
@juanriofrio6872
@juanriofrio6872 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
@@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 4 жыл бұрын
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 4 жыл бұрын
@@RalphBacon :)Thanks for your time anyway... Take care
@pwkoert6594
@pwkoert6594 4 жыл бұрын
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.
@JerryEricsson
@JerryEricsson 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
@@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!
@jeffbluejets2626
@jeffbluejets2626 2 жыл бұрын
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 2 жыл бұрын
I'm pretty sure they still work as they always have done, Jorgo. No major changes.
@BobGardnerInOrl
@BobGardnerInOrl 5 жыл бұрын
Looks like that data sheet says 8k flash 1k ram, so its like a mega88 rather than a 328. 60k of ram would make it great for audio.
@pfeerick
@pfeerick 5 жыл бұрын
If you look at the video again at say around 21:46, it's 32k FLASH, 2k SRAM, so in that regard it's identical to the ATmega328P ;)
@RalphBacon
@RalphBacon 5 жыл бұрын
Yes, same FLASH and SRAM but not EEPROM, which is emulated in FLASH if you need it.
@leachim66
@leachim66 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
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.
@thepvporg
@thepvporg 5 жыл бұрын
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 5 жыл бұрын
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.
@saturdayscience5540
@saturdayscience5540 5 жыл бұрын
Good video at approx 11:46 you hint at telling us about GUID. Were you going to say something about it?
@RalphBacon
@RalphBacon 5 жыл бұрын
It's all in the GitHub, Michael, but you have to look hard!
@Klakier1995
@Klakier1995 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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 5 жыл бұрын
Cool topic. Didn't know this existed.
@RalphBacon
@RalphBacon 5 жыл бұрын
Nor did many others (me included) but now lots of people know!
@gl7080
@gl7080 5 жыл бұрын
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 5 жыл бұрын
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 5 жыл бұрын
@@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
@wires4auto
@wires4auto 5 жыл бұрын
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 5 жыл бұрын
ESP32 or ESP8266 can just be overkill/wasteful for some things, Gordon; these can be viewed as a humble Nano on speed!
@thetechcompany2468
@thetechcompany2468 5 жыл бұрын
Ralph, Thank you for this video! Were you able to determine if this chip has 128K of flash?
@RalphBacon
@RalphBacon 5 жыл бұрын
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).
@georgedunham3735
@georgedunham3735 4 жыл бұрын
No joy. Win7 64 no usb driver available. might it use the Uno driver. if so how to find it? I've been using Arduino Micro to date.
@georgedunham3735
@georgedunham3735 4 жыл бұрын
Finally got them going. Reading ALL the material multiple times helped. Link to the USB driver I used is: www.electrodragon.com/w/File:Ht42B534.zip LED_BUILTIN was undefined so I needed to add that to the pins_ardrino.h in the hardware library h file. So far so good, fingers X'd! Thanks Ralph! Praying your eye is improving & the bug is vanquished!
@RalphBacon
@RalphBacon 4 жыл бұрын
Very glad you got this working. When it works it's fantastic. I'm still waiting on my eye op, and the pneumonia will take time to recover from, but it's getting better each day, thank you.
@georgedunham3735
@georgedunham3735 4 жыл бұрын
Thanks Ralph! Prayers up for you & family. We have a SIL dealing with a similar issue. Pneumonia is no small matter @ our age as well. God bless George
@nektarioskourakis8331
@nektarioskourakis8331 2 жыл бұрын
Thanks again for fresh info !Can this board use all the libraries UNO has?
@RalphBacon
@RalphBacon 2 жыл бұрын
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.
@MrEdwardhartmann
@MrEdwardhartmann 5 жыл бұрын
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 5 жыл бұрын
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).
@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 жыл бұрын
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?
@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 Жыл бұрын
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.
@rupert274
@rupert274 2 жыл бұрын
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 2 жыл бұрын
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).
@zygmuntoscypek5703
@zygmuntoscypek5703 11 ай бұрын
ATMega328PB has more timers (2x8 bit, 4x16bit) and 1 KB EEPROM ( 100 000 cycles w/r ).
@RalphBacon
@RalphBacon 11 ай бұрын
Thanks for sharing, always good to know the details (and restrictions) of "clones"!
@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 жыл бұрын
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
@mahlapropyzm9180
@mahlapropyzm9180 5 жыл бұрын
I have heard it said that the asian chips have the markings on the underside. Perhaps try desoldering and having a look - you can only lose £1.41.
@jeffhousen8968
@jeffhousen8968 5 жыл бұрын
then the lettering will probably survive a cascade event meaning you can desolder a blown chip and get the replacement numbers...useful very useful
@RalphBacon
@RalphBacon 5 жыл бұрын
Yes, I might just do that, you never know.
@WagnerSilva-fq2tu
@WagnerSilva-fq2tu 4 жыл бұрын
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 4 жыл бұрын
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 4 жыл бұрын
@@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 4 жыл бұрын
Interesting. If Google can translate it better I will have a go.
@534659123
@534659123 4 жыл бұрын
LGT mcu Unreadable,You try to read,Flash will be deleted automatically
@makersengineering530
@makersengineering530 5 жыл бұрын
Hi, I skipped all the steps.only including these 2 lines #include And clock_prescale_set(clock_div_1); and selected Arduino nano as board,it seems working with 32 bit.but I'm not much knowledge about it.could you please try it for me when you will have a time?
@RalphBacon
@RalphBacon 5 жыл бұрын
The Nano can only run at 16MHz because that's the crystal on the board, Mina. The F_CPU should report 16,000,000 too. I'm guessing you did not mean 32 bit,as the Nano is an 8-bit ATMega32P chip. Executing the clock_prescale command on a Nano will just tell the code to run at full power (16MHz) which it does anyway.
@makersengineering530
@makersengineering530 5 жыл бұрын
@@RalphBacon Sorry I mean Mhz ,The board is LGT8F328P . I skipped all the steps.only including these 2 lines #include And clock_prescale_set(clock_div_1); and selected Arduino nano as board.led blink timing is correct but not sure it running at 16Mhz or 32Mhz.
@RalphBacon
@RalphBacon 5 жыл бұрын
If you skipped all the other steps then your LGT8F328P is running at a clock frequency of 16MHz because that's what the default board.txt definition of the Arduino Nano is. That, and the 16Mhz crystal on the board. The maximum the ATMega328P can ever run at is 20Mhz anyway, unlike the LGT which can (and does) run at 32MHz.
@dbuezas
@dbuezas 5 жыл бұрын
There is now an easy way using 3rd party board urls (like one does for attinys, esps, stm32s etc). start here: github.com/dbuezas/lgt8fx With this you can set any clock without having to add anything to your code (via the boards menu). btw, using it as-if-it-were a normal nano will also break a bunch of other things, the core has quite some differences.
#155 STM32F103 Programming Helper PCB (Blue Pill + FTDI)
34:20
Ralph S Bacon
Рет қаралды 21 М.
#152 STM32 Blue Pill - Is this a modern NANO replacement (✅)
28:14
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 11 МЛН
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
13:21
LGT8F328P - some facsimiles are more equal than others!
16:17
onecircuit
Рет қаралды 1,1 М.
Building an Electric Bike Without Electronics
13:50
Tom Stanton
Рет қаралды 587 М.
Китайский клон LGT8F328P MiniEVB (WAVGAT AVGA328P)
5:35
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,3 МЛН