Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 06:17 03 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 : Any interest in MMBasic for Windows with full Graphics?

     Page 2 of 5    
Author Message
bigfix
Senior Member

Joined: 20/02/2014
Location: Austria
Posts: 124
Posted: 02:32pm 20 Jan 2022
Copy link to clipboard 
Print this post

  Quote  isn't this pretty close to just a Pico tethered to a PC, with the PC running a graphical terminal emulator? the Pico is likely the cheapest multi-function USB expansion device out there, be it used just an I/O expander or as a platform running MMbasic.


In a way yes - But

If I use a I2C connected subsystem, the code on the slave unit could be frozen after some initial development - is just an appliance

I get the much more powerful and comfortable PC environment with networking functions for the actual code development and debug

But nobody stops you to add some timecritical functions down on the slave unit

On the other side, if the right USB adapter is used you get some rather nice universal connectivity to directly attach some sensors and actors

Adafruit USB adapter

Adafruit I2C I/O Chip
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 03:16pm 20 Jan 2022
Copy link to clipboard 
Print this post

  bigfix said  On the other side, if the right USB adapter is used you get some rather nice universal connectivity to directly attach some sensors and actors


Or the Adafruit MCP2221A Breakout USB to GPIO ADC I2C. I have one of those and would be happy to test it.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
mclout999
Guru

Joined: 05/07/2020
Location: United States
Posts: 430
Posted: 03:19pm 20 Jan 2022
Copy link to clipboard 
Print this post

Yes. A graphics version would give us a dialect-specific basic to make work on Win and CMM easier without relearning a new dialect on the PC side. I have several Win based basics I dabble in but they are all enough different that translation of the underlying algorithms is a bit tedious. GMMB for windows would make things a little bit easier. I have spent a lot of time getting to know CMM2 basic so I would love to be able to leverage that time to work on windows.   Thanks as always.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3552
Posted: 03:38pm 20 Jan 2022
Copy link to clipboard 
Print this post

Unless I am mistaken, MMBasic for DOS supports COM ports (at least the manual for 5.05.03 says so).
So you could always connect a pico, blackpill, whatever to it through an FTDI interface, and using your own invented protocol (or use a known one like modbus) communicate to it.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:03pm 20 Jan 2022
Copy link to clipboard 
Print this post

I'm a fan of Android-based HMIs but I have been looking at some of the "stick" PCs that plug directly into the HMI port of the monitor.

If I ever get around to using Windows again, I'd take a look at the ThinBasic interpreter
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5735
Posted: 04:05pm 20 Jan 2022
Copy link to clipboard 
Print this post

... if you have any COM ports or a USB driver to create a virtual one that can be seen from DOS. :)

A heck of a lot of PCs (both laptops and desktops) don't have COM ports now. They were thrown out not long after the parallel port and the games port. After all, doesn't everything use USB now?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:13pm 20 Jan 2022
Copy link to clipboard 
Print this post

Only spent whatever time it took to make a coffee, thinking about this but ThinBasic is "extensible using Freebasic" etc., etc.

How about MMBasic functionality as an extension?
 
flasherror
Senior Member

Joined: 07/01/2019
Location: United States
Posts: 159
Posted: 04:16pm 20 Jan 2022
Copy link to clipboard 
Print this post

  Tinine said  I'm a fan of Android-based HMIs but I have been looking at some of the "stick" PCs that plug directly into the HMI port of the monitor.


If it's Android based you could use B4A to program it using Basic. Was commercially sold, now free.
https://www.b4x.com/b4a.html
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3016
Posted: 04:21pm 20 Jan 2022
Copy link to clipboard 
Print this post

  Volhout said  Unless I am mistaken, MMBasic for DOS supports COM ports (at least the manual for 5.05.03 says so).


MMBasic DOS definitely supports serial ports, but has no direct support for graphics, and VT100-style is both limited and somewhat tedious to implement for much beyond elementary designs, like this from MMBasic DOS:



PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:32pm 20 Jan 2022
Copy link to clipboard 
Print this post

  flasherror said  
  Tinine said  I'm a fan of Android-based HMIs but I have been looking at some of the "stick" PCs that plug directly into the HMI port of the monitor.</a>


If it's Android based you could use B4A to program it using Basic. Was commercially sold, now free.
https://www.b4x.com/b4a.html


Oh sure  

I have been shipping B4A created product since 2012. 100% of my MCUs have an Android front-end and communicate via Bluetooth.
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 127
Posted: 06:08pm 20 Jan 2022
Copy link to clipboard 
Print this post

I can see a lot of use from a windows version of basic. I have used lots of different basic programs and compilers before , but one real close in dialect to our favorite basic could really speed up programming for the little boards. I vote yes , go for it.
 
flasherror
Senior Member

Joined: 07/01/2019
Location: United States
Posts: 159
Posted: 06:31pm 20 Jan 2022
Copy link to clipboard 
Print this post

  Tinine said  100% of my MCUs have an Android front-end and communicate via Bluetooth.


Which bluetooth module do you use for the MCU?
Edited 2022-01-21 04:40 by flasherror
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 07:10pm 20 Jan 2022
Copy link to clipboard 
Print this post

  flasherror said  
  Tinine said  100% of my MCUs have an Android front-end and communicate via Bluetooth.


Which bluetooth module do you use for the MCU?


Up to now, I have used a COTS (commercial off-the-shelf) device from Tronisoft

The actual manufacturer is Uconnect, out of Taiwan
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 501
Posted: 07:54pm 20 Jan 2022
Copy link to clipboard 
Print this post

I like to see a Compiler or Teensy 4.1 support
Plasma
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 08:30pm 20 Jan 2022
Copy link to clipboard 
Print this post

It would be a shame to not be able to capitalise on the mind-boggling array of PC-compatible DAQ/control boards out there.

Building on an existing Windows foundation such as ThinBasic would mean that we could write our own wrappers to use existing drivers, etc. Not everything can be handled via serial ports and such like.
 
IanT
Regular Member

Joined: 29/11/2016
Location: United Kingdom
Posts: 84
Posted: 09:06pm 20 Jan 2022
Copy link to clipboard 
Print this post

I'd certainly like to see some simple graphics capability included in DOS MMB Peter - and for anything beyond serial I/O, I'm sure a tethered Pico could deliver a usable data feed/controller for many of the things I dream about doing one day. Personally, I'm not sure I'd ever require sprites etc - if I ever want to play retro games, I'll just buy myself a CMM2.

So if you want to do this, I'll certainly use it - eventually.

I'm afraid I'm struggling to keep up with the pace of development. I'm still working with the first version of the Picomite and have only just received my Waveshare backplane and LCD display etc. So I've already got (too) many interesting new things to explore and learn!

All good (I'm certainly not complaining!) but I'm that guy there at the back of this Marathon, puffing along at the rear and trying to keep up. So if you can find the time to do this work - wonderful - I'll be very happy when I finally come across it further up the road.

:-)

Regards,

IanT

PS Thank you everyone else here for all your hard work and support. I've had a lot of enjoyment from all your efforts. Don't get the chance to say this often enough I'm afraid.
Edited 2022-01-21 07:08 by IanT
 
hitsware2

Guru

Joined: 03/08/2019
Location: United States
Posts: 705
Posted: 09:18pm 20 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  
I am not on any platform digging around in the guts of USB -
absolutely no interest. Wouldn't work anyway, even a few extra
statements on core 1 b...rs the VGA

Didn't You make a similar statement
( not that long ago )
as to the viability of the Pico ?  
my site
 
tgerbic
Newbie

Joined: 25/07/2019
Location: United States
Posts: 40
Posted: 11:22pm 20 Jan 2022
Copy link to clipboard 
Print this post

Took a few minutes to think about this and provide a slightly different set of ideas. Any BASIC running on a modern PC should have some relatively easy way to provide a GUI function for programs.

