EEVblog 1524 - The 10 CENT RISC V Processor! CH32V003

2024 ж. 22 Мам.
300 096 Рет қаралды

Checking out the new 10 cent WCH CH32V003 48MHz RISC V processor demo board and the MounRiver Eclipse IDE. Getting to blinky.
The CH32V003 is a pin-for-pin alternative to the STM8S003 at 1/3rd the price, with more features.
If you find my videos useful you may consider supporting the EEVblog on Patreon: / eevblog
www.wch-ic.com/products/CH32V0...
www.wch-ic.com/products/catego...
www.tindie.com/products/adz11...
www.mounriver.com/download
3 cent Padauk Microcontroller:
• EEVblog #1132 - The 3 ...
Padauk Playlist:
00:00 - WCH CH32V003 RISC V Processor
02:01 - CH32V003F4P6 Eval board
03:00 - Pin-for-pin replacement for the ST STM8S003
04:30 - Datasheet and reference manual
05:24 - MounRiver Eclipse IDE
07:13 - It just worked
10:58 - Open Source GNU RISC V Cross Compiler
11:38 - Download and flash a LED, maybe...
13:51 - Save the file first, dummy.
15:26 - All the includes and headers
17:37 - But can you buy them?
18:11 - How fast can the pin toggle?
Forum: www.eevblog.com/forum/blog/ee...
Web Site: www.eevblog.com
Other channels:
EEVblog2: / eevblog2
EEVdiscover: / eevdiscover
T-Shirts: teespring.com/stores/eevblog
#ElectronicsCreators #riscv #microcontroller

