Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:39 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Raspberry Pi enters microcontrer game with a $4 Pico

     Page 3 of 7    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 03:46pm 23 Jan 2021
Copy link to clipboard 
Print this post

  RetroJoe said  Peter, I can't help but think you've already thought all this stuff through when you evolved the CMM2 from the original CMM, so maybe you can put this discussion to bed.

I can't speak to his current assessment, but there's this from August of 2018:
  matherp said  There is nothing I can see to stop MMBasic running on the ESP32 it is just 2 or 3 hundred hours of slog work to make it happen. Then you have to consider the development environments- Arduino: c..p, native: unknown quantity


From here (well into the thread).

~
Edited 2021-01-24 01:47 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 03:47pm 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  Hi Matherp , what is this meaning? I know the words bit not the slang.



Usage No. 4

  Quote   "could" it be done technically,


Probably

  Quote  and do you think performance would be "good enough"


Don't know, an interpreter is different to compiled code and the fact that the ESP32 (and this chip) use external flash memory may impact on performance.
Logically the answer should be yes. I can't find a comparative performance benchmark of the ESP32 running micro-python vs say a STM32. This would give a better idea.

The biggest hurdle to any new architecture is the learning curve, including for the IDE.

The Arduino IDE (term used loosely) and MBed are not good enough for building something like MMBasic so you need to work with a real IDE and neither are supported by the GCC/Eclipse environment that is the basis of many professional quality IDEs
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 04:08pm 23 Jan 2021
Copy link to clipboard 
Print this post

The Pi Pico is supported in more professional IDE environments such as Eclipse, CLion, Visual Studio Code, etc.  You can do on-line debugging via its SWDEBUG port, and you can use a Raspberry Pi, or another Pi Pico as the debug interface.
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 707
Posted: 04:39pm 23 Jan 2021
Copy link to clipboard 
Print this post

> Python is arguably a modern form of BASIC

!!!!!!!!!! FOR SURE !!!!!!!!!!!

One advantage of the Pico ( for me anyways )
is that it ' s more Raspberry Pi than Windows
centric .... Unlike the majority .....
my site
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 05:26pm 23 Jan 2021
Copy link to clipboard 
Print this post

  ceptimus said   The Pi foundation is more interested in Python (which is, in part, the origin of the "Pi" name).  So Python use is bound to be well supported, regularly updated, and with a huge user base.  Python is arguably a modern form of BASIC and perhaps has a more promising future than BASIC.

I know that many people hate the fact that indentation is a critical part of the Python syntax - but that doesn't bother me.  I always strive to indent my code consistently anyway - no matter which language I'm writing it in.  And any code I write for the Pi Pico is most likely to be in C++, with a sprinkling of assembler.

I'm sure that there are preprocessors out there that can convert source code with braces into space-indented Python format, for those who really want it!


Oh, man - you grabbed the third rail with both hands!  People seem to hate Python with a burning passion around here :) To your point, if indenting is a universally accepted best practice, why is enforcing it in the language syntax such a horrible crime? Never understood that - computer folks are supposed to be as logical as Mr. Spock, but that's a logic gap big enough to drive a truck through.

Personally, I tend to be very libertarian when it comes to these things - there is no monopoly on good ideas, and both BASIC and Python are delightful, easy-to-use languages. They also both have the virtue of being easy to learn (readable syntax, interpreted REPL, etc), which is why Python is the defacto "new BASIC".

Now JavaScript, OTOH - despite its enormous popularity, I think it's a train wreck. The sheer number of inventions designed to make JS useable is astounding!
Edited 2021-01-24 03:30 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 05:52pm 23 Jan 2021
Copy link to clipboard 
Print this post

Yeah, JavaScript has some good parts, but lots of horrible parts too.

The reason it's enormously popular is that, for historical reasons, it's the language implemented by browsers - so all the web pages that want to run stuff on the client have to use it.

I think if we were starting out now, then JavaScript, at least in its current form, would not be the language of browsers - and Python would be a good choice as a better alternative.

The problem with trying to replace JavaScript now is that there are already millions of Web pages that use it, and lots of 'proper' computer languages, such as Dart, already target JavaScript as their compiled output.