I would think it would be useful to have a version of PC MMBasic that contained graphics, at least to the level of that in the Explore 100, with similar functioning commands. This code base could use a standard graphics library which would allow it to be compiled to Linux and Windows. This provides a compatible direction for a useful graphics support, cross platform.


Something I miss from the days of the ISA based PCs, S100 or my Apple II, for example, is the ability to have the PC BASIC easily drive hardware pins directly.

A possible and useful extension would be to define a set of IO port addresses defining a standard set of IO ports.  For example sixteen 8-bit IO, eight 16-bit IO addresses, eight I2C ports, eight SPI ports, sixteen A2D ports and sixteen D2A ports, etc. These could be coded into MMBasic to be used with existing MMBasic microprocessor nomenclature. MMBasic could then have compatible PC and PIC (or other microprocessor) hardware to code against.


In the case of microprocessors running MMBasic, BASIC would directly access the microprocessor hardware, as it does today.

In the case of PCs running MMBasic, the PC MMBasic versions could direct the IO out a USB connection to one or more hardware adapter boards.

For simplicity let's look at one example. Let's say we had a firmware that would work on a PIC, Arduino or other microprocessor that would take commands from the PC MMBasic to provide IO requests to the remote microprocessor hardware. From within the PC BASIC program you could configure a pin by defining it like you would for hardware (SETPIN) but BASIC would send the config to a port on the remote hardware board. You could then do a PIN(6) = 1 and BASIC will send a 1 to the configured port on the remote hardware board changing pin 6 to a 1. Could also define pins so you could use the PRINT "Temperature: " DS18B20(15) command, LCD 1, 2, "Hello World" or I2C READ.  

Since there is a bit of hardware and serial communication between the BASIC program and the remote hardware board, IO would be a bit slower but in many cases acceptable. You might not be able to use a rotary encoder on the remote hardware but that function might be in the GUI on the PC instead. I see the external IO more as drivers for SPI, I2C, parallel bits, temp sensors, A/D or D/A, that you would want to control from a PC BASIC application.

Not everything is covered by this idea but it is a place to start thinking about this kind of functionality. It would make a PC based MMBasic appear to have access to hardware pins, consistent with MMBasic running on an actual microprocessor. In a sense, this would be like a virtual ~1024-pin microprocessor running MMBasic with a graphical PC as the console.

This is probably a wild set of ideas but in my case it would help solve the loss of direct IO we had with earlier PCs. Some basic GUI support would allow PC MMBasic to be used in places that now requires us to switch to other variants of BASIC to draw a user interface.  To be honest, I would like to be able to use only MMBasic for PC and microprocessor projects. I would like to make it easier to develop microprocessor BASIC programs on my PC with some ability to access IO connected devices. I would also like to easily be able to use a PC running BASIC to drive equipment and experiments on my electronics bench.

Regards
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 840
Posted: 11:56pm 20 Jan 2022
Copy link to clipboard 
Print this post

Hi Peter,
Thanks for raising it as a 'possibility'.
I for one would use PC-MMBasic.

I grew up on (Fortran then HP58/59s - I wrote code to design the M66-Manchester Outer Ring Road alignment on a calculator!) then QB45 (I even sold some stuff).

I do a fair bit on my PC. But I have to use QB64 on the PC so I can do graphs, file I/O and serial (via USB and real RS232 if you have a port or via a converter).
I use an HC12 via a USB link to input all my MM-device readings and then graph it via QB64.
It is a pain to have to know QB64 and MMBasic dialects (small but annoying differences). MMBasic is, IMHO, far superior! It can do better fonts, and if the code is close enough, can assist porting to MMdevices.

Sorry to ramble but "Yes please" from me.

Cheers,

Andrew
 
yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 167
Posted: 12:15am 21 Jan 2022
Copy link to clipboard 
Print this post

Yes, please.

Steve
 
     Page 2 of 5    
Print this page
© JAQ Software 2024