Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:50 15 Nov 2025 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 : Real-time, multiprocessor supports BASIC

     Page 1 of 2    
Author Message
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 07:58pm 05 Nov 2020
Copy link to clipboard 
Print this post

The Parallax Propeller P2 is just starting to emerge and it supports mixed-language programming, including BASIC.
The P2, like the older P1, has 8 independent CPUs that are referred to as cogs.

There used to be a product, "Micromite Companion" that featured the Propeller P1 as a coprocessor. Imagine a combination of any MMBasic device as the host for the P2  

Here is a video about FlexBasic
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 734
Posted: 02:34am 06 Nov 2020
Copy link to clipboard 
Print this post

http://propellerpowered.com/the-micromite-companion/
my site
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 03:01am 06 Nov 2020
Copy link to clipboard 
Print this post

  hitsware2 said  http://propellerpowered.com/the-micromite-companion/


Yeah I found that but no downloads for firmware, etc....unless I'm not looking in the right place.

Haven't seen Jeff on the Parallax forum for ages.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 03:18am 06 Nov 2020
Copy link to clipboard 
Print this post

Ah-ha...found this
 
MauroXavier
Guru

Joined: 06/03/2016
Location: Brazil
Posts: 303
Posted: 01:45pm 06 Nov 2020
Copy link to clipboard 
Print this post

In the past, when I had the original Colour Maximite, I was crazy to get one Micromite Companion, but the expensive taxes to get one to Brazil was so prohibitive (today is even worst).
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 06:11am 07 Nov 2020
Copy link to clipboard 
Print this post

If you do get one of the kits from Karl, be sure to ask him for a link to the build instructions for his version. It's a bit different from Jeff's design and doesn't match what you are likely to find online.

As for the P2, at $150 for the eval board, I think that I will sit this one out until they come to their senses. The bare chip is only $15 though...

Hey Mauro! :)
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:52am 07 Nov 2020
Copy link to clipboard 
Print this post

  SimpleSafeName said  If you do get one of the kits from Karl, be sure to ask him for a link to the build instructions for his version. It's a bit different from Jeff's design and doesn't match what you are likely to find online.

As for the P2, at $150 for the eval board, I think that I will sit this one out until they come to their senses. The bare chip is only $15 though...

Hey Mauro! :)


The Parallax community is very similar to this one in that; there are already several alternatives popping up.

This one is only US$40

Also, the video link that I posted showed another Parallax alternative, the P2 Edge which is also much less expensive. Not bad for eight 32bit processors that can do real-time without having to use interrupts.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:25pm 07 Nov 2020
Copy link to clipboard 
Print this post

Ever needed to support a quadrature encoder?
The P2's pins are all identical smart-pins. One can interface as many encoders as the number of pins will allow. The encoder count frequency can be up to sys-clock (160-300+ MHz) and the really cool thing is that this doesn't even tie-up any of the eight processors.

In my motion control world, I need to handle up to 1.6M quad counts/second. Nothing for the P2.

Looking at the Microchip products, they have a dspic that can handle TWO quad encoders only  

Need a bunch of DACs? Same thing (up to 16bit)

ADCs? Same thing.

UARTS? Same thing.

I²C? Same thing.

SPI? Same thing.

The Propeller P2 is quite mind-blowing.
I should get one for Pete for Xmas and by spring 2021 we'll have the MMBASIC interpreter on there, dishing out tasks to the surrounding co-processors  
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 04:17pm 07 Nov 2020
Copy link to clipboard 
Print this post

  Tinine said  Ever needed to support a quadrature encoder?
The P2's pins are all identical smart-pins. One can interface as many encoders as the number of pins will allow. The encoder count frequency can be up to sys-clock (160-300+ MHz) and the really cool thing is that this doesn't even tie-up any of the eight processors.[/quote]

Why, yes I do. But I use a Mesa 7i92 for that. Five encoders on it. ;>


  Tinine said  In my motion control world, I need to handle up to 1.6M quad counts/second. Nothing for the P2.[/quote]

I'm an old controls engineer, who currently is sitting out the human malware virus. Fortunately, I've had an old Takamatsu lathe to keep me occupied. What are you working on?


  Tinine said  The Propeller P2 is quite mind-blowing.
I should get one for Pete for Xmas and by spring 2021 we'll have the MMBASIC interpreter on there, dishing out tasks to the surrounding co-processors  


I had been following the project, but it seemed that it wasn't (and arguably still isn't) ready for prime-time. Nice to see some good progress and an affordable design to use it with. Thanks for the link!
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:55pm 07 Nov 2020
Copy link to clipboard 
Print this post

Yeah the P2 is just getting started, I don't have one yet but I have been using the P1 for nine years.

Mesa 7i92: 5 encoders for $89

Propeller P1 without the smart-pins: 16 encoders for $6.

Depending on the required performance, all 16 encoders can be handled by only one of the eight processors.

The other great thing about the Propellers is that they are just as easy to program as the Micromites. I still prefer to have a Micromite on the front end though and using the Prop for fast, coprocessing "hardware function calls". Imagine having a CPU as a function parameter in MMBasic:



 Retcode = myfunction(CPU#,parameter1,parameter2)



 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 08:15pm 07 Nov 2020
Copy link to clipboard 
Print this post

  Tinine said  Yeah the P2 is just getting started, I don't have one yet but I have been using the P1 for nine years.[/quote]

Same here, I like the chip. I should, I own enough of them. :)

But the P2 has been on the event horizon for what seems like ages. I was beginning to wonder "if" and not "when". I'll probably get one of those $40 boards, the price is cheap enough, and I have been excited to see what the P2 will have to offer.


  Tinine said  Mesa 7i92: 5 encoders for $89

Propeller P1 without the smart-pins: 16 encoders for $6.[/quote]

Quoting the price for a completed board versus the price for a single chip is kind of like comparing apples to nearly empty juice boxes.

The Mesa board's strong suit is its seamless integration in LinuxCNC (regardless what you think of LinuxCNC. I generally think of it as a solution looking for a problem to solve).

It's virtually bullet-proof - which significantly adds to the price of a board, and the creator of the board is always available to handle online questions on the LinuxCNC forum. Or you can call him up and speak to him personally.

He even frequently offers support for integrating third party boards into his board. In fact there's a connector just for connecting BOBs to his hardware.

So if you are in the business of making chips, rather than fiddling with them as I do, the Mesa board is the way to go.


  Tinine said  Depending on the required performance, all 16 encoders can be handled by only one of the eight processors.

The other great thing about the Propellers is that they are just as easy to program as the Micromites. I still prefer to have a Micromite on the front end though and using the Prop for fast, coprocessing "hardware function calls". Imagine having a CPU as a function parameter in MMBasic:



 Retcode = myfunction(CPU#,parameter1,parameter2)





It would be interesting to see how a combination of the CMM2 and a P2 would work as a 3d printer controller. And as a precursor to controlling CNC machinery down the road.

The LinuxCNC approach is to handle all of the motion on the PC side of things. Whereas the 3D printer controller has the paths loaded into it, and that's it.

I don't see the over-arching need for a PC and an OS to run things.
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 08:44pm 07 Nov 2020
Copy link to clipboard 
Print this post

  Quote  
It would be interesting to see how a combination of the CMM2 and a P2 would work as a 3d printer controller. And as a precursor to controlling CNC machinery down the road.

The LinuxCNC approach is to handle all of the motion on the PC side of things. Whereas the 3D printer controller has the paths loaded into it, and that's it.

I don't see the over-arching need for a PC and an OS to run things.


Thank you  

Those LinuxCNC dinosaurs have totally lost the plot. I recently revisited and they are still battling with jitter and latency....no sh1t Sherlock!

"but it's open source..."
Big deal. If you want any serious performance, ya gotta close the servo loops which requires external hardware so why not close the actual loops in external hardware?

And now they have it on the RPi. Great if all you want is pretty graphics but most serious users need to cut chips as fast and accurately as possible.

I have also been thinking of the CMM2 as the front-end for a CNC. It has a file system which is all you need of an OS.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 08:51pm 07 Nov 2020
Copy link to clipboard 
Print this post

  Tinine said  
I have also been thinking of the CMM2 as the front-end for a CNC. It has a file system which is all you need of an OS.


I like that idea!
Micromites and Maximites! - Beginning Maximite
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:01pm 07 Nov 2020
Copy link to clipboard 
Print this post

  CircuitGizmos said  
  Tinine said  
I have also been thinking of the CMM2 as the front-end for a CNC. It has a file system which is all you need of an OS.


I like that idea!


Heck I can blow LinuxCNC away with my existing hardware that I retrofit to machine-tools every day and that's using the Explore-100. I just don't do animated graphics. The CMM2 appears to be more than capable.
Edited 2020-11-08 09:03 by Tinine
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 12:07am 08 Nov 2020
Copy link to clipboard 
Print this post

  Tinine said  
  Quote  
It would be interesting to see how a combination of the CMM2 and a P2 would work as a 3d printer controller. And as a precursor to controlling CNC machinery down the road.

The LinuxCNC approach is to handle all of the motion on the PC side of things. Whereas the 3D printer controller has the paths loaded into it, and that's it.

I don't see the over-arching need for a PC and an OS to run things.


Thank you  

Those LinuxCNC dinosaurs have totally lost the plot. I recently revisited and they are still battling with jitter and latency....no sh1t Sherlock!

"but it's open source..."
Big deal. If you want any serious performance, ya gotta close the servo loops which requires external hardware so why not close the actual loops in external hardware?

And now they have it on the RPi. Great if all you want is pretty graphics but most serious users need to cut chips as fast and accurately as possible.

I have also been thinking of the CMM2 as the front-end for a CNC. It has a file system which is all you need of an OS.


I agree with you wholeheartedly. LinuxCNC is almost a proof of concept of what Linux can do (and LinuxCNC does do it well) rather than a purpose built system for controlling a CNC. But it's a hodgepodge of various pieces mysteriously tied together somehow.

The big reason why it is still relevant is because it works, and because of the alternatives. CamSoft was our first choice, that was six months of wasted effort that I won't get back.

I'd like to see what a CMM2 + P2 could do.
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 734
Posted: 12:35am 08 Nov 2020
Copy link to clipboard 
Print this post

> I'd like to see what a CMM2 + P2 could do.

Wouldn't just tying the 2 together be a real blob of complication ?
my site
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 02:37am 08 Nov 2020
Copy link to clipboard 
Print this post

Well they would simply be linked serially so the P2 would be a peripheral. I currently do this with the E-100 via full duplex 422/485.

I have address space for up to 255 motion controllers and each one is a separate MCU. The E-100 is the master and the motion controllers are slaves that do all the real-time heavy lifting.
Edited 2020-11-08 12:38 by Tinine
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 05:07am 08 Nov 2020
Copy link to clipboard 
Print this post

  hitsware2 said  > I'd like to see what a CMM2 + P2 could do.

Wouldn't just tying the 2 together be a real blob of complication ?


I suppose, but this way you get to leverage the strengths of both systems.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 09:30am 08 Nov 2020
Copy link to clipboard 
Print this post

If Propellor basic can be loaded into the Parallax would it not be possible to port MM over to it to load directly into it?
  Quote  Eric Smith, has created a native compiler called FastSpin that understands Spin 1, PASM (P1), BASIC, C, and is now supporting Spin 2 and P2ASM. Many programmers use Eric’s compiler to get more speed from their existing Spin programs.

For those who prefer C, Eric also has you covered with the advantage of being able to mix code from other languages. For example, I wrote a test program in C for the P1 that used several of my Spin 1 object libraries. Like Peter, Eric is very helpful with forum members, and always seems keen to incorporate good ideas and suggestions provided by those using his compiler.

One of the first C compilers for the P1 was Catalina by Ross Higson. It has been updated for the P2, and as with the other tools, that development (especially libraries) continues. Ross puts together a nice installation package that provides a version of Code::Blocks that is ready to produce Propeller code. This simplifies getting started for new programmers.

For those who love BASIC, I already mentioned that FastSpin understands a dialect of BASIC, and recent forum posts suggest that Terry Hitt is porting his popular PropBASIC to the P2.

Quoted from here

Finally, if you’re a Python programmer, you’ll be happy to know that microPython runs on the P2. This is very exciting given the multi-core approach of the P2. Hopefully, the folks at Adafruit will make a port of their CircuitPython (derived from microPython) available for the P2 as well. Python is becoming very important in education, and having it run on small micros is beneficial for students who have an interest in embedded design and coding.

It c an output VGA directly so maybe it can do HDMI as well, or at least the SSD and other displays we mostly use

this is the circuit of the single chip computer


Edited 2020-11-08 19:40 by lew247
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 01:14pm 08 Nov 2020
Copy link to clipboard 
Print this post

Regarding porting MMBASIC, kinda out of my depth but I think the problem would be new commands unless existing commands with extra parameters could work.

There was a discussion, some time ago where a Parallax community member, "jmg" had looked at the source and saw no reason why it couldn't work.

Parallax themselves are keen to get upython on there because their biggest market is schools/education and Python is the language-du-jour. So as it stands, upython will be doing what we would like MMBASIC to be doing.

PropBasic is a nice language that I regard as high-level assembly because the single-pass compiler literally translates the BASIC syntax to PASM.
"Popular" is a bit of a stretch though because I only know of three other users beside myself  

FlexBASIC is an optimising compiler that can utilise existing objects, written in C or PASM.

What wasn't mentioned is that; for the masochists, a very powerful Forth is also available.

Edit: Ah, I should have read the (excellent) N&V article....Forth is in fact mentioned.
Edited 2020-11-09 00:23 by Tinine
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025