Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:09 29 Apr 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 : DOS MMBasic

Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 05:13pm 14 Jan 2017
Copy link to clipboard 
Print this post

Until my Micromites arrive, I'm trying to play with the DOS version of MMBasic. This is version 4.5, from 2014. It lacks many of the features of the newer versions.

I can use MMedit to edit my basic file, then go to DOS and enter:

mmbasic myprog.bas

Then I hit on a syntax error. I've made some progress, but now I'm stuck again. I'll use this thread for continuing questions.

I'm trying to open COM1 (a usb/serial module). I've tested it with putty--opened at 9600 baud, and with Rx looped back to Tx, can see what I type.

After removing the usb module and re-inserting it, seeing COM1 appear again, I run my basic program, but get an error when I try to open COM1 with this line:

open "COM1:9600" as 1

I get this error: Error: Invalid Syntax

Same if I omit 9600.

Do the Windows COM ports work with MMBasic?


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

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 05:29pm 14 Jan 2017
Copy link to clipboard 
Print this post

  lizby said  

Do the Windows COM ports work with MMBasic?



No.
No IO and no graphics.

In the Maximite V4.5 manual, there is a column with the devices that each command runs on.

CMM - colour maximite, MM - mono maximite and DOS for the DOS version

You can run DOS MMBasic directly from MMEdit.
File/Run in DOS
or the 5th button from the right.

The first time you run it, you will be asked to give the path to the MMBasic exe.

Jim
VK7JH
MMedit   MMBasic Help
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 06:39pm 14 Jan 2017
Copy link to clipboard 
Print this post

  TassyJim said  
  lizby said  
Do the Windows COM ports work with MMBasic?

No.

That's too bad. That shuts down that little trick. I was hoping to communicate between MMBasic and the Nextion OLED simulator, which can take input from a COM port. Crossover Tx & Rx on two usb/serial devices, and you could control the OLED (in simulation), with MMBasic, without having a Micromite, through real serial ports.

Guess I'll just have to wait for my parts to arrive.

At this point, it shouldn't take me long once the Maximite and MuP V2 arrive.

(Famous Last Words, anyone?)

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

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 04:02am 15 Jan 2017
Copy link to clipboard 
Print this post

  lizby said  

Guess I'll just have to wait for my parts to arrive.



probably for the best, just this thread and your other have demonstrated there are many differences between the MMBasic for DOS and what you can do on the uM. As the DOS version is quite old I wonder if GeoffG has any plans to maintain it - is it even something that would fill a hole?


A world of amazement awaits Edited by CaptainBoing 2017-01-16
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 04:40am 15 Jan 2017
Copy link to clipboard 
Print this post

  CaptainBoing said   ... MMBasic for DOS ... is it even something that would fill a hole?


It would fill this tiny hole I'm perceiving while awaiting my parts, but evaluating that with respect to other enhancements which Geoff might be planning--well, I don't think DOS should rank very high.
Edited by lizby 2017-01-16
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 05:18pm 15 Jan 2017
Copy link to clipboard 
Print this post

For anyone who might be interested, or who might want to play with the Nextion OLED simulator in preparation for using it with the Micromite, the technique I failed to get working with DOS MMBasic works with FreeBasic.

A FreeBasic program can write to a com port (e.g., a usb/serial module). If that module is crosswired to a second usb/serial module (Tx->Rx,Rx->Tx), the Nextion simulator can connect to it.

The Nextion simulator sends codes to the basic program (so far I use 2-byte codes--the first signifies either a page change or a button release, the second which page or which button). The basic program sends commands to the Nextion (e.g., to populate fields with values or to do any of the many other possible things).

The change from FreeBasic syntax to MMBasic will be fairly straightforward, so I hope to be able to control the Nextion from the Micromite fairly quickly once my parts arrive.

My basic program is too jumbled for sharing right now with my attempt to get it working, but if someone wants I should probably be able to post something tomorrow (U.S. Eastern time). I will definitely post once the Micromites arrive.

I think it's pretty cool to use simulated hardware (in this case, the Micromite) to control other simulated hardware (the Nextion OLED display) through real hardware (two usb/serial modules).


PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024