Пікірлер
  • Thirty plus years of software development taught me that Ctrl-S is your friend.

    @cidercreekranch@cidercreekranch Жыл бұрын
    • I have it mapped to a button on my mouse. Hit it constantly

      @Ataraxia_Atom@Ataraxia_Atom Жыл бұрын
    • Until your jerk practical joker friend installs a keyboard mapping on your PC and maps ctrl-S to DEL... 😬

      @wizrom3046@wizrom3046 Жыл бұрын
    • Unless you're using Vim

      @cbtillery135@cbtillery135 Жыл бұрын
    • $ CTRL-z; bg; $ jobs

      @ki4dbk@ki4dbk Жыл бұрын
    • That's why I just use Intelij I am sooo spoiled

      @matrixmodexp@matrixmodexp Жыл бұрын
  • An introduction to RISC-V assembly with Dave trying to toggle a pin as fast as possible would be fantastic!

    @arnauddurand127@arnauddurand127 Жыл бұрын
    • That would be interesting

      @EEVblog@EEVblog Жыл бұрын
    • I would love to see that, too!

      @Klemmi.@Klemmi. Жыл бұрын
    • I would love to see that too !

      @Thomas72B@Thomas72B Жыл бұрын
    • @@EEVblog Make it so !..............(Pls)

      @andymouse@andymouse Жыл бұрын
    • On some microcontrollers you just have to write to one 8-bit wide right to an address to toggle a bit in a register. Such as in PIC32 or in STM32. The code becomes something like loop: st r0,toggleaddr; jmp loop with a few load immediates and stores before to enable the port, map it to pins and then setup the port ddr. Oh and a little bit of fiddling with clock registers beforehand too, to select the clock source and turn off dividers etc. Nothing too involved, all you need is load register immed, store register mem and jump unconditionally. If you don't have the toggle location built in the hardware, you need to do a little bit more. Maybe there are bit manipulation instructions, maybe you're going to have to keep the toggle value in a register and use a xor instruction. However it is, you don't need to know very much about RISC-V architecture, or any other architecture to do this yourself. Probably the instruction summary is enough. And really it's more of a question what amenities there are in the hardware of that microcontroller than the instruction set of whatever core.

      @statinskill@statinskill Жыл бұрын
  • This reminds me of the early days of STM8, ESP8266 and a few others Community making better HALs, figuring out all of the little quarks, even making better compilers, i very much live for this

    @OneBiOzZ@OneBiOzZ Жыл бұрын
    • What is stm8 community HAL? Never heard. Arduino? Haha. I program stm8 from 2012. In that time stm8/stm32 programmers used only registers and never used SPL and and not accepted ST HAL monster at all. I still use programming on registers ever with stm32. It is more easy for me to open pdf uc manual to see registers that I don't still know and to write what I need. Instead of to understand some HAL with huge overhead of size and and function calls (prepare call stack, jump, take apart call stack and so on instead of one uc command :))). And I have fast and size efficient firmware )). Now playing with HC32V. Some copy of stm32 (who doubted?) same registers just renamed and stm32 SPL. You can take 10 years old info about stm32f103 and SPL and you are HC32V programmer what you see in this video. It is stm32 SPL in this video. Same toolchain gcc (just riscv version) and openocd. Nothing new and interesting to discuss.

      @dekus80@dekus80 Жыл бұрын
    • What are some of their quirks? Also real curious about the community made compilers

      @anonymouseniller6688@anonymouseniller6688 Жыл бұрын
    • @@anonymouseniller6688 Most likely we are talking about SDCC?

      @Stifling_Musketeer@Stifling_Musketeer Жыл бұрын
    • I just don't get what the "excitement" is about with this. I DO understand why chip makers want to use RISC V, that's obvious, since it's "free" (open-source) IP. They neither have to develop it themselves, nor license it from someone who did. But why excitement from end users? There shouldn't be. It's just ppl like this guy in the video, who seems to be an excitable type (easily gets excited about ANYTHING). END USERS are f__ed, because they now have to find a way to program it, and figure out all the little quirks. Wow, another new IDE?! Oh, boy, can't wait. I "get" to learn a whole new IDE.... And buy (separately) a "programmer / debugger" that isn't, no it's just a USB to serial converter. No debugger. So this "exciting" new uC can do what? Uh, well, it can blink a single LED. So what? Can it run a FreeRTOS? Doubtful, and who wants to put all the time & work into that for a quirky little uC? Not me. I'll stick with an "expensive" ESP32 or something that has many uses, it's well-documented, fast, has lots of onboard peripherals, and has LOTS of uses for actual things besides blinking one LED. When I develop something for a uC I want it to be functional, flexible, and esp do more than one thing. (Ok, I know that's not fair, it can prolly do more, but we'll have to wait to find out. Someone else will have to figure it all out after uncovering all the quirkies. I know.)

      @jeffro.@jeffro.3 ай бұрын
    • @@jeffro. good for you i guess. not every project needs Wifi, bluetooth or huge amounts of peripherals. If it did, these cheap and small MCUs would not even exist.

      @davidpodeszwa7010@davidpodeszwa70103 ай бұрын
  • Great to see them using a normal GCC compiler and not some obscure proprietary stuff

    @hermannpaschulke1583@hermannpaschulke1583 Жыл бұрын
    • That's the beauty in this. The momentum of the standard tool chains is so great that nothing else should cross their mind.

      @microcolonel@microcolonel Жыл бұрын
    • Gcc and makefiles, i never use IDEs.

      @zoobab28@zoobab28 Жыл бұрын
    • @@zoobab28 the issue here is that they probably didn't fully documented the chip or the API or the programming interface to allow to just completely avoid their IDE.

      @PainterVierax@PainterVierax Жыл бұрын
    • @@PainterVierax it's all fully documented, their (very minor and not needed) patch to gcc and custom OpenOCD are released, the protocol is documented etc. And the chip manual is very good.

      @BruceHoult@BruceHoult5 ай бұрын
  • 10¢ RISCV - truly a milestone in the cost-value proposition of 1000x ENIAC on a chip for 10¢ 😳 thx for keeping us up-to-date!

    @johnpenner5182@johnpenner5182 Жыл бұрын
    • Its not a milestone, its the chn government subsidizing the product to compete with western companies

      @nolit0239@nolit0239 Жыл бұрын
    • Plus it doesn't need an army of engineers, technicians and programmers to keep it running!

      @jimtekkit@jimtekkit Жыл бұрын
    • Build you own Connection Machine for under 10,000$

      @sdrc92126@sdrc92126 Жыл бұрын
    • Something like 5000x to 6000x the speed of ENIAC. About 50x the RAM capacity of early ENIAC (which had only the 20 registers), and 10x the capacity of ENIAC near the end of its life after some core memory was added. Program size is very hard to compare as ENIAC used plugboards to control it.

      @BruceHoult@BruceHoult Жыл бұрын
    • How much the speed of that special FX prop looking CRAY supercomputer?

      @NNokia-jz6jb@NNokia-jz6jb Жыл бұрын
  • Since it's using an external toolchain, it cannot build something that is not saved to disk. Therefore, you need to save the file before build. The hex file not being rebuilt is either you forgetting to save the source code or a bug in the vendor SDK ("make" target dependency missing).

    @MatthiasWelwarsky@MatthiasWelwarsky Жыл бұрын
    • Yes, I doubt it's a bug, it just needs the file to be saved for as you said, the external compiler that doesn't know the IDE exists.

      @EEVblog@EEVblog Жыл бұрын
    • @@EEVblog you can set Eclipse to autosave before build

      @teslatrooper@teslatrooper Жыл бұрын
    • @@teslatrooper Yep, I figured you'd be able to do that.

      @EEVblog@EEVblog Жыл бұрын
    • But why doesn't it save all the currently opened files whenever a project build is started by default like most proper IDEs do? Is it just another strange Eclipse quirk or is there some reasoning behind that?

      @Kirillissimus@Kirillissimus Жыл бұрын
    • @@Kirillissimus I set every IDE I use to query if files are unsaved before building, as opposed to saving automatically. I find it useful as a guard against accidentally fat-fingering the build key and having it automatically save files before I'm ready for it.

      @captainsausages1205@captainsausages1205 Жыл бұрын
  • WCH-LinkE is not a generic USB to serial interface. It is a CH32V305 microcontroller implementing the single wire debug protocol used on the V003. Yes, technically that is serial, but it isn’t just a pass through buffer.

    @truectl@truectl Жыл бұрын
    • so like jtag? that is a game changer on these things.

      @GeorgeStyles@GeorgeStyles Жыл бұрын
    • Is there any specifications about how to build a programmer with an FTDI+logic ??

      @donvukovic7440@donvukovic7440 Жыл бұрын
    • @@donvukovic7440 No. We’ve been asking WCH for specs for a while. If there were open specs I would have implemented an open programmer by now. My goal until specs are released is to reverse engineer the wire protocol and implement my own debugger. I just haven’t had time to do it yet.

      @truectl@truectl Жыл бұрын
    • @@truectl Thanks, I look forward ti it.

      @donvukovic7440@donvukovic7440 Жыл бұрын
    • @@truectl both the specs and WCH's code implementing them have been released.

      @BruceHoult@BruceHoult Жыл бұрын
  • MounRiver is the short for mountain and river, it means 天圆地方,山河相依。If you translate it directly, it means, round sky and square earth, mountains and rivers depend on each other.

    @haijiazhu3148@haijiazhu3148 Жыл бұрын
    • Thank you for this insight.

      @BatteryCoverMissing@BatteryCoverMissing Жыл бұрын
    • You mean like flat earth with spherical atmosphere? :D

      @RPBCACUEAIIBH@RPBCACUEAIIBH Жыл бұрын
    • Thanks for the translation in full, such a complex and beautiful culture. .

      @alexkalish8288@alexkalish8288 Жыл бұрын
    • Chinese is a fascinating language. I really want to learn. It is becoming a must for hardware and software developers anyways. But I’m not able to find good resources on the internet.

      @ozdemirsalik@ozdemirsalik Жыл бұрын
    • @@ozdemirsalik no, all software people know that china does not include software as the 7 industries that it will take over the world with... software is for stealing copyrights and exploiting.

      @ginxxxxx@ginxxxxx Жыл бұрын
  • I love how they describe their logo, they must be *really* proud of their design 😀

    @Darkstar2342@Darkstar2342 Жыл бұрын
    • It's Scanimation for the vision-impaired.

      @abitofabitofabit4404@abitofabitofabit4404 Жыл бұрын
  • WCH is one of the only chinese electronic companies that I like. They make a lot of niche but useful to hobbyist components like a USB host that uses parallel Intel bus.

    @DorperSystems@DorperSystems Жыл бұрын
    • Not to mention Patrick being active on Twitter and responsive and friendly 👍

      @Morbuto@Morbuto Жыл бұрын
  • Wrote around Christmas a riscv emulator for Python, 32bit CPU, RV32i ISA and RV32M extension support. The base instruction set(RV32i) is comparable with something like the older AVR attiny instruction sets, very barebone, but it does the trick. For example it doens't have MUL or DIV in the base set(RV32I), that is in the RV32M extension. So yes it can be made very cheap,

    @PeetHobby@PeetHobby Жыл бұрын
    • Cool. Can people download this?

      @EEVblog@EEVblog Жыл бұрын
    • that's great job, will it be opened for use?

      @qqconsoleqqclient7749@qqconsoleqqclient77498 ай бұрын
    • Well, adding multiply to a hardware alu immediately complicates the design. You end up with probably a doubled data buss and logic to handle it in the registers, definitely multi clock operations because of the timing delays and logic to handle it. And a 32bit multiply circuit is rather big on it's own (you can pack in more memory or features if you ignore it). For a tiny entry level chip like this, not including multiply is probably the right way to go.

      @PaulSpades@PaulSpades8 ай бұрын
  • Printing the 'Getting to blinky" document would be more expensive that the microcontroller itself :) Nice demo!

    @martijnb5887@martijnb5887 Жыл бұрын
  • I'm thrilled to see more on this, probably testing basic features like uart, timers, i2c etc....

    @PasanKarunanayake@PasanKarunanayake Жыл бұрын
  • I like these part selection/catalogue shopping videos. Honestly I find it to be one of the most annoying and time consuming parts of building a project sometimes. There's just so many options lol Great stuff, keep it up!

    @christopherjackson2157@christopherjackson2157 Жыл бұрын
  • They've made it just so easy compared to my old school days of using to burn a UV EPROM and plug it into a socket on the PC board. Back in those days too, you had no sample code and had to create the include files yourself... oh joy!.... pre internet days as well, so you had to get a printed reference manual.... oh.. and you had to write your code in assembler (machine code)... without any debugger!

    @davannaleah@davannaleah Жыл бұрын
    • Did a fun project back when I was in 8th grade; decided to build a cross assembler for the NEC uPD78C10 on the BBC micro... the biggest challenge was actually understanding the "japlish" manual for the thing, it being written in a rather tedious language (not sure if not being a native English speaker myself was a hindrance or helpful!).

      @koma-k@koma-k Жыл бұрын
    • In 1987 I worked in an industrial automation company, I had to burn about 200 UV EEPROMS. Torture.

      @santopino2546@santopino2546 Жыл бұрын
    • ... and it was uphill... BOTH WAYS!

      @CoCoNutBob@CoCoNutBob Жыл бұрын
  • This IDE takes me back to the Codewarrior times when you had a slick win98 Style environment, before the migration to Eclipse. There was a P&E IDE for the QT8 microcontrollers that were a breeze to use, I still have the Cyclone. Now back to my grave.

    @franciscogerardohernandezr4788@franciscogerardohernandezr4788 Жыл бұрын
  • Every time you were building the project, it was building the two (or more) projects you had open at the time, so taking longer. It's quite annoying that Eclipse comes with Ctrl-B set as "Build all projects" instead of "Build current project". It's one of the first things I change when using a newly installed Eclipse based IDE.

    @mwpaus@mwpaus Жыл бұрын
  • that hardware abstraction API looks like what I had to work with when I did STM32 work. the first RISCV cores I saw were placed in STM32 clones. makes sense that they stick with established APIs and aren't just pin-compatible physically but also register-compatible to existing devices.

    @crackwitz@crackwitz Жыл бұрын
  • One of the very few companies that actually reply your email and support the customer!

    @phangmoh@phangmoh Жыл бұрын
  • As usual, software support is king. AFAICT, the easy part is making the silicon, the hard part is building the community support, tool chain, software experience, etc.

    @ethanmye-rs@ethanmye-rs Жыл бұрын
    • I think that's one of the big parts around spark fun and raspberry pis.

      @Ataraxia_Atom@Ataraxia_Atom Жыл бұрын
    • Setting up a Pi Pico environment is agonizing for Windows users that want to use C/C++.

      @asm_nop@asm_nop Жыл бұрын
    • @@asm_nop Most development tasks like that on Windows tend to be agonizing in my experience.

      @RobertHancock1@RobertHancock1 Жыл бұрын
    • @@RobertHancock1 i agree i usually match and mix msys2 and msvc compiled stuff

      @takipsizad@takipsizad Жыл бұрын
    • @@asm_nopI just used Arduino IDE for my Pi Pico project (filter wheel changer for a telescope), there was nothing difficult about it I just followed the Pi foundations instructions.

      @backgammonbacon@backgammonbacon Жыл бұрын
  • That's actually a really cool little chip. Might have to look into it at some point. Love the open source toolchain!

    @SidewaysCytlan@SidewaysCytlan Жыл бұрын
  • would be great to have a video breaking down the fundaments of adcs. The types, error sources, input signal conditioning and such.

    @brendanhayes-oberst1398@brendanhayes-oberst1398 Жыл бұрын
  • Very excited for the partridge in the pear tree!

    @JustinDuijn@JustinDuijn Жыл бұрын
  • Looking forward to using this chip!

    @petermuller608@petermuller608 Жыл бұрын
  • I started with the 4004 which we paid $480 for and another $100 for the translation chips (4001 & 4002) from Pmos to Cmos or ttl. It's amazing they sell them for sub $1. Obviously they will go broke in a real economy as the FAB can't be paid off with no profit. I would start with buying the hardware and writing a stand alone compiler for the RISC V using my PC. Sounds like a good project for me in the future. Cheers - great Blog -

    @alexkalish8288@alexkalish8288 Жыл бұрын
    • RISC-V is easy to write a compiler for, but why bother when there is already gcc and llvm?

      @BruceHoult@BruceHoult Жыл бұрын
  • I was browsing these guys a few wees ago and I thought they had quite the nice selection of low cost MCUs. BLE, networking, motor or display driving. Basically if your main MCU is missing a feature or you need something very low power they have something that will fit your needs.

    @excitedbox5705@excitedbox5705 Жыл бұрын
  • Hi, Dave. Long time Eclipse user here 😊I haven't done development in C programming language for some time, but the general M.O. of IDEs is to automate some (or most) of the complex software process/workflow. But the assumption is that the developer using an IDE is aware of (at least most of) the steps in the workflow. To save the time it takes to build the actual binary (compiling, linking, optimizations, etc.) most IDEs support incremental compilation where only the modified files are compiled and then linked with a previously compiled/built pieces that were cached. But given the number of moving parts the build workflow has, even without the incremental features, the "Project >> Clean" action is there to take care of the famous "my tool is stuck" issues. An IDE can be configured to automatically save any modified editors before actually performing the build, so you might opt-in for that one. Or even to automatically save modifications to a file when the keyboard input "stops long enough". Also, "automatically compile/build on save" is an opt-in feature of some IDEs. But if one considers these automation features and the complexity of the workflow, one could conclude there is no "incremental build" - building the actual deliverable binary involves much more CPU/RAM/DISK intensive activities compared to compilation, so it doesn't make sense to start-and-clean-up-on-cancelation every couple minutes on auto-save. That is most likely the reason you didn't always get the HEX file after "incremental build". The Eclipse itself is a customizable and modular software platform, i.e. for creating any kind of desktop software, but it is most widely known as a Java/C/C++/PHP IDE thanks to the modularity. Years ago I watched a National Geographic documentary on NASA Mars rovers where it was explained how NASA plans a rover's route, and the software they were using was Eclipse with custom plugins 😁

    @dexterBlanket@dexterBlanket Жыл бұрын
  • Very interesting, Dave. I have a couple generations of SiFive RISC-V SBC's. Nice to see micro-controllers appearing at a good price point. Do a SRCH for "cnlohr on risc-v" here. He wrote an RISC-V emulator in C and used buildroot to get the 400-500 lines of RISC-V C emulator to boot linux and give you a command prompt right on you linux PC. It is freaking amazing.

    @vincei4252@vincei4252 Жыл бұрын
    • BTW, he provides all the material and I was able to download. build and run everything myself relatively quickly. Building the Linux kernel and other stuff with the emulator took a little time.

      @vincei4252@vincei4252 Жыл бұрын
  • It's crazy how far things have come in the last 10-15 years. The last time I programmed a micro in anger was an AT90S2313 with all of 2K flash and a whopping 128 bytes of SRAM, you practically *had* to use assembler in order to cram all you needed into that space, it's nice to have the luxury of a high level language for a chip at an affordable price. I can imagine there are some old grackles on here that will be rolling their eyes and going "Baaah! back in my day we had to write everything in ones and zeroes, and before that we didn't even have zeros and had to use the letter 'O'" (to paraphrase a Dilbert cartoon)

    @therealchayd@therealchayd Жыл бұрын
  • eevblog right on top of the techno curve!!

    @ntn888@ntn888 Жыл бұрын
    • -10,000,000 points for not asking ChatGPT to write code for you.

      @nameredacted1242@nameredacted1242 Жыл бұрын
  • I would love to see more about this Dave 👍

    @martinandersen7955@martinandersen7955 Жыл бұрын
  • hope many manufacturers move on to this cheaper hardware. thank you dave for showcasing this. might as well jump to this risc-v bandwagon if it becomes easily available for cheap

    @n0madfernan257@n0madfernan257 Жыл бұрын
  • Great video Dave!

    @thedanyesful@thedanyesful Жыл бұрын
  • I ordered the evaluation kit and finally received it. Only issue I had was to get the MounRiver IDE to generate a hex file. I dug into the Settings an found the setting under "GNU RISC-V Cross Create Flash Image/General. I selected Intel HEX in the drop down and all is well. Thanks for the Video I was looking for a device that did not require the investment of the Keil development software. Thanks to you and WCH!

    @photonflood@photonflood Жыл бұрын
  • I love Eclipse, mostly because I can rightclick almost any identifier in a project and hit 'show call hierarchy', 'go to declaration', or other neat code-parsing tricks.

    @stevenclark2188@stevenclark2188 Жыл бұрын
    • I hate eclipse because they make dumb decisions for everything in the UI and force them upon you.

      @smoothbraindetainer@smoothbraindetainer Жыл бұрын
    • That's how ANY modern IDE works. Also all of them, except Eclipse, save files before build by default.

      @RustedCroaker@RustedCroaker Жыл бұрын
    • @@RustedCroaker Visual Studio Code does not, NetBeans - nope. Yes IntelliJ does. It can though be toggled on in all of them

      @neko2849@neko2849 Жыл бұрын
    • Both Eclipse and NetBeans are ancient software by now. They can't compete with modern IDEs.

      @_________________404@_________________4045 ай бұрын
  • I very much enjoy these microcontroller videos. :)

    @BRUXXUS@BRUXXUS Жыл бұрын
  • Wish I had one of these in High School in 1982. Amazing!

    @rb8049@rb8049 Жыл бұрын
  • The STM8 standard I/O library was fairly incomplete. i re-wrote much of the library before fiding someone else had done exactly the same. ST (like AMD) are great at making silicon, but not so good with software. So I wouldn't be too surprised to see ST make a RiscV implemementation, as they need not worry about software. The kings of the MCU software have been PIC, but from what you show me, this isn't too far from PIC in terms of ease of use. This architecture (looking at Mhz) perhaps sits between STM8 and STM32. The STM32 is ARM based, and ST could save money on licencing costs, so we could see a merge in those low and mid-end MCU offerings in a Risc V product line. A scalar lower speed to replace STM8 and a higher clock and instruction pipelining and other logic trick superscalar basic instruction set RiscV to replace STM32 with the same tool chain accross the product line.

    @nickrhill@nickrhill Жыл бұрын
  • Thank you for the review .

    @good.citizen@good.citizen Жыл бұрын
  • Great inspiration dave, I have been looking for alternatives since there are no SAMDs nor STM32s on the market right now.

    @webkar@webkar Жыл бұрын
  • Sweet, we will be giving that a try. Have a great day everyone.

    @qkitselectronics5415@qkitselectronics5415 Жыл бұрын
  • Interesting idea, Dave. It's nice to see that microcontrollers are coming at a good price.

    @ArduinoTex@ArduinoTex Жыл бұрын
    • This mc is 32bit replacement for stm8s003, has same pinout. stm8s003 cult microcontroller. Nuvoton did it's x51 N76E003 pinout compatible, now ch32v003.

      @dekus80@dekus80 Жыл бұрын
  • I remember prototyping with the PIC 16F54 in the mid 2000s with

    @yueibm@yueibm Жыл бұрын
    • In mid 2000s I programmed not PICs but OTP Z86E04. Made controllers for lights flashing on buildings.

      @dekus80@dekus80 Жыл бұрын
    • back in 1800 we only had candles, those were the days

      @zoenagy9458@zoenagy94588 ай бұрын
  • thanks for highlighting it and where to find it.

    @AJB2K3@AJB2K3 Жыл бұрын
  • Thanks for sharing.

    @speedy3496@speedy3496 Жыл бұрын
  • The prices is completely crazy. I teach EE131 (first year Digital Electronics) at a local university and basic digital ICs cost more than that. It is important they understand digital logic; but, the only place they are likely to ever use it is in an FPGA design. I recently helped someone debug a Space Invaders Arcade Game and most of it is done with MSI logic (counters, etc.) and only one Microprocessor (which probably cost more than all the other ICs combined). Things have certainly changed.

    @connecticutaggie@connecticutaggie Жыл бұрын
    • Yeah with microcontrollers and to some extent FPGAs becoming as cheap and small as they are it doesn’t make a lot of sense build something up using digital logic chips. Microcontrollers are just that versatile now, you can use them for implementing a single gate or you can implement a complex control system. Their only downside really is speed, they are usually quite a lot slower than the propagation delay of a gate but most common applications now aren’t relying or dependant on the speed of individual gates unless it is in a very high performance or high speed system, in which case you probably have more going on than just a single gate and you are probably better then just using an FPGA.

      @conorstewart2214@conorstewart2214 Жыл бұрын
    • When I at college learning electronic engineering we had to buy pic16f877A wich was the stronger part less prone to burn on our hands, it was 8-12$ then now should be about 25$ thanks prices are relatively cheaper now, but said parts on 10c even having free ide (i learn with proprietary pic ask and PICC both pain in the ass and expensive for non educational projects) kudos

      @JoseAngelAcostaEngineering@JoseAngelAcostaEngineering Жыл бұрын
    • I took digital logic twice, once at a small university where it was part of CS, but actually offered by the physics department (and I TA'ed that course for a couple of years after I took it) using discrete 7400 logic chips. I took it once again after I transferred to another larger university to switch to COMPE from CS (and in eningeering they wouldn't transfer any courses beyond 1st year courses), where it was all FPGA based. The discrete logic chips in the breadboard was more memorable and fun, but took hours of plugging wires into the breadboard, and troubleshooting if you made a mistake. The FPGA version was way faster, but less memorable and less fun, and less "hands-on" - I always did the labs the night before at home, simulated it, and basically loaded it up on the FPGA board and demo'ed it to the lab instructor in the first 5 minutes and left for the afternoon (to go work on the endless stream of homework from other courses).

      @gorak9000@gorak9000 Жыл бұрын
  • The "save thing" is an Eclipse quirk. Its always the first thing i change when i work with Eclipse, because i've been bitten too many times.

    @Nik930714@Nik930714 Жыл бұрын
  • Forgot to say "Great video, Dave!" previously 🤦‍♂ Keep up the good work. Cheers.

    @dexterBlanket@dexterBlanket Жыл бұрын
  • Now we need Rust toolchain for this IC and I would call it a day :)

    @irukard@irukard Жыл бұрын
  • I just took apart yet another dead led edison bulb and started knocking the led chips off. I was thinking about hooking up 4 of them in a (physical not electrical) line to a ESP8266 to see like back and forth light tricks, pwm dimming etc. Will be hard to solder. I was hoping I could solder them to a header of some sort and plug it into a breadboard with the ESP8266. It works about the same as an Arduino using the Arduino IDE.

    @MatthewSuffidy@MatthewSuffidy Жыл бұрын
  • The RISC-V 1-wire debugging protocol of CH32V003 will be released soon :)

    @rvmaking@rvmaking Жыл бұрын
  • Blink (LED Flasher) FTW - nice job Dave!

    @FindLiberty@FindLiberty Жыл бұрын
  • Nice video, thank you for sharing it :)

    @Bianchi77@Bianchi77 Жыл бұрын
  • Bob is your Auntie... Pretty neat processor and IDE! Good find!

    @mohinderkaur6671@mohinderkaur6671 Жыл бұрын
  • I would love to some more stuff with this chip:)

    @checkm8606@checkm8606 Жыл бұрын
  • @8:31 The peripheral clock enable function on line 35: This looks similar to how peripherals function on STM32 chips, each peripheral (i.e a GPIO port/timer etc.) has a clock enable to it allowing the peripheral to be completely powered down. By default all peripherals have the clock disabled and have to be enabled one by one, so that only the peripherals you need consume power. It's likely the peripheral design on this chip follows a similar pattern to STM32 chips (and potentially other 32 bit ARM micros).

    @quantum5768@quantum5768 Жыл бұрын
  • Damn, that's a *lot* of value for just 10 cents! I'm already even somewhat familiar with the Eclipse IDE, since I like to use STM32 MCUs, so it should be a breeze for me to start using these as well.

    @WereCatf@WereCatf Жыл бұрын
    • Where do you source parts ? I need whole tape of STM32s and there is none on the market right now. Do you think that big manufactures are getting special priority lead times? Last time I checked the lead time for ANY STM32Fs was 500days.

      @webkar@webkar Жыл бұрын
    • @@webkar Currently nowhere. They are basically all overpriced and/or completely unavailable everywhere I look. I'm just biding my time and keeping an eye on worthy alternatives.

      @WereCatf@WereCatf Жыл бұрын
    • @@webkar we might be seeing more and more risc v drop in replacements.

      @JamilKhan-hk1wl@JamilKhan-hk1wl Жыл бұрын
    • @@JamilKhan-hk1wl almost every MCU manufacturers, even the historical survivors, are jumping to RV cores. There are some pin compatible replacements of chips like the STM32F103 for years but the issue right now is availability.

      @PainterVierax@PainterVierax Жыл бұрын
  • That's awesome and with very little risk! :D I need to get back into this stuff, even though I still get flashbacks from the IDE. :)

    @Eduardo_Espinoza@Eduardo_Espinoza Жыл бұрын
  • The new Pinecel soldering iron is using a RISC V with the same Iron OS. First one I’ve seen in the wild.

    @quadmods@quadmods Жыл бұрын
  • Yes, please do a video regarding the debug options! Really hope there is a way to debug it line by line, but not really optimistic since a lot of the more expensive chips don't have it either.

    @ilaserbia@ilaserbia Жыл бұрын
    • I tried to debug it on VSCode, it is awesome.

      @taoyang9843@taoyang98434 ай бұрын
  • brilliant! Love your videos..

    @yurialtunin9121@yurialtunin9121 Жыл бұрын
  • There's a YT video on Blink... now. ;) Great clip / info; I expect RISC-V will be to processors what Linux was to firmware though it's early days.

    @Clark-Mills@Clark-Mills Жыл бұрын
  • It looks fantastic for its price.

    @kemoxplus@kemoxplus Жыл бұрын
  • ARM is toast. Long live RISC-V!

    @_-martin-_@_-martin-_ Жыл бұрын
    • Who knows, maybe someday they will make their licensing policy more liberal in terms of instruction sets and core specifications as well.

      @Kirillissimus@Kirillissimus Жыл бұрын
  • There should be an option in eclipse that saves automatically when you build.

    @ShaneBurrell1@ShaneBurrell1 Жыл бұрын
    • I can't Imagine it's able to build without saving it somewhere. I suppose it lets you test a change without saving... Is it a bug or feature?

      @VeritasEtAequitas@VeritasEtAequitas Жыл бұрын
  • Amazing. I think that the expression "cheap as chips" now more accurately refers to integrated circuit chips, not potato chips - potato chips now sell for about $5-$7 per bag here in the US.

    @Gersberms@Gersberms Жыл бұрын
    • $5 for half a bag.

      @deltaray3@deltaray3 Жыл бұрын
    • @@deltaray3 True, mostly air!

      @Gersberms@Gersberms Жыл бұрын
  • Would like to see some examples of designing and developing software for it, and integrating hardware… what are all the functions of the risc instructions. Maybe build a slot machine, or some other type of hardware game that this thing can interface with.

    @jamesgockel854@jamesgockel854 Жыл бұрын
  • Dave, if you do more review of this kit please dive into live debugging and breakpoint operation. PIC and TI chips both support it, it saves a lot of time.

    @cuisinart7899@cuisinart78995 ай бұрын
  • Good explanation and demo. Eclipse, Netbeans et al have many peculiarities, sometimes you have to save, sometimes not, sometimes you have to double click to highlight / 'select' the project in the explorer window. A common gotcha is a work / temporary folder which stores the running file, a copy of the one you are viewing. On many occasions the view and work files 'lose connection' resulting in all sorts of oddities. You can test this by copying an older backup file into the Eclipse workspace, it will be ignored unless you open the file and edit it (just add a blank new line) and then save it. It could be much, much worse, have you ever tried the Arduino IDE, especially when trying to burn the bootloader or load a sketch into other IC's?

    @ralphj4012@ralphj4012 Жыл бұрын
  • I just redesigned my little LED controller around a ESP32-C3, that variant is also based on Risc-V. Definitely gonna check these out too, not only is it cool that Risc-V is an open architecture, availability of Chinese parts seems to be a lot less variable than western parts have been recently (one of the reasons I switched my design from a SAMD to the ESP32C3..."supply chain").

    @treelineresearch3387@treelineresearch3387 Жыл бұрын
    • I used the ESP32-S2, and the peripherals (particularly the ADC, DAC, and UART) were terrible. On the S2, there was no way to linearize the ADC, even with a look-up table. The SAMD-51, running the same code, worked perfectly, no tweaking needed (though you can actually tweak offset and linearity in registers on the SAMD-51's ADCs. The RP-2040 has a wonderful manual, though the chip has some bugs (the manual writer apologized profusely for one of them). The SAMD-51 has a decent manual. The ESP32-S2 has a pretty lousy manual (unless they've redone it recently).

      @Johnny.Fedora@Johnny.Fedora Жыл бұрын
    • @@Johnny.Fedora Yeah I've used the ADC on the original ESP32 and wasn't impressed, but for this device the only thing I'm using ADC for is measuring the battery and that can be pretty rough. I'd expect it to be the same IP block/fab process on the C3 so probably no better. C3 doesn't even have the DAC, and the UART is fairly tertiary for what I'm using it for, I expose the pins on an expansion header but for the most part I just use these things for making small lamps/simulated candles from turned wood (board is round and fits in a 30mm forstner bit pocket). The USB serial emulation seems to work well enough on the dev boards I picked up, and that's mainly what I wanted. Overall, ESP32 is a cheap low-end chip for low-end applications, and that's exactly what I'm using it for.

      @treelineresearch3387@treelineresearch3387 Жыл бұрын
    • @@treelineresearch3387, that makes sense. In fact, one of the peripheral part choices had an on-board ADC, which mean I'd only have needed the SPI port. In any case, I wound up going with the nRF52840. It's not cheap, but it has the necessary memory/processing power, so it's all good. When RISC-V is more competitive for that niche, that's what I'd like to go with, on principal.

      @Johnny.Fedora@Johnny.Fedora Жыл бұрын
  • This needs to be the future: how small, simple, and lightweight can we make our tech?

    @robinpage2730@robinpage2730 Жыл бұрын
  • saving is necessary in order for make (or any other dependency tool) to pick up on the fact something is changed and need re-compilation.

    @markusdd5@markusdd5 Жыл бұрын
  • Bit of a mangled RISC-V explanation there. It's indeed just an ISA, which means that you either get an open source core that implements this ISA, or you pay someone else (like SiFive) for the core, which means that you still pay license costs, especially for any IP blocks that are likely to be added to the processor.

    @MayaPosch@MayaPosch Жыл бұрын
    • Well yes of course, you could pay a license fee to use someone elses pre-built core, but that's not really the point of a major manufacturer for example making a RISC V chip, they'd do it in-house so they never have to pay a license fee.

      @EEVblog@EEVblog Жыл бұрын
    • @@EEVblog Yep opencores has open cores for RISC-V e.g. the NEORV32

      @DanielSMatthews@DanielSMatthews Жыл бұрын
  • WeAct Studio on AliExpress has a few boards using WCH chips like the CH582 and others.

    @conorstewart2214@conorstewart2214 Жыл бұрын
  • I lost it at the "partridge in a pear tree" part 😆

    @benrr101@benrr101 Жыл бұрын
  • Hello. Congratulations on the channel. Can you tell me if it is possible to use an internal reference for the ADC on the CH32V008?

    @mlt-35@mlt-356 ай бұрын
  • Excellent.

    @santopino2546@santopino2546 Жыл бұрын
  • The more vital thing is how available development tools.

    @alexlo7708@alexlo7708 Жыл бұрын
  • Thats really cool!

    @sinewave3323@sinewave3323 Жыл бұрын
  • You can write to the GPIO output register directly in C without using assembly. This should be as fast as assembly but easier to program.

    @kdog8787@kdog8787 Жыл бұрын
    • Of course you can. You use the function call already provide for you, as then the code will be more portable across its family of mcu's as the function uses multiple #ifdef to recompile based on family mcu.

      @tonysofla@tonysofla Жыл бұрын
  • I'd love to see some kind of project with the cheap RISC-V chip

    @samuelclemens6841@samuelclemens6841 Жыл бұрын
  • Sooooo, download the IDE, plug in the RISC V Processor to the programer, flash it, and... Bob's your Uncle!!! 💪

    @nonsuch@nonsuch Жыл бұрын
  • The best part of RISCV is the open source architecture, you can adapt to it for free and even modify it adding new extensions. For example i have a working core done on verilog for my fpga that work very well, it's a very simple architecture for designing on it. So even the core size gets reduced. Awesome.

    @startforkiller@startforkiller Жыл бұрын
    • The processor architecture is not open source, only the ISA, you will probably find that only the basic implementations will end up open source, all the best and most complex ones will not be and to use them you would have to pay a license to a company, similar to what already happens with ARM. So while RISC-V being an open ISA is good for simple cores, you will probably still have to pay a license for more advanced cores with things like pipelining or OOP and your ability to modify them and add new extensions will probably be very limited.

      @conorstewart2214@conorstewart2214 Жыл бұрын
    • @@conorstewart2214 Yeah, I only often change the meanings, good point

      @startforkiller@startforkiller Жыл бұрын
    • @@conorstewart2214 That makes sense. The other point is that the program code should work as you expect on the more powerful processors without any changes. That is one of the advantage of standardizing the instruction set. It will be interesting to see how quickly hardware and software appears commercially. It could be a lot of fun in the next year or so.

      @ryanqvincent144@ryanqvincent144 Жыл бұрын
    • @@ryanqvincent144 porting your code between arm processors isn't difficult either, neither is using different versions of esp32. Within an architecture or manufacturer it is generally pretty easy to reuse code. RISC-V will probably not be much better in that regard, especially since the extensions can change between processors. It's not like with arm cores where you could have an M3 and all M3s are very similar, with RISC-V the implemented extensions could be different, it especially becomes a problem when people implement custom extensions. Whilst the binaries aren't compatible the compiler should take care of all the differences between processors, just like it already does for microcontrollers like esp32 or STM32, even the Arduino IDE can compile the exact same code for many types of microcontroller, that isn't something that is unique to RISC-V.

      @conorstewart2214@conorstewart2214 Жыл бұрын
  • Obviously they borrowed the terminology and a lot of the specs from the STM32F0 line (not the STM8).

    @danielegger6460@danielegger6460 Жыл бұрын
  • The 10 CENT RISC V Processor! CH32V003 - Almost ready for prime time!

    @JBernhard72@JBernhard72 Жыл бұрын
  • I downloaded the EVT zip file for this chip but I cant seem to find examples for doing floating point or scientific calculations. Unlike Microchip PIC ("the boss"), the compiler guide is readily available and properly documented.

    @birdybirdy688@birdybirdy6888 ай бұрын
  • Wow, that looks like a way more welcoming toolset than Microchip Studio - and no bank switching anymore because it is 32 bit.

    @Oktokolo@Oktokolo Жыл бұрын
  • I just got my rp2040 controllers for a split keyboard I'm building, but it would be fun to go through the whole PCB design around one of these micro controllers

    @Ataraxia_Atom@Ataraxia_Atom Жыл бұрын
    • Isn't RP2040 the joke that requires external ROM?

      @johndododoe1411@johndododoe1411 Жыл бұрын
    • @@johndododoe1411 That only matters if your code fits into the tiny flash (you meant flash right not ROM?) on $1 controllers (current RP2040 price on JLC), if you end up needing an external flash anyway it doesn't matter. You can get 32mb of flash for 60c. You need to select the correct components for your projects, slapping in a $4 controller to flash an LED on/off just because "ItS ThE BeSt ESP32 FoR ThE WiN" is stupid.

      @backgammonbacon@backgammonbacon Жыл бұрын
    • @@backgammonbacon flash ROM, EEPROM, EPROM, PROM, it's all ROM.

      @johndododoe1411@johndododoe1411 Жыл бұрын
  • You can set Eclipse to 'build automatically' and its triggered after a save.

    @Sven_Dongle@Sven_Dongle Жыл бұрын
  • The build system probably doesn't have the hex file as a dependency. How to fix that depends on what build system eclipse is using for your project .. its own, make, or maybe something else.

    @stevenspmd@stevenspmd Жыл бұрын
    • Ah, so it's flexible, interesting. I did see all sorts of options for setting up dependencies, but was easier to just save it for this video. Thanks.

      @EEVblog@EEVblog Жыл бұрын
  • The HAL looks like a 1:1 copy of STM.

    @diemaschinedieviereckigeei2941@diemaschinedieviereckigeei2941 Жыл бұрын
  • It's always exciting to see cheap Chinese micros! Thanks for sharing Dave! The lack of public source code of openocd is a bummer. If you want source code access, you need to email them.

    @lovelya72@lovelya72 Жыл бұрын
    • Pay them and watch as Chinese communists invade democratic Taiwan. Arsehol

      @fffUUUUUU@fffUUUUUU Жыл бұрын
  • Most ide / compilers don't build off of what you see in the editor but what you've saved / written to the filesystem because usually the ide integration is just the ide asking your operating system to run the compiler with some arguments set, it wouldn't have access to your ide's text editors running memory. So yeah, ctrl+s regularly. The confusing thing I've run into are projects that copy their source files over to the "build" for reference when debugging, then you're sat there making edits to fix a silly bug that only get overwritten when you build again.

    @andersama2215@andersama2215 Жыл бұрын
  • Excellent

    @planker@planker Жыл бұрын
  • Kids these days need RISC-V to blink a LED, back in my day we only use flip-flop circuit

    @QDStrength@QDStrength Жыл бұрын
  • The nice thing about the RISC-V situation is, the barrier for a vendor to just let you use an unmodified standard toolchain is very low. Making a source-compatible (with the competing STM product) library would be the last mile (and at first glance it looks very similar). Under all of that Eclipse goo, it's just running GNU make, and the problem with the "build" command is probably to do with an incorrectly written Makefile. No doubt a chip like this if it gains popularity will get an Arduino port.

    @microcolonel@microcolonel Жыл бұрын
  • Please do more videos on this MCU

    @smoua4588@smoua4588 Жыл бұрын
  • We are testing this to add an automatic closing function to the bathroom ventilation fan. About 40% cheaper than comparable MCUs. Compared to the STM8, it's almost free.😁😁😁 My only concern is that if they don't last long and discontinue the product, the STM8 won't be a cost-effective alternative.

    @minipolenet@minipolenet11 ай бұрын
  • Awesome!

    @tomaspecl1082@tomaspecl1082 Жыл бұрын
  • I think this is the equivalent to the STM32F030F4P6 with I intend to use in one of my new projects. This was below 50 cent before the semiconductor shortage maybe as low as 30 cent but it is not at this time. But this RISC V is also not available not even at higher price so not an option probably but will keep an eye out for it. I still have to get the larger STMS32 microcontroller that I ordered in February 2021 so about two years ago.

    @electrodacus@electrodacus Жыл бұрын
    • Yeah I could not find the ST part for under 50 cents.

      @EEVblog@EEVblog Жыл бұрын
    • STM32G030 series is under 50 cents@qty30 on LCSC. They released an even lower budget line recently, the C0 series, but that doesn't seem to be available yet.

      @teslatrooper@teslatrooper Жыл бұрын
    • @@teslatrooper It is strange that the G0 series is less than F0 series as it seems as it has more memory (double) higher operating frequency and M0+ instead of M0 so double the compute capability.

      @electrodacus@electrodacus Жыл бұрын
    • @@EEVblog It was less before the semiconductor shortage I think as low as 30 cent in thousand volume. Just noticed that the 10 cent risc-v has just a 10bit ADC vs the 12bit on the ST parts. I need those 12bit ADC's and there may be some other differences. When you designed a product in relative low volume a few thousand pcs then 10 cent or 50 cent will not make any sort of difference. Even a few hours of working on the software because something is not well documented or not working as expected will cost more. This things are good for very large volumes super low cost products or super simple designs where you do not need most of the peripherals. It is still interesting and I will check more risc-v variants.

      @electrodacus@electrodacus Жыл бұрын
KZhead