If we do try to swap to Python, or some other language(s), then browsers will need to support both/all those languages for many years during the changeover period: not likely to happen, in my opinion.

It's a bit like the QWERTY keyboard layout - it's out in the wild for historical reasons; and while there may be better layouts available, it would be too big a change to make it happen now.  QWERTY will likely remain the dominant layout for as long as people continue to use keyboards.
Edited 2021-01-24 03:57 by ceptimus
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 06:16pm 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  People seem to hate Python with a burning passion around here


Its not just indenting, scoping, the catastrophic version incompatibility, renaming long term concepts like arrays, typing by usage etc.

Like javascript it seems like a language that has been extended beyond its core syntax (if there ever was one)
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 06:31pm 23 Jan 2021
Copy link to clipboard 
Print this post

  thwill said  My 2c.

The CMM2 community doesn't need to create it's own competitor and fragment it's base.

Our problems are not price/performance (the existing CMM2 is already cheap in the grand scheme of things), but are:

- Market for retro computers is pretty small.
- No social media visibility.
- The CMM2 lacks the romance (and back catalogue) of actually being a clone of a retro machine.
- No good and persistent mechanism to advertise and share software.

None of these are solved by Peter porting MMBasic to yet another platform.

YMMV.

Best wishes,

Tom


Very good points all, particularly the concerns about fragmentation.

In reality, though, the variety of MM devices and MCUs is already pretty fragmented, and IMHO it is MMBasic that is "the platform", not the hardware it happens to be running on.

That being said, hardware capabilities are important, and the "drift" in different CMM2  implementations will become increasingly problematic for software developers (e.g. mouse or no mouse?)

A cheap and cheerful $20 "standard gadget" like the TTGO, preflashed with MMBasic, could be a great on-ramp to the MM community for people unwilling to spend $100+. I'm really into this stuff, and it took me over a year to pull the trigger :)

imagine what a standardized WiFi implementation, courtesy of the ESP32, would enable: we could get a dedicated CMM BBS up and running (addressing your fourth bullet above...), teachers could easily network a bunch of "MiniMites" in a classroom setting, it could be deployed as an IoT edge device, etc. etc.

The VIC-20 emulator in the FabGL library is a great "art of the possible" demo for this use case. It comes packaged with a few game cartridge images, and then can connect to your WiFi and download a bunch of others OTA.

BTW, I think it's a foregone conclusion that Peter will not be the one doing any porting!
Enjoy Every Sandwich / Joe P.
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 06:34pm 23 Jan 2021
Copy link to clipboard 
Print this post

But, of course, there is only one BASIC.  

Obligatory XKCD cartoon.

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 06:43pm 23 Jan 2021
Copy link to clipboard 
Print this post

  Quote  But, of course, there is only one BASIC.


No-one would pretend Basic is an exemplar. Currently C++ is probably as good as it gets and in the hands of a master is so elegant

I really like the way this guy presents and uses it.

https://www.youtube.com/channel/UC-yuWVUplUJZvieEligKBkA

My concern is the use of python as a first language - it seems to me to promote/allow so much bad practice which will bite the programmer as they try to scale up the size of their projects

Personally I think MMBasic with OPTION EXPLICIT/OPTION DEFAULT NONE hardwired would promote a better grounding despite the lack of any OO pretensions
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 06:45pm 23 Jan 2021
Copy link to clipboard 
Print this post

  ceptimus said   If we do try to swap to Python, or some other language(s), then browsers will need to support both/all those languages for many years during the changeover period: not likely to happen, in my opinion.


Peter's gonna love this - have you heard of Brython (Browser Python)?

It's a Python interpreter... written in JS !!

Amazingly, it works, and works pretty well. Like a graceful dancing bear :)

I guess it's for people who want to do browser stuff but either hate JS or love Python, but it probably strikes a lot of folks as the "worst of both worlds".
Edited 2021-01-24 04:54 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
ceptimus
Senior Member

Joined: 05/07/2019
Location: United Kingdom
Posts: 130
Posted: 06:49pm 23 Jan 2021
Copy link to clipboard 
Print this post

Hey, I started with BASIC, and maybe you did too?

I think beginners need an easy start, and they'll engage in bad practice regardless.  Most will never progress beyond that, but the keen ones will then move to more grown up languages (one of which could be a more structured form of BASIC), and then they'll begin to learn how to do things properly.
Edited 2021-01-24 04:51 by ceptimus
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 07:01pm 23 Jan 2021
Copy link to clipboard 
Print this post

I'm guessing 98.6% of the folks on TBS got started with BASIC :)

There are some real computing veterans here who predate even BASIC, but I have to agree - learning BASIC taught me just about everything I needed in later life.

Not just the procedural syntax and such, but design and system thinking, layers of abstraction, and how to decompose a large problem into smaller, modular, solvable ones.
Enjoy Every Sandwich / Joe P.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 07:20pm 23 Jan 2021
Copy link to clipboard 
Print this post

I learnt basic on a computer in 1977 that had basic loaded in it with punched tape once it was turned on, it had no monitor only a printer.

And to "kinda" quote someone above
The ideal thing would be a board that had the power of the CMM2, Wifi/bluetooth along with the commands to use them and normal displays capability as well as vga if wanted but minimal so it was cheap
Edited 2021-01-24 05:22 by lew247
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 06:53am 24 Jan 2021
Copy link to clipboard 
Print this post

60Hz 1080p from a $4 Raspberry Pi Pico microcontroller (buttery smooth)

https://www.youtube.com/watch?v=mjFwR3feyV0&t=5s&ab_channel=GrahamSanderson

New PIO Magic, CMM2 Eat your heart out , only $4.

8 x Programmable I/I (PIO) state machines for custom peripheral support.
Running as independent hardware processes from main MPU.

How much is the simplest PIC32 running MMB and what performance does it have?
Edited 2021-01-24 16:59 by JohnL
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 07:53am 24 Jan 2021
Copy link to clipboard 
Print this post

Wow that's streaming video off the sd card? impressive
  Quote  Stream data off the SD card using PIO... output RLE compressed video via PIO, and then do audio by PIO. PIO for the win! Overclocked to get a 1080p pixel clock!


This is actually a good read
hardware design with rp2040
Edited 2021-01-24 18:03 by lew247
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 08:24am 24 Jan 2021
Copy link to clipboard 
Print this post

  Quote  60Hz 1080p from a $4 Raspberry Pi Pico microcontroller (buttery smooth)


If you look at the schematic you will see that the I/F uses every single I/O line of the Pico. Yes it is an impressive demo but when running it the pico can do preciously nothing else. There is a huge difference between using an embedded uP for a simple dedicated task and having a similar capability in a general purpose computer
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 08:52am 24 Jan 2021
Copy link to clipboard 
Print this post

  matherp said  There is a huge difference between using an embedded uP for a simple dedicated task and having a similar capability in a general purpose computer


Totally agree with you, I do think there may be as said earlier, newer versions of the board in a year or so that add much needed functionality
It had the possibility to be a brilliant board.
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 09:00am 24 Jan 2021
Copy link to clipboard 
Print this post

  matherp said  
  Quote  60Hz 1080p from a $4 Raspberry Pi Pico microcontroller (buttery smooth)


If you look at the schematic you will see that the I/F uses every single I/O line of the Pico. Yes it is an impressive demo but when running it the pico can do preciously nothing else. There is a huge difference between using an embedded uP for a simple dedicated task and having a similar capability in a general purpose computer


I think you are wrong.
VGA is generated by independent PIO hardware state machine processors, that have shared/direct access to GPIO lines, FIFO buffering, etc.
Programmed with relatively few instructions assembly code.

As I understand this should leave main MPU to do "mostly" other tasks?

There is example code for both C/C++ SDK and Micropython.

This thing has simple but very fast parallel processors to do independent GPIO processing.
Edited 2021-01-24 19:07 by JohnL
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 09:43am 24 Jan 2021
Copy link to clipboard 
Print this post

I just looked at the schematic and every line is used


pico_vga_sd_aud-sch.pdf

Note also the display is in black and white as the Pico doesn't have enough memory to buffer a 1920x1080 image
Edited 2021-01-24 19:52 by matherp
 
     Page 3 of 7    
Print this page
© JAQ Software 2024