Which 10 Cent Microcontroller is Right for You? Comparing the CH32V003 to the PY32F002A.

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

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

  • @AmauryJacquot
    @AmauryJacquot 6 หลายเดือนก่อน +132

    it's bitluni's fault... he took the whole stock for his CH32 mega cluster 🤣

    • @fullpower8382
      @fullpower8382 6 หลายเดือนก่อน +4

      Des isch dees

  • @toddbu-WK7L
    @toddbu-WK7L 6 หลายเดือนก่อน +39

    Another HUGE reason to be excited about RISC-V is the modular nature of the ISA. If you only want pieces of it then you can just take those pieces, which means that you don't have to implement **every** instruction available in the instruction set to be in compliance. This also means far fewer transistors, heat, power, etc. To the degree that I am able, I do everything in RISC-V now. I am tired of all of the x86 / ARM licensing shenanigans.

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +4

      Yeah, x86 in particular is a disaster. Do you think the piecemeal nature of RISC-V will have a negative impact on tool chain support though? It seems like there are already so many different combinations of instructions available

    • @ChrisSmith-tc4df
      @ChrisSmith-tc4df 6 หลายเดือนก่อน +4

      @@AllTradesZach I suspect that many a project will forget the compiler flags to enable optional ISA extensions and therefore not benefit from them anyway. 🤷🏻‍♂️

    • @sandeepreehal1018
      @sandeepreehal1018 6 หลายเดือนก่อน

      Yeah my professor taught our Machine Dependent Programming class primarily in Risc V and we only did a little x86 in the end, and I 100% prefer risc-v. The only thing I'd take from intel is the square brackets method to access memory, instead of having to do multiple adds, multiplies, etc to access the data, but thats about it.

    • @BruceHoult
      @BruceHoult 6 หลายเดือนก่อน +4

      ​@@AllTradesZach it's very easy for a compiler to use a hardware instruction if it is present (e.g. mul, div, clz) and use the compiler's built in software function if not. GCC and LLVM don't have any problems with the programmer telling them exactly what ISA options are available. If you're doing embedded work then you know exactly what chip you have and it's easy to inform the compiler (RV32EC in the case of the CH32V003). If you're doing application programming for Linux or similar then you don't know exactly what chip you'll be running on (many dozens of difference ones), but in this case there are "profiles" that the chips are built to which specify the minimum set of ISA extensions. These are called RVA20 (most chips now in the market, formerly called RV64GC), RVA22 (the first boards are just hitting the market now e.g. BPI-F3), RVA23 etc. Each one includes everything from the previous version.

  • @lohikarhu734
    @lohikarhu734 6 หลายเดือนก่อน +52

    I was responsible for developing "common hardware" ICs in a company doing 400 million devices per year, and it was very, very important to minimize external parts needed, optimize pcb layout, and optimize solution size, and optimize software development, with device cost one part of the overall equation...it's amazing how adding a couple of resistors or capacitors to a solution blows up board size, routing complexity, and cost, while ease-of-use in software development speeds up the development process, and may reduce software 'spins'...anyway, just to put an ! to youre discussion....oh, and we had embedded cores 14 years ago, to manage multiple I/O devices into virtual devices, and offload the cpu, and drastically reduce power consumption...

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +7

      Very true, touched on that a bit in the video as well. The nice thing about both these is that they require very little to run, just a couple capacitors and resistors. That's also why I'm using the QFN package on the Puya, to keep by boards small and cheap.

    • @charlesmanning2266
      @charlesmanning2266 6 หลายเดือนก่อน +3

      Certainly when you're doing large volumes then it is worth the extra effort to reduce BOM cost.
      However sometimes the numbers are not there to support the extra effort.

  • @greendragonmakerspace
    @greendragonmakerspace 6 หลายเดือนก่อน +44

    WCH is a large and reputable company started in 2004. Their chips (especially their USB chips) are in lots of mass-produced products. I've had their CH32v003 mcus in working boards for over a year now and still going strong. (not a shill, just a fanboy...)

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +8

      Fair enough, I didn't necessarily mean to imply that these were low quality or wouldn't last long. There are just some other companies that I have a long history using that I expect to be high quality, whereas I don't have enough experience with WCH or Puya to make that assessment. Plus, it speaks to the mentality of the engineer. If they used the cheapest microcontroller did they also use the cheapest capacitors, power converters, etc?

    •  6 หลายเดือนก่อน +4

      @@AllTradesZachis it it engineer mentality that dictates what the cost of production?

    • @plutonianfairy
      @plutonianfairy 6 หลายเดือนก่อน

      To a certain degree, yes I suppose 🤔

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +5

      That is interesting question, could get very philosophical. I'd say that it is an engineer's job to make the absolute best design within the given constraints, one of which is certainly cost. I think we all want to make the best product possible all the time, but it just isn't possible within the constraints and tradeoffs, and often times the better product is the one that reduces production cost.
      Of course, it is often not the engineer's mentality perse, but that of accounting or management that make the directive that the engineer has to follow. If you're told you only have $1 for the total cost of the BOM you have to trim the fat somewhere, so you might end up reducing the quality everywhere.
      But I also think that cost and quality often come down to the engineer's decisions without the help of accounting/management. I've worked with people who try to cheap out everywhere they can to "save the company money" (and because sorting by cost is easy when shopping for a component) as well as people who will try to do the absolute best thing regardless of cost or time. And of course plenty of people who just aren't experienced enough and make less than ideal decisions that make products less reliable and more complicated. I find myself in that latter group regularly but learn something each time.

    • @orbatos
      @orbatos 6 หลายเดือนก่อน +2

      It certainly can be. Until you hit truly massive production a couple cents difference isn't going to outweigh the selection made by engineering.

  • @mikeselectricstuff
    @mikeselectricstuff 6 หลายเดือนก่อน +22

    For production use, a benefit of the WCH is they make a really nice & very cheap standalone programmer, which can easily be integrated into a production test jig.

    • @ChrisGammell
      @ChrisGammell 6 หลายเดือนก่อน

      I dunno, I would really need to see some kind of review of this production test jig in order to know more about it...

    • @simontillson482
      @simontillson482 6 หลายเดือนก่อน +14

      @@ChrisGammell Why? By definition, every production test jig is unique and designed for the production in question. There is no such thing as a universal test jig. Their cheap, simple and available programmer just makes it easy to add it in to any test jig a company might need.

    • @mikeselectricstuff
      @mikeselectricstuff 6 หลายเดือนก่อน

      @@ChrisGammell th-cam.com/video/Qnt_43PZcyo/w-d-xo.html

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

    Man what a great Video - I wasnt even looking for any of those 2 Chips and got the Video recommended :D Still watched all the way through since I am an electronic Nerd and because the Video was so well made! You deserve way more than 2k Subs - and I am sure you will get plenty more :). Nice, informative and interesting Video! Well done!

  • @lohikarhu734
    @lohikarhu734 6 หลายเดือนก่อน +6

    Seems like a good 'real world' comparison, looked at from several perspectives. Hyvää

  • @mikeselectricstuff
    @mikeselectricstuff 6 หลายเดือนก่อน +17

    Re. HAL documentation - it rarely makes sense to use the HAL for the simple functions available on these MCUs as the code ends up bloated & slow. HALs only make sense for complex stuff like USB & networking.
    The way the WCH HAL does simple I/O is a real mess. Much better to just read the manual and set the registers to do exactly what you want

    • @nezbrun872
      @nezbrun872 6 หลายเดือนก่อน +3

      'Twas ever thus. We've all fallen into the vendor trap that pushes us to use an API or framework, and initially it seems like a Great Idea. However these APIs and frameworks tend to have the lifespan of a mayfly, and, furthermore, they don't absolve you from RTFM on the device datasheet.
      Unless you're looking for a USB or TCP/IP stack, write and maintain your own library of boilerplate code.

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +4

      Sure, the HAL can overcomplicate things, especially for just toggling an LED. I was trying to aim the examples more at beginners though where a "GPIO_Set" function is less intimidating than setting a register, bit masking, etc.
      I haven't dug into their I/O HAL driver really, I'll take a look and see what you're talking about.

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

      Isn’t there an alternative lightweight HAL-like thing to use? I just want to make code that’s more portable. Maybe it’s just a matter of adding a bunch of #ifndef clauses at the top of my programs, but that does feel tedious.
      Are there bitmask/bit names at least?

    • @mr_gerber
      @mr_gerber 6 หลายเดือนก่อน +2

      @@Scrogan ST does the LL version of their code, which is significantly simpler than the full on HAL.

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

    I’ve been curious about these little μcontrollers.
    But I have gotten very fond of Espressif’s idf, which I think I would miss a lot, especially the convenience of command line tools over guis.
    Maybe Espressif will at some point go into these simpler, smaller, cheaper μcontrollers?

  • @hugoboyce9648
    @hugoboyce9648 6 หลายเดือนก่อน +4

    Great video! Some additional info I would have liked to learn for these parts: How is the interrupt controller? A full NVIC or a single interrupt with the firmware having to manage everything? Or something in between? Also, the hardware multiplier situation, 1 or 32 cycles for the Arm? How about the RISC-V ? These things, depending on the application, can have a lot more impact on the performance than just the number of MHz.

    • @BruceHoult
      @BruceHoult 6 หลายเดือนก่อน +2

      The CH32V003 doesn't have multiply. WCH have recently announced some new parts (002, 004, 005, 006, 007) with multiply and more memory. I'm not sure how available they are juet yet, or the price.

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

      As for the interrupt controller, WCH uses a custom controller called PFIC (Programmable Fast Interrupt Controller), it is very similar to ARMs NVIC

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

    "students will now have an actual open source ISA to study..."
    ***STARES IN MIPS***

  • @norm1124
    @norm1124 4 วันที่ผ่านมา

    I didn't figure yet how to program the PY32. Any hints?

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

    Note that there is a PY32F002B part which has same die as the A version but the pinout fits the STM8S003 TSOP-20 part. This was quite useful after the shortages of ST parts.

    • @miltonlai4850
      @miltonlai4850 4 หลายเดือนก่อน

      002B is the ultra low power version, deep sleep mode current is less than 1uA

  • @MariusHeier1
    @MariusHeier1 4 หลายเดือนก่อน

    Super great video. High quality review!! 🎉❤

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

    I'm interested in using PY32 chips for some projects, but I would prefer USB support. Yes, I could just use a USB to serial adapter, but for the sake of simplicity, it would be nice to have it on the MCU. There's a bitbanging, low speed USB project for ARM M0+ called grainuum that looks interesting, but it was developed with and for chips running at 48 MHz. The developer stated that it could be adapted for work at 24 MHz. I'm just curious if anyone has gotten it to work on a PY32.

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

      All PY32F0 chips can run at 48MHz(or above), event the low end PY32F002A and PY32F002B

  • @thexht7927
    @thexht7927 2 หลายเดือนก่อน

    The OPA module is something very useful for me because an opamp can easily cost extra 10cents extra (usually 40 cents). And the DMA is very useful when I control many RGB LED via SPI. Without DMA I can easily get flickering if timer is also being used

  • @truectl
    @truectl 6 หลายเดือนก่อน +7

    The PY32F0xxA series internally are all PY32F030. This means you should be able to use the additional peripherals, 4K of RAM and 32K of Flash, as well as the PLL for faster clock (potentially anyway). Of course this isn’t datasheet spec, but all I have used in projects work fine with DMA and additional flash and RAM. YMMV.

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +6

      I did mention this briefly in the video. I chose to stick with what the datasheet says for this video, but if you do "unlock" the PY32 then it wins pretty much across the board. It's just not guaranteed that it will always be the case, there is a chance that they're packaging lesser performing chips as the -002s and better ones as the -030s. It's just as likely that they're exactly the same though...

    • @truectl
      @truectl 6 หลายเดือนก่อน +3

      @@AllTradesZach While undocumented features of the main core not guaranteed, it’s highly unlikely to change. This core is quite small, this is an embedded part, there is no lockout implemented in hardware, and there is large NRE to try to segment this. Maybe that’s what the PY32F002B is supposed to be.
      Look at STM32F103x8 for example. Per DS spec they have 64K flash but for over a decade they’ve been usable with 128K. Order the larger part if you need guarantees, go with the cheaper one if failure is acceptable. And even then, failure rate I have heard in the industry doing this for this specific part is very low. Fakes entering the chain is way more of a factor than using Flash that wasn’t specified for the part in the DS.
      For hobby or small scale noncritical (life safety, systems automation, etc) tasks using these features is fine. I’ll use undoc stuff particularly when I am not working to the margins of absolute specs but I ship mostly non-critical stuff at unit qty 1000 or less.
      Another small factor is pinout. The 002A has different pinouts available which may aide in trace routing. Though one probably wouldn’t specify a part this cheap based on that, lol.

  • @spehropefhany
    @spehropefhany 6 หลายเดือนก่อน +2

    Thanks. It would be interesting to compare code densities between the cores, but that would require some effort to do right, probably require compiling a relatively large program without using a lot of HAL stuff.

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

      That would be interesting, but a fairly in depth project. I also think that exactly what you chose to do with the code could make a difference, which is why there are so many different standards for benchmarking microcontroller cores.

    • @ChrisSmith-tc4df
      @ChrisSmith-tc4df 6 หลายเดือนก่อน

      I suspect that the RISC-V will have a slightly lower code density due to the spartan nature of its ISA. But being both RISC, I suspect that they’d be close.

    • @spehropefhany
      @spehropefhany 6 หลายเดือนก่อน

      @@ChrisSmith-tc4df That would have been my guess, but a web search came up with a claim that RISC-V was about 10% better .

    • @BruceHoult
      @BruceHoult 3 หลายเดือนก่อน

      @@ChrisSmith-tc4df Basic RV32IC (or RV32EC in the WCH) has a little lower code density than ARMv7 (Thumb2) used in the Cortex M3/M4/M7, but don't forget that the M0 has the older/cut down Thumb 1 / ARMv6-M which essentially only has the 2-byte opcodes and full access to only the first 8 registers. The WCH has only 16 registers vs 32 for the more common RV32I, which can cause more register spills to stack than in full RV32I (but similar to 32 bit Arm), but it has both 2-byte and 4-byte instructions and the 4 byte instructions have full access to all registers. I think it will be pretty close between these two chips. Note that the "Hazard3" RISC-V core in the new Pi Pico 2 is not only full RV32IMAC but also has some newer ISA extensions that can cut code size quite a lot, including Zba for array addressing ("shift and add" instructions), Zbb with some additional boolean operations and clz/popcount, and also the very new Zcmp which is specific for microcontrollers and adds things such as push-multiple, pop-multiple-and-return, and instructions to copy the first two argument registers (a0, a1) to or from a pair of callee-save registers (which speeds up function prologs and also putting arguments in place for other function calls). With these extensions in place RISC-V code is denser than Arm Cortex M. In 64 bit, RISC-V was significantly denser than amd64 or arm64 right from the outset, even without the more recent extensions. Recent versions of standard upstream gcc and clang have support to automatically use all these extensions if you include them in the -march argument to the compiler (e.g. in CFLAGS in your makefile).

  • @RobertLugg
    @RobertLugg 6 หลายเดือนก่อน

    At around 6:30 of your video I finally realize the potential of RISCV. To me it is the ability to add a processor to devices that couldn't justify one but would still benefit from one

    • @BruceHoult
      @BruceHoult 6 หลายเดือนก่อน

      Yes, and it can be REALLY tiny (and slow) but still run C/C++ code compiled by GCC/LLVM. e.g. the SeRV is is bit-serial RV32I CPU that takes 32 cycles for most instructions (64 for shifts and branches) but runs at hundreds of MHz in an FPGA (GHz+ in ASIC easily) and uses only 125 LUT6s and 164 FF in an Artix-7 FPGA (198 LUT4 on iCE40). Plus some BRAM for registers, RAM, whatever your program code uses. e.g. the ICE40UP3K FPGA costs about $7 and has 2800 LUTs.

  • @FriendlyIntentions
    @FriendlyIntentions 6 หลายเดือนก่อน +4

    You kinda went the wrong way about with thee WCH ch32v003. You need to do VIA Platformio with the Arduino core by CNLohr, you even get USB on the chip and a boatload of other stuff

  • @Clark-Mills
    @Clark-Mills 6 หลายเดือนก่อน +4

    Jumping onto RISC-V early will be a PITA for now but the sooner we transition the sooner adoption / mass-production ramps up.
    Same thing with Linux in the early days...

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

      Early was 2016 (th-cam.com/video/0eDS6pGYsCE/w-d-xo.html 32 bit FE310 microcontroller with 16k RAM). Now RISC-V already has a huge presence in embedded products -- not as large existing design base as Arm, but apparently more new design wins each year.

  • @BangkokBubonaglia
    @BangkokBubonaglia 6 หลายเดือนก่อน

    I just shipped off a project to JLCPCB. Chose the PY32 exactly because of the availability of the part. The CH32 is not available AT ALL for assembly through JLC. Py32 is available in a half a dozen different configurations. If you are designing your own boards, it is just too dangerous to rely on the CH32. There is no guarantee you are going to be able to get stock.

  • @ПавелКучер-е8м
    @ПавелКучер-е8м 6 หลายเดือนก่อน

    It would be good to add some examples of how you connected controllers, flashed, laid out boards. Could you tell us anything about IDE peculiarities? You said there are no simple examples, can you share what you have done? Maybe some starting guide on CH32V003? Do you have a Git?

  • @st3ddyman
    @st3ddyman 6 หลายเดือนก่อน

    Isn't the M0 core faster than the RISCV though? If you did something like calculating primers or similar maths functions to check raw performance.

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

      Yeah, that's a good point, just looking at clock speed doesn't tell the whole picture. The QingKe core does have hardware multiplication (but not division) and the M0+ also uses a RISC instruction set, so I'm not sure how different they would be. It would be cool to write a few sample codes doing various tasks and get some real benchmarking in.

    • @jecelassumpcaojr890
      @jecelassumpcaojr890 5 หลายเดือนก่อน

      A simple RISC-V and ARM M0 should have very similar performance at the same clock speed. An ARM advantage is more complex load/store address modes and being able to combine shifts with other instructions, though that is for the 32 bit instructions that the M0 doesn't implement. For the M0+ in particular they have a pseudo two stage pipeline and so wastes fewer clocks on jumps.

  • @yeroca
    @yeroca 6 หลายเดือนก่อน +3

    In your comparison, you didn't mention power consumption. I would assume that the 48MHz processor consumes roughly twice what the 24MHz processor does.
    Also is it a fixed clock rate? i.e. can I slow it down to reduce power?

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

      You can clock them down to 8MHz off the internal RC oscillator and 4MHz from an external crystal and they also have low power modes from a 128kHz internal oscillator.

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

      @@greendragonmakerspace Interesting, thanks!

    • @greendragonmakerspace
      @greendragonmakerspace 6 หลายเดือนก่อน +2

      @@yeroca I believe the power draw is a bit more than an attiny @AllTradesZach this might be an argument for the more expensive mcus for power critical applications

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +5

      Yeah, sorry, I glossed over power. The video was getting too long and as @greendragonmakerspace says neither of these would be my first choice for low power applications. I believe they're both made on fairly large processes (hence being able to operate at 5V) which is a detriment for power consumption.
      It's also true that they both have clock dividers and low speed internal oscillators, as well as external clock options, so they can go slower to save power. I don't necessarily think that datasheets are useful when it comes to power consumption numbers (because I've seen them lie and they tend to use very specific operating conditions which may or may not match reality). I didn't get the chance to actually measure power consumption, so I didn't say anything.
      Both chips have sleep and stop/standby modes, the latter of which really decreases power consumption but takes time to wake from. A common approach for reducing power is to turn on, do what you need to do as fast as possible, then go to sleep for as long as possible. You can use a real-time-clock to generate the wakeup signal, which neither of these have (the PY32 actually does have it, since it is the same die as the PY32F030, but it's not a listed feature on the -002) or an external signal. The PY32 does have a low power timer which I believe is designed for this sort of thing though. The PY32 also appears to have better power consumption per the datasheets, but I'd want to test that side by side with the same code on both devices. The PY32 datasheet says on the order of 6uA in stop mode with the low power timer running. So I think the PY32 is the better option for low power battery devices, but I don't have hands on experience with this aspect of either of them.

    • @yeroca
      @yeroca 6 หลายเดือนก่อน

      @@AllTradesZach Thanks for the detailed response! Using the exact same code for comparison isn't really possible due to the different ISA's, but the same source code makes sense.
      Stuff I tend to work on these days tends to be on the low power end of the spectrum, so for me it's important.
      Keep up the great work!

  • @VandalIO
    @VandalIO 6 หลายเดือนก่อน

    Which one supports floating point

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

      They don't have FPU. used floating point, will be slow.

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

    i bought the same bundle and i think the ch32v203 is the real deal if the prices keep low, just different applications

  • @andrewfraser2760
    @andrewfraser2760 6 หลายเดือนก่อน

    Very informative - thanks 👍

  • @ianlee6416
    @ianlee6416 5 หลายเดือนก่อน

    If you're using these for any US-based industrial project, you may want to check if any of these chips are cleared for industrial use.

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

    I've used a some WCH parts for some experiments.
    Nice and cheap and fast, yes... Not much SW reference material though.
    Documentation is poor relative to STM32 etc.

  • @YoutubeBorkedMyOldHandle_why
    @YoutubeBorkedMyOldHandle_why 6 หลายเดือนก่อน +3

    Thank you ... great video. So ... actually, this is the first time I've even heard about the PY32F002As. I guess I never watched your previous video ... sorry about that! They look interesting though.
    I was super impressed with the WCH chips when I first heard about them:
    First, because I've used the CH340 chips a lot, which are really useful, so WCH seems like a reputable company.
    Second, yes, I really do care about Risc-V. I don't necessarily see it as better than ARM, but it is an open source alternative, which I do think will become a lot more common in the near future. Possibly unintended, but the US trade war with China is driving the Chinese to find alternatives, and Risc-V is clearly on the list. So it's a curiosity, and one of my curiosities was programming in Risc-V assembly, which I'm happy to say works just fine on these boards.
    Third, they are cheap. And by cheap, I mean not just the chips, but also the dev boards, and the hardware debugger which only costs a few bucks. Compare this to the Atmel debuggers for example, which cost hundreds of dollars.
    Fourth, the ecosystem. Microcontrollers, regardless of cost, are useless unless you have a properly configured toolchain and easy access to documentation and examples. And I have to say, that for a Chinese company, WCH has gone out of its way to make this pretty darned easy for us English speaking hobbyists. There is better, but right out of the box, I was easily able to get things up and running. This is important and naturally leads to lots of 'word of mouth' community support (Arduino for example.) I suspect that your major criticism (poor availability), is precisely because everyone is buying these chips. So, I actually see this as a positive.
    I bought a bunch of CH32V003 and also CH32V203 boards and chips. My first project was to design my own development boards for both chips. Basically, my boards are the same as theirs, except I added a PMOD to the end of each board, so the debugger plugs directly into it (no messy wires etc.) I had no issues doing this and the boards work fine.
    WCH also has a line of 8 bit microcontrollers (CH551/552 etc,) based on the E8051 architecture, which are quite interesting. These are quite cheap, are supported in Keil, and also with open source software. I understand that they support HID, so you could use them to emulate a keyboard etc. I bought some of these too, though I've yet to do anything with them.
    Based on your assessment, perhaps I'll pick up some of the PY32F002A chips next time I place an order with LCSC, but I'm not in a big rush.

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +2

      I agree with many of your points. The documentation in English is very nice. I've looked at some of the other WCH chips as well but haven't had the chance to play with them.
      If you do check out the PY32F002A look up how to run it as a PY32F030. Solves most of its limitations. I've been meaning to make some development boards that do this for my personal use, super small like 1cm square. Perhaps the topic of another video.

  • @eCMastermind
    @eCMastermind 6 หลายเดือนก่อน

    Thanks 👍

  • @SomeRandomDudeNamedDan
    @SomeRandomDudeNamedDan 3 วันที่ผ่านมา

    That ch chip sounds remarkably like the one on Arduino uno r4

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

    you're less confortable ordering from ali? Why? I have ordered there for many years and always received absolutely perfect products. Never had any issues with components.

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

      A lot of it is the buying experience, varied shipping times (sometimes I forget I've even ordered something when it arrives), the multitudes of different vendors with questionable reviews, the risk of counterfeit parts (probably not an issue here), poor searching, not being a one stop shop (still need an lcsc or digikey order), etc. If they have what I need and I'm pretty sure I know what I'll get I'll order from AliExpress, but it's not my preference

    • @lucasmontec
      @lucasmontec 6 หลายเดือนก่อน

      @@AllTradesZach do you have an alternative international source for parts? Or do you go for a local retailer? I go for AliExpress because Brazil had absolutely zero good retailers, it's all just drop shipping and mostly from Alibaba, so I just go directly to the source and spend the time to find the stuff myself.

    • @ChrisSmith-tc4df
      @ChrisSmith-tc4df 6 หลายเดือนก่อน

      @@AllTradesZachI’ve had mixed experiences on AliExpress. Some vendors are on point, while another shipped me FeRAM’s half of which ended up being well-used pulls with some being EOL with stuck/sticky bits. They fought me tooth and nail, and I ended up with half of the chips that I ordered at twice the price.

    • @negvorsa
      @negvorsa 6 หลายเดือนก่อน

      And I live in the moon!

    • @BruceHoult
      @BruceHoult 3 หลายเดือนก่อน

      @@AllTradesZach Aliexpress is exactly the same as Amazon. Both provide a store-front to thousands of individual vendors. Your experience depends on the vendor, but if you're buying from e.g. the WCH official store then no worries, mate. Sure, if you search by a part name and then pick the cheapest vendor then you never know what will happen.

  • @elsayedayman7003
    @elsayedayman7003 6 หลายเดือนก่อน

    simple and easy thanks

  • @denizcancgsar2810
    @denizcancgsar2810 4 วันที่ผ่านมา

    When they said Arm takes license fee, and RISC-V is the future, I thought it was a big chunk of the price that manufacturer advertises. When I learned that it is 1%-2%, the argument about RISC-V being free seemed meaningless. RISC-V is very nice for FPGA's but for price.

  • @VandalIO
    @VandalIO 6 หลายเดือนก่อน

    Which one can run Linux ?

  • @ThylineTheGay
    @ThylineTheGay 5 วันที่ผ่านมา

    i wish it were as easy to get custom silicon as a custom PCB
    all it would take is maskless lithography technology to get good enough to do relatively modern process sizes

  • @thomasesr
    @thomasesr 6 หลายเดือนก่อน

    What about the 3 cent Padauk microcontroller?

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

      one time programmable

    • @No-mq5lw
      @No-mq5lw 6 หลายเดือนก่อน +5

      That lives in a completely different class than these as it's a closed source 8 bit mcu

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

      OTP so you'll burn a lot of them while developing your program (there is a much more expensive flash version). Awful PIC instruction set that is a horror for human programmers and almost impossible for standard C. Also only 64 bytes of RAM (vs 2048 or 3072 here) and 1000 instructions of program space vs 5000-10000 instructions on the WCH and Puya. And you need 3 or 4 instructions on the Padauk to do what one instruction does on Arm or RISC-V -- not even counting 8 bit vs 32 bit. Both Arm and RISC-V are compiler-friendly.

  • @mehmetkendi6067
    @mehmetkendi6067 6 หลายเดือนก่อน

    Thank you!

  • @charlesmanning2266
    @charlesmanning2266 6 หลายเดือนก่อน +3

    10 cents is the onesy,twosy price. If you were designing 10k units it would be closer to 5 cents.

  • @mattklapman
    @mattklapman 6 หลายเดือนก่อน

    Interesting how Microchip is not mentioned in the list of popular vendors. After the Atmel acquisition and the chip shortage, they mostly fell off the hobbyist's radar.

    • @ianlee6416
      @ianlee6416 5 หลายเดือนก่อน

      the PIC line is too expensive for hobbyist, the programmer alone is already an entry barrier. the AT line does still get love for the 328p and tiny85/88 but for a similar or lower price you can get stuff from Stmicro at much better specs or Espessif. But I really dislike the esp32 wroom. Industrial use PIC is still quite popular, especially at companies with older lead engineers.

  • @christopherguy1217
    @christopherguy1217 6 หลายเดือนก่อน

    I'd much rather have complex examples than just simple ones. It's in the complex examples you can get a better understanding.

  • @perceptron-1
    @perceptron-1 6 หลายเดือนก่อน +1

    Hi! I've known the CH32 for years, and I haven't looked for anything cheaper since then. It's good to know how it is
    PY32, this is the first I'm hearing from you. Thanks. I plan to build a supercomputer with these chips.
    40 years ago I built a supercomputer with 512 68000 CPUs, since then I have been waiting for processors to become cheaper,
    this seems to be happening now. Now the whole machine will be cheaper than 1 CPU then.

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +2

      No doubt, especially if you use either of these chips! You might even take a look at some of the higher end parts in these product lines as they might offer more performance for the dollar. I'd also check out the rp2040, although bear in mind that it needs a separate flash chip.

    • @perceptron-1
      @perceptron-1 6 หลายเดือนก่อน

      @@AllTradesZach I bought the RP2040 as soon as it came out, but it's too expensive for me for this project, even though it's very well priced and well worth it.
      I am building a supercomputer with 1 million processors and allocating only 1BTC to it.
      I'm looking for unencapsulated chips to be as cheap as possible, because I can solve the bundling, directly to the PCB.
      16 x 16 chips on 2 sides, the 512 on a mini panel, and 2 x 32 x 32 of these are the cluster. I don't need a CPU that knows a lot, but a lot of parts that are cheap, that's the point. I cannot model this with software, because I want real-time hardware operation.
      It is needed for a neural network model, but I think this is not surprising.

    • @TheStuartstardust
      @TheStuartstardust 6 หลายเดือนก่อน

      @perceptron-1 any details on the usage of such a setup? I'm intrigued! 🤓

    • @JimMaz
      @JimMaz 6 หลายเดือนก่อน

      It's for world domination.

    • @perceptron-1
      @perceptron-1 6 หลายเดือนก่อน

      @@JimMaz Yes, in 1-2-bit LLM weight matrix calculation and energy consumption minimization and real hardware parallelism.

  • @TheNamelessOne12357
    @TheNamelessOne12357 6 หลายเดือนก่อน +2

    These chips might not just suddenly disapear from market, but can be suddenly changed. No notice from manufacturer, no errata, just sudden different behaviour. Might be OK for such simple MCU, but requres extensive testing for mass production, which costs.

    • @orbatos
      @orbatos 6 หลายเดือนก่อน

      Really good point, and low stock means hitting the end of the last full scale production order. What happens to fill the next run could be a major modification, the same chip, or something completely different.

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

    Microcontroller-style core on an FPGA is not an acedemic exercise. Once you have an FPGA in a project, for whatever hard reason, it has a tendency to just absorb everything possible into itself, because why not. Unless you need an adventurous bootstrapping setup (say you want the FPGA configuration to come from the net, from USB/SD-Card etc, which requires an external microcontroller), but you still need to do classic software tasks such as UI and sequencing algorithmically complex tasks, using a synthesized processor core in your FPGA just makes sense.

    • @AllTradesZach
      @AllTradesZach  5 หลายเดือนก่อน

      Fair enough, I'm just coming from my experience where I usually have a dedicated processor/microcontroller (either discrete or in a SoC) or just a processor and no FPGA. I've only ever implemented a soft processor academically, but I'm probably too quick to dismiss their usefulness.

  • @keiyano
    @keiyano 2 หลายเดือนก่อน

    theres nothing wrong with a ch32 being in a product. it is a 32 bit soc. I rather see a chip i can reuse or replace than one that has no vendor or highly propiertary. I have seen wch chips in products already.
    Another reason i like wch chips is because they dont need external components for them to work. The external osc is optional and you can literally use it without any other support components if using a 3.3v or 5v supply

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

    Automatic subscribe just because of your channel's name

  • @BastetFurry
    @BastetFurry 6 หลายเดือนก่อน +3

    Just my two cents, but if i don't have special needs and build a one-off, nowdays i will always choose a RP2040. I can get a knock-off board for ~2€ on AE, RPi Foundations documentation and SDK are sublime and there is no special hardware needed to program one. Even debugging, just use a second RP2040 board and upload the official debug tool to it.
    This is a ecosystem every other vendor should grab a page off.

  • @the_real_glabnurb
    @the_real_glabnurb 6 หลายเดือนก่อน +3

    LCSC's stock is garbage.
    Even if they have limited or no stock of a part there could be plenty of supply of it.
    I recently ran into this problem when I wanted to use jlcpcb's online tool for parts supply & PCBA of a few thousand PCBs, because they are really cheap.
    But alas there was simply not enough stock of really common parts of chinese manufacturers (cmps, ICs, connectors) I needed.
    So I ordered at my usual chinese PCBA house and all parts could be immediately sourced, no problems!

    • @TheStuartstardust
      @TheStuartstardust 6 หลายเดือนก่อน +3

      "my usual pcba" which is?

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

      ​@@TheStuartstardustalso interested in this

  • @wernerviehhauser94
    @wernerviehhauser94 6 หลายเดือนก่อน +2

    If you only have 10ct, electronics is not the right hobby for you :-)

    • @Zakaria_122
      @Zakaria_122 4 หลายเดือนก่อน

      if you are a really passionate hobbyist, you may even be able to get free parts from electrical waste

    • @wernerviehhauser94
      @wernerviehhauser94 4 หลายเดือนก่อน

      @@Zakaria_122 pretty impossible in Germany since basically everything goes to recycling by law. We can't do dumpster dives and pull out a PDP-11 or any other useful stuff. Otoh - if I spend the time I would need for desoldering, sorting and testing doing paid work, I'd pretty likely be able to buy the stuff I need new.

  • @sebek23b
    @sebek23b 6 หลายเดือนก่อน

    Before pandemic or more precisely before inflation/war and chip shortage stm8 were pretty cheap I mean 1-2$ cheap, and if you don't care about IDE and compiler it's not that bad. Yes it's not 10c but they are pretty capable.

    • @SianaGearz
      @SianaGearz 5 หลายเดือนก่อน

      They could be had for 20 cents back in the day. People were using them as smart IO expanders.

  • @colly6022
    @colly6022 6 หลายเดือนก่อน +2

    wtf RISC-V is already like 10 cents per chip?? i remember when these chips were insanely expensive.

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

      It’s got the specs of an 8-bit AVR, the V203 is more like a proper 32-bit STM32 in specs.

    • @SianaGearz
      @SianaGearz 5 หลายเดือนก่อน

      Insanely expensive... is a stretch. The first RISC-V microcontrollers that i remember were GigaDevice's GD32V, about 5 years ago now, and they made those similarly priced or cheaper than their GD32 ARM Cortex devices of comparable spec. And those were in turn already inexpensive, being intended to undercut STM32 with same pinouts and similar peripherals.

    • @BramStolk
      @BramStolk 5 หลายเดือนก่อน

      @@SianaGearz maybe the parent commenter was thinking for RISC workstations of the 1990s, which cost tens of thousands of dollars per machine.

  • @MarcosAntonioBustos
    @MarcosAntonioBustos 6 หลายเดือนก่อน

    Yo e creado mi propia computadora androide autónoma total , posee red propia , esta buena porque depende de si misma tanto red como harware , sotfware y nabegador automata androide

  • @TheEvertw
    @TheEvertw 6 หลายเดือนก่อน +2

    While the Open Source nature of RISC-V is great, I am very worried that only China is currently supplying them. Knowing that China is openly hostile to the western way of life, I will not contribute to the development of their high-tech industry. It is highly likely that these parts are supplied under cost-price with the long-term goal of disrupting regular companies and gaining a monopoly on the extreme low-price market. Which will NOT be good for western consumers.
    But then... OpenPuya also seems to be a Chinese company.

    • @兼明-p2b
      @兼明-p2b 6 หลายเดือนก่อน

      As a Chinese, I think Westerners are very arrogant and ordinary Westerners have been seriously brainwashed by Western media.

    • @TheEvertw
      @TheEvertw 6 หลายเดือนก่อน +2

      @@qqconsoleqqclient7749 I have no problem with the Chinese people, but with the Chinese government.

    • @orbatos
      @orbatos 6 หลายเดือนก่อน

      ​@@qqconsoleqqclient7749We understand just fine, and aren't going to blame you for the actions of politicians. Regarding the production of chips, this is an obvious logistical concern, don't get offended so easily.

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

      Without China, there would be no room for electronics hobbyists

    • @orbatos
      @orbatos 4 หลายเดือนก่อน

      @@Zakaria_122 nobody's talking about that aspect

  • @兼明-p2b
    @兼明-p2b 6 หลายเดือนก่อน

    air001 = py32f002a

  • @anon_y_mousse
    @anon_y_mousse 6 หลายเดือนก่อน

    The day when an enthusiast can just print a chip is fast approaching and I love it. You're right about using a high level language making the underlying hardware matter less, but if I ever have to implement my own compiler for that piece of hardware I'd rather have a CISC chip than either of these options and as I said, such a day is not far off.

    • @BruceHoult
      @BruceHoult 3 หลายเดือนก่อน

      That's part of the beauty of RISC-V. You can legally make your own chip or core using it (sell them if you want) and just use the standard compilers, not have to write your own. But, as a compiler writer myself, I'd rather do it for RISC than CISC -- you might need more instructions but they are smaller instructions and you can mix and match them arbitrarily, which you can't do with instructions and addressing modes on any CISC, not even VAX. On CISC you are constantly having to worry about whether some complex address calculation can be represented in an addressing mode or not, and if not then what is the best way to break it down using e.g. LEA, and whether you want to save intermediate values for reuse a few instructions later. With RISC (especially RISC-V or MIPS) it is clear and simple and all intermediate values are in registers if you want to reuse them.

    • @BruceHoult
      @BruceHoult 3 หลายเดือนก่อน

      @@anon_y_mousse I'm sorry mate, but I'm a compiler engineer (and have also helped design ISAs) while you don't know what you're talking about -- you don't even know, for example, what an "addressing mode" is, which means you're not even an assembly language programmer, let alone know anything about writing compilers. So I reiterate what I wrote before, and rest my case. I'm only replying so anyone who comes across this won't be confused by you. I suggest you do some more study, and learn assembly language programming -- either Arm or RISC-V would be good.

    • @BruceHoult
      @BruceHoult 3 หลายเดือนก่อน

      @@anon_y_mousse that's quite amusing how obsessed you're getting. Much of what I've worked on is proprietary and as I'm not currently looking for work I don't have a reason to update LinkedIn. But do have fun.

    • @anon_y_mousse
      @anon_y_mousse 2 หลายเดือนก่อน

      @@BruceHoult Right, so you're a poser. You can list proprietary stuff on your resume, yet you don't, and what you do list probably isn't even true. I still haven't found any code written by you, not even a toy language. If you're such an ardent compiler engineer, where's *anything* that you've actually written?

    • @BruceHoult
      @BruceHoult 2 หลายเดือนก่อน

      @@anon_y_mousse shhhh, don't tell everyone! Lol.

  • @ntal5859
    @ntal5859 6 หลายเดือนก่อน +2

    I just asked Claude ai to show me ch32 timer code .. it wrote example in 2 seconds.. reading manuals is so yesterday.

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

      did it run tho

  • @edwardfletcher7790
    @edwardfletcher7790 6 หลายเดือนก่อน +3

    Any Microcontroller in a BGA format is a no go for most hobbyists. It's a terrible design for non machine assembly.
    I'm totally ignoring anything to do with performance and SW support.

    • @laurensweyn
      @laurensweyn 6 หลายเดือนก่อน +4

      If you care enough about costs in a hobby project that you need a 10 cent part, you're probably planning something at scale, in which case getting a hot plate and solder stencil setup will save you a lot of time and cost in the long run if you need to make a lot of something, or something very small

    • @backgammonbacon
      @backgammonbacon 6 หลายเดือนก่อน +3

      You can get the whole board including SMD manufactured for peanuts now no idea why you would do it yourself when its so cheap to outsource small production runs. For single projects Zach told you to use the mainstream dev boards I would suggest watching the whole video before posting not just up to the first thing you disagree with.

    • @AllTradesZach
      @AllTradesZach  6 หลายเดือนก่อน +7

      Neither of these parts even offer BGA options. The Puya shown in the picture is a QFN part which isn't all that hard to solder by hand.

    • @dovregubben78
      @dovregubben78 6 หลายเดือนก่อน +2

      Both of these product lines are available in tssop and qtfp variants as well, at similar price points.

    • @gaborm4767
      @gaborm4767 6 หลายเดือนก่อน

      DIP and THT for hobbyist!