Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 00:37 23 Oct 2020 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 : Introducing the Pi-cromite: first steps

     Page 3 of 16    
Author Message
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1229
Posted: 03:00am 08 Apr 2017
Copy link to clipboard 
Print this post

@JohnS
@Tinine

You both win - now please stop clogging up the thread!
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1357
Posted: 06:12am 08 Apr 2017
Copy link to clipboard 
Print this post

  paceman said   @JohnS
@Tinine

You both win - now please stop clogging up the thread!


+1
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 10:57am 08 Apr 2017
Copy link to clipboard 
Print this post




http://rittle.org

--------------
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 4047
Posted: 11:43am 08 Apr 2017
Copy link to clipboard 
Print this post

This version implements the FILES command as per the Micromite. PULSIN and DISTANCE both implemented - need rigorous testing. SETTICK works but only with a LABEL:/IRETURN. I need to work out why SUB doesn't work as an interrupt routine, something to do with the port being a combination of Maximite and Micromite codesets.

Interrupts on Digital input may work (subject to same issue) but not tested.

2017-04-08_214215_mmbasic.zip

run with "sudo ./mmbasic"
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 12:41pm 08 Apr 2017
Copy link to clipboard 
Print this post

I haven't been around for a while and a friend of mine called to tell me that he read on the forum that mmbasic is running on a raspberry pi. My next response was, "what are you smoking? You must be thinking of something else." This is really something!!!! Very exciting indeed. I always wanted to mess with the pi but was a bit intimidated by it.

I just checked and saw that the pi zero is only 5 bucks. How they do that is amazing to me, but now I will certainly pick up a couple immediately. Can anyone point me in the right direction as to, once on my desk, and never have dealt with one, how do you go from ground zero to loading and running mmbasic? Is one type of PI board recommended over another? Do you just use a usb keyboard and hdmi display? No clue to any of this, so ANY information or links to look at to get this started would be great!

THIS IS SIMPLY AMAZING! At least to me, thats for sure. GREAT JOB MATHERP and of course GEOFF!!!!!!!!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3778
Posted: 03:23pm 08 Apr 2017
Copy link to clipboard 
Print this post

The PI runs Linux so you will have to get familiar with some of it's habits.

The official documents for the PI are here
https://www.raspberrypi.org/documentation/
but I usually use Google.
While the Pi Zero is cheap, you will need a few extras to get going. I don't have a Zero but with my other Pi's I only ever log in remotely and don't use a monitor or keyboard at all.

Now that Peter has started playing with the IO pins, I am going to find a spare Pi to use. So far, I have loaded mmbasic on PI's that are in use - not something that should be done with experimental software.

Jim
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 432
Posted: 10:17pm 08 Apr 2017
Copy link to clipboard 
Print this post

  cdeagle said   Tindie has a bunch of Raspberry PI hardware add-ons at the following link

https://www.tindie.com/browse/raspberry-pi/?page=1&pt=ac_cat_search


I know very little about the world of Pi and my first search came up with:

https://www.modmypi.com

I work with the Parallax Propeller a lot so I might grab a Pi and the "Propeller Hat".

https://www.modmypi.com/raspberry-pi/breakout-boards/pimoroni/pimoroni-propeller-hat/?search=Propeller%20hat

I am one of a small minority who uses PropBASIC, which is probably best described as a translator to assembly language because it literally does directly translate. At 80MHz, this provides 20MIPS on EACH of the 8 separate processors ("Cogs"). This combined with MMBasic on the Pi is a very exciting prospect.

Tinine
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 922
Posted: 02:25am 09 Apr 2017
Copy link to clipboard 
Print this post

I think MMBasic on a Raspberry Pi Zero-w would be outstanding. Ongoing thanks to matherp for his continuing outstanding contributions.

I hope the bare Pi Zero-W is more available than the Pi Zero has turned out to be for me. I signed up to be notified when it was available at Adafruit, got a notification 5 months later that it was (but not by the time I looked), never got another notification, and have never found it available.

Kits are available, but right now on Adafruit, no bare Pi Zero or Pi Zero-W, and none that I could find on Amazon or ebay.

 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 09:21am 09 Apr 2017
Copy link to clipboard 
Print this post

Here you go not quite $5 but in stock
Ebay Pi Zero

Or here Canakit

Or

WereismyPi

Regards
Jman
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 922
Posted: 03:35pm 09 Apr 2017
Copy link to clipboard 
Print this post

Thanks. Canakit Pi Zero looks hopeful, $5. Hmmm, shipping 12.95, and that's to Canada (I'll be there in a week).

Still looking, still thinking it's a tease.

I'm afraid I've interrupted the flow of matherp's progress with pi troubles. Sorry.
Edited by lizby 2017-04-11
 
Grogster

Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 7334
Posted: 07:53pm 09 Apr 2017
Copy link to clipboard 
Print this post

Please be aware that I asked the guru(matherp) about using it on a Pi-Zero-W, and this is not officially supported at the moment, as I guess he is concentrating on the full-size "Pies" at the moment. This is not to say it WON'T ever run on the Pi-Zero-W, but just be aware that this has not been tested yet, and we don't want you jumping too far ahead then being disappointed if you discover it will not run or is buggy as hell.

I was thinking that if you can make it run on the Pi-0-W, then this opens up quite a large area for product development, and you just use the zero as the main processor.

However, the full-size pi is not much bigger in the real scope of things, so......
The Zero does have a cost advantage though.

In either case, because you have to boot a Linux of some sort first and then load MMBASIC on top of that, it will never be as fast to boot-up as the instant-on that the current PIC32 MMBASIC is, but if you can live with that......

Knowing matherp, he is probably working on a way to boot the bloody thing directly at core-level from MMBASIC - no underlying Linux at all!
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 1649
Posted: 03:18am 10 Apr 2017
Copy link to clipboard 
Print this post

the pi-zero and A+ both have one major advantage - low power consumption. as i recall, these single-core devices can be got down to near 100mA of current consumption, much less if video is shut down. this makes them ideal for battery powered mmbasic equipment such as data loggers and handheld computing.

the quad-core pi2/3 draws considerably more current, yet provides far more versatility in the 4x USB ports and greater RAM, plus the potential to shift time-critical tasks to a specific core. this makes the pi2/3 suitable for a different set of applications, for example as a desktop mmbasic instrumentation controller.

in both case, retaining linux provides support for a range of USB devices to be connected. x11 and the linux GUI could be ditched, with mmbasic accessing just the video frame buffer, which would shorten boot time quite a bit and simplify the whole setup. you'd be surprised at how much can be stripped out of linux to shorten boot time to potentially just a few seconds.


the end result could be a quite unique machine, combining some old concepts (basic interpreter, single-tasked computer, instrument controller, networking optional) with new technology in the form of speed and massive available RAM and storage.

hats off to both peter and geoff, i feel that mmbasic on the pi (and pic32MZ) open up a whole new set of quite exciting applications.


cheers,
rob :-)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 4047
Posted: 03:31am 10 Apr 2017
Copy link to clipboard 
Print this post

Attached is a new alpha release which I've versioned as 5.3a1

( File removed as requested, see post further down page )

run with "sudo ./mmbasic"

This includes the following:
All normal MMBasic language elements as per Micromite 5.3 but with double precision floats
All onewire/DS18B20 and TEMPR commands and functions including OWSEARCH
PULSIN, PULSE
HUMID (DHT22)
DISTANCE
SETTICK
FILE and DIR$ properly implemented

setting I/O for interrupts should now work as per the Micromite i.e. SETPIN n,INTx,target
The target can be a LABEL:/IRETURN or SUB/END SUB

The Pi doesn't have true OPEN collector output capability but I have now implemented this by switching between driven (low) and high-Z (high) - this was needed internally for DS18B20

use SETPIN n,DOUT,OC to use in this mode. REMEMBER 3.3V ONLY

There is no reason this won't work on a Pi Zero but this needs confirming (hopefully later this week)

NB the command for inputting a program is AUTO rather than AUTOSAVE and termination is with Ctrl-C rather than Ctrl-Z.
Ctrl-Z terminates MMBasic tidily and returns to the UNIX command prompt.

The Raspberry Pi will also recognise a PIC16F1455 plugged into one of the USB ports and can be used to talk to any Micromite using this for the USB to serial I/F. The device appears in \dev\serial







Edited by Gizmo 2017-04-12
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 689
Posted: 11:38am 10 Apr 2017
Copy link to clipboard 
Print this post

Fantastic work Peter.

It is early morning down under so I may not have woken fully but should this statement be reversed?

  Quote  NB the command for inputting a program is AUTO rather than AUTOSAVE and termination is with Ctrl-C rather than Ctrl-Z.


Graeme
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3778
Posted: 12:14pm 10 Apr 2017
Copy link to clipboard 
Print this post

AUTOSAVE and ^Z are the commands for micromites.
AUTO and ^C are the commands that Maximites used.

You can't use ^Z to end the program entry on the Pi version because it will exit mmbasic fully so the old Maximite version of the commands has been used.

A gotcha for the newcomers who didn't grow up with the Maximite.

Jim
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 689
Posted: 12:23pm 10 Apr 2017
Copy link to clipboard 
Print this post

Thanks Jim, when I read the Ctrl-C, my brain automatically thought of the "program break" control not the "file end" control being referred to with the AUTOSAVE. I did mention I was not quite awake at the time.
Graeme
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3778
Posted: 08:04pm 10 Apr 2017
Copy link to clipboard 
Print this post

  matherp said  
The Raspberry Pi will also recognise a PIC16F1455 plugged into one of the USB ports and can be used to talk to any Micromite using this for the USB to serial I/F. The device appears in \dev\serial

That got me excited enough to set up a test Pi. Just waiting for it to do all the updates.

I discovered that your latest ZIP contains the source files, not the executable!

Jim

EDit:
For the record
On my RPi 3, I installed Raspbian Jessie Lite

Installed pig-pio with

sudo apt-get update
sudo apt-get install pigpio python-pigpio python3-pigpio

Ran the 8th April version OKEdited by TassyJim 2017-04-12
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 4047
Posted: 08:38pm 10 Apr 2017
Copy link to clipboard 
Print this post

Correct file

2017-04-11_063805_mmbasic.zip
 
atmega8
Guru

Joined: 19/11/2013
Location: Germany
Posts: 505
Posted: 12:21am 11 Apr 2017
Copy link to clipboard 
Print this post

Cool,

thinking of multiple Mmbasic Processes running in the Background, talking to each other...

How many of those processes can a PI simultaneously run?

Mhhhh.....
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 2196
Posted: 01:32am 11 Apr 2017
Copy link to clipboard 
Print this post

  atmega8 said   Cool,

thinking of multiple Mmbasic Processes running in the Background, talking to each other...

How many of those processes can a PI simultaneously run?

Mhhhh.....

Tens, hundreds, ... as many as you want - will eventually get a bit slow though! (They run flat out i.e. busy wait so will really hit the CPU.)

Some work needed on inter-process comms (and preferably on scheduling).

John
 
     Page 3 of 16    
Print this page
© JAQ Software 2020