RP2040 Tiny / Mecrisp Forth / Neo Pixel

  Рет қаралды 18,021

0033mer

0033mer

Күн бұрын

Пікірлер: 48
@lmamakos
@lmamakos 11 ай бұрын
Both zepoforth and mecrisp forth are amazing resources to have available. I've done a project using Mecrisp FORTH on an STM32F103 some years ago, and it was a great resource to have. FORTH is wonderful for doing interactive embedded systems work to explore and poke at hardware interactively. Both FORTH implementations are also very high performance implementations and compact. Lately I've been playing with zeptoforth on the RP2040 microcontroller and it also looks very promising. It looks very complete, having primitives for using both CPU cores and multiprocessing primitives for IPC and synchronization amongst concurrent tasks. Very powerful! Thanks for the video!
@0033mer
@0033mer 11 ай бұрын
Hi Louis ... thanks for sharing!
@theelmonk
@theelmonk 11 ай бұрын
That's a lot of Forths .. has anyone done a comparison ?
@duanecjohnson
@duanecjohnson 5 ай бұрын
High 0033mer; Technically, Wave share has another 2040-TINY called the MINI. It has the same footprint with a type C connector on the board. Slightly cheaper too. The MINI also has broken out 12 more pins on the back side as small solder pads. I have no idea how to connect to them yet, a wafer wire bonder comes to mind. Or maybe 30-gauge solderable magnet wire. I find the MINI suits my need better when on the plug board. Then go over to the TINY when finished. ( The TINY is marked with Version 1.1 and I suppose the MINI is Version 1.0) BTW, I also like running Pico Basic on these too. redrok
@0033mer
@0033mer 5 ай бұрын
Thanks for sharing.
@flomojo2u
@flomojo2u 11 ай бұрын
Great tutorial! It's been so long since I've seen anybody do some good coverage of Forth, rock on!
@0033mer
@0033mer 11 ай бұрын
Thanks for the feedback!
@pileofstuff
@pileofstuff 11 ай бұрын
FORTH on one of the newest microcontrolers? I wonder if anyone has ported FORTRAN or an even older language to the 2040...
@0033mer
@0033mer 11 ай бұрын
Forth and C are about the same age. Forth 1970 and C 1972. Basic ( 1964 release ) is available for the RP2040: geoffg.net/picomite.html
@pileofstuff
@pileofstuff 11 ай бұрын
@@0033mer I love the contrast of "ancient" programming languages on modern hardware.
@abpccpba
@abpccpba 5 ай бұрын
Hi; Ken you said " I got a lot of complaints that I was not following Forth "standards" so I took the site " that's why I can't find your early work. : = {{ Not hidden somewhere is it. At 83 is it was something I could flow. Thank for your good work. : = }}
@ShellacScrubber
@ShellacScrubber 11 ай бұрын
Excellent.....you must have read my mind Ken. I was just about to order some neo pixels to play around with using either punyforth of flashforth ! I don't have an RP2040 Tiny but it looks like a great little board that I'm gonna have to get ! I do however have mecrisp on a raspberry pi pico ! One feature of the RP2040 that particularly interests me is the PIO in the form of 8 state machines allowing for custom bit-banged serial protocols !
@krish2nasa
@krish2nasa 11 ай бұрын
Hope to see FORTH on RISC-V MCU soon. Thank you very much.
@lasersbee
@lasersbee 11 ай бұрын
Have been looking at that board.... Good quick Tut....
@JonMcPhalen
@JonMcPhalen 10 ай бұрын
How are you doing the specific bit timing for the WS2812B. I have written lots of pixel drivers for the Propeller 1 and Propeller 2 and know that pixel timing is specific.
@0033mer
@0033mer 10 ай бұрын
The RP2040 is clocked at 125 mHz so it is fairy easy to code nanosecond delays. Forth runs as fast as assembler so GPIO control is efficient. When controlling a single neopixel the timing is pretty flexible. T0H 200ns min 500ns max T1H 550ns min and there is no max ( I have used 1 second which works ) T0L and T1L 450ns min and 5000ns max ( any higher will be seen as Latch ) The Neopixel timing start is low to high edge triggered and reset on the next positive edge. With Forth it is easy to do "what if" scenarios interactively from the keyboard to check these timing parameters.
@nil0bject
@nil0bject 11 ай бұрын
can't wait for this footprit to have wifi/ble. another small board i found is the RP2040 Zero. cool video, thanks
@0033mer
@0033mer 11 ай бұрын
Welcome!
@duanecjohnson
@duanecjohnson 5 ай бұрын
But seriously, where would you put the WIFI. Possibly stacked and connected to those 12 extra pads on the MINI version? redrok
@nil0bject
@nil0bject 5 ай бұрын
@@duanecjohnson yeah i was thinking stacked on a daughterboard
@shreyanshshukla4939
@shreyanshshukla4939 10 ай бұрын
great vid
@alexloktionoff6833
@alexloktionoff6833 10 ай бұрын
Nice little board! I think the drop-in replacement board with 28pin DIP ROM/RAM compatible pinouts cold be perfect for retro-projects.
@MarkBender-u1x
@MarkBender-u1x 10 ай бұрын
I like your KZbin videos on Mecrisp Forth however it would be nice if you would provide all of the Forth code necessary to implement the project. Without the entire Forth environment description it's difficult to implement what is described in the video.
@0033mer
@0033mer 10 ай бұрын
Hi Mark, thanks for the feedback. I made the video to only feature the RP2040-Tiny board and just wrote some Forth code using Mecrisp to demo the NeoPixel. I used to have a website where I had tutorials and getting started code for beginners using Mecrisp and eForth on ARM microcontrollers. I got a lot of complaints that I was not following Forth "standards" so I took the site down and now only show the "capabilities" of Mecrisp Forth. I have gone over to the Flashforth platform using the Scamp3 board running a PIC microcontroller. I go over all the code in the videos featuring the Scamp3 board and there is support from the Scamp3 designer (John) and Flashforth author (Mikael) on their websites.
@TooSlowTube
@TooSlowTube 9 ай бұрын
I recognise some of the "words" used from a file that's included with recent Mecrisp releases. This is from a comment on another one of @0033mer's videos, I think (I forget which, but I kept a note of the comment: "In the rp2040-ra directory of the Mecrisp Stellaris distribution is a file "playground.4th" included, which implements some of the words used in this tutorial. Maybe a good entry point to play around with it." I've tried parts of that with ZeptoForth, but I had to change a small part of it to get it to compile. playground.4th contains definitions of words used to read and set pins, etc.
@TooSlowTube
@TooSlowTube 9 ай бұрын
I was a bit off on "recent" - it was "Run Forth On The Raspberry Pi Pico / Mecrisp" by @0033mer, from 2 years ago. You'll find it in the videos tab. The comment was by @computermuseumvisselhovede3380 and I currently see it as the second one on that video (YMMV, due to the vagiaries of the YT experience).
@TheKetsa
@TheKetsa 11 ай бұрын
Where to find a good intro to forth for MCU?
@0033mer
@0033mer 11 ай бұрын
Check out the Scamp3 board runnung flashforth. There are tutorials online: udamonic.com/what-is-a-scamp.html pajacobs-ghub.github.io/flashforth/elements-of-flashforth-5.html
@kayakMike1000
@kayakMike1000 10 ай бұрын
Why not just learn C? Fourth is such a niche language
@PhG1961
@PhG1961 11 ай бұрын
Impressive!
@maximus6884
@maximus6884 11 ай бұрын
Waveshare never share the schematics openly therefore their board should never be used for development.
@TooSlowTube
@TooSlowTube 9 ай бұрын
I'm glad to see current videos on this. Any material you still have from your old website would be good to read or watch too. Standards are for other people, and definitely not for hobbyists. Is there a way to have a Forth program load and run on booting up an MCU in either Mecrisp or Zepto Forth, like we can with C++ programs in Arduino? I'm trying to wade through the documentation but I've yet to find anything about that. Assuming we can, is there a way to programmatically quit back to the REPL, e.g. on a buton press that's being watched for? Can we develop code in the REPL then save it to an SD card, like using a cassette recorder on an 80's home computer to save and load BASIC programs?
@0033mer
@0033mer 9 ай бұрын
Every Forth has a way to produce "turnkey" applications to boot on power up. When using Mecrisp, name you main word "init" and it will boot on power up. You can create a backdoor by monitoring a spare GPIO pin on bootup. If you hold it low during power-up it can restore Forth back to the ok prompt. The Scamp3 board uses the sequence ' main is turnkey to auto run a program on power-up. A hard reset will restore control to the ok prompt.
@TooSlowTube
@TooSlowTube 9 ай бұрын
@@0033mer Thanks. I'll try that. If I have my program monitoring a pin, what's the word to use to exit it to the ok prompt, when it sees that pin change?
@0033mer
@0033mer 9 ай бұрын
It depends on how your main word is setup. You could use "exit" to jump out of your main word on GPIO sense or you could use the simple begin key? until and get out using the serial port. Check out "turnkey" in the documentation: mecrisp-stellaris-folkdoc.sourceforge.io/
@TooSlowTube
@TooSlowTube 9 ай бұрын
@@0033mer Thanks. I did look at that documentation earlier, but didn't find anything really useful. So far I've found: Turnkey Methods to create a final Mecrisp product. Warning ! UNDER CONSTRUCTION ! and; compiletoflash : non.closed.loop.program \ loop until keyboard key pressed which will exit loop and return control to the terminal begin ." This MCU is running a TURNKEY application" cr key? until ; : INIT non.closed.loop.program ; compiletoram " non.closed.loop.program" really needs an example of such, not just that comment. Mostly, I was trying to avoid getting stuck in the init word/function and having to reflash it to start again.
@steveharper2857
@steveharper2857 11 ай бұрын
What happened to the pin 16 description?
@0033mer
@0033mer 11 ай бұрын
The schematic at 5:08 shows GP16 connected to the input of the Neo-pixel ( Din ). The word >neo sends RGB data from GP16 to the Neo-pixel.
@cthoadmin7458
@cthoadmin7458 11 ай бұрын
Why would you use Forth, over Pico's C? What wold it give me?
@0033mer
@0033mer 11 ай бұрын
Using Forth is the best way to control hardware. Direct register programming allows you to exercise all functions of any peripheral.
@flomojo2u
@flomojo2u 11 ай бұрын
It's incredibly dense and efficient when it comes to interactive control and testing. There's virtually no syntax or all the extra punctuation required by other programming languages, and while it can be cryptic when writing more complicated code, when it comes to querying and controlling stuff it's unmatched and can run in the tiniest amount of resources.
@theelmonk
@theelmonk 11 ай бұрын
Interactive and incremental compilation. Generally less overhead than other types of interpreted language as it compiles to routine addresses as code is entered rather than token lookup. But it still IS interpreted - if an external compiler is OK, C is still better.
@TooSlowTube
@TooSlowTube 9 ай бұрын
@@theelmonk I expect it depends on the version of Forth, but from what I've read it's partly interpreted, and partly compiled. Using the REPL (command line part) is interpreted. Pre-defined words should be pre-compiled, and any you define may or may not get compiled, but the original idea is that they would be, I think.
@RalphWLundvall
@RalphWLundvall 11 ай бұрын
Thanks. Learned some Mecrisp, will a later video cover some zeptoforth (my current favorite)?
@0033mer
@0033mer 11 ай бұрын
Possibly!
@harrykaradimas857
@harrykaradimas857 10 ай бұрын
Forth The us with be may print
@TooSlowTube
@TooSlowTube 9 ай бұрын
also you. with And
SMALLER than the Raspberry Pi Pico! - XIAO RP2040
9:40
Luke's Tech
Рет қаралды 7 М.
First Look at the Arduino Nano RP2040 Connect - It’s finally here!
8:02
Learn Embedded Systems
Рет қаралды 62 М.
LIFEHACK😳 Rate our backpacks 1-10 😜🔥🎒
00:13
Diana Belitskay
Рет қаралды 3,9 МЛН
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 120 МЛН
How Strong is Tin Foil? 💪
00:26
Preston
Рет қаралды 139 МЛН
Run Forth On The Raspberry Pi Pico  /  Mecrisp
13:43
0033mer
Рет қаралды 14 М.
First Look at the Adafruit QT Py RP2040 - Fantastic Tiny RP2040 Board!
11:47
Learn Embedded Systems
Рет қаралды 22 М.
Raspberry Pi Pico 2: a RISC-V bet!
8:05
Jeff Geerling
Рет қаралды 285 М.
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
13:21
Tiny Board, Tiny OLED, Tiny Project
29:19
upir
Рет қаралды 74 М.
RP2040 KiCad 6 Hardware Design - Part 1 - Schematic
36:20
MicroType Engineering
Рет қаралды 26 М.
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
GreatScott!
Рет қаралды 610 М.
Custom RP2040 PCB: Design, Turn-On, and Debug - How Hard Could It Be?
13:03
element14 presents
Рет қаралды 10 М.
Raspberry Pi Pico RP2040 Review
8:37
Elektor TV
Рет қаралды 51 М.
LIFEHACK😳 Rate our backpacks 1-10 😜🔥🎒
00:13
Diana Belitskay
Рет қаралды 3,9 МЛН