Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:42 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 : Micromite MMBasic Ver 5.05.02 Beta

     Page 1 of 4    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 01:54am 12 Dec 2018
Copy link to clipboard 
Print this post

A new beta version of the Micromite firmware V5.05.02 (Beta 1) is available for anyone who would like to play with it.

This can downloaded from: http://geoffg.net/micromite.html
Look for "Micromite Firmware V5.05.02 Beta Test Version" at the bottom of the page.

Apart from a couple of minor changes the main feature of this release is the ability to trigger an interrupt on a serial port when a certain character has been received. The number used in the fifth field in the comspec string can now be prefixed with an equals character (=) and in that case MMBasic will call the interrupt subroutine when a character with that ASCII value has been received (rather than a certain number of characters).

There was some discussion on this forum as to if this feature was really necessary however in testing I have found it quite useful. For example, I had an application where interrupts were needed to get a line from a GPS module. Previously an interrupt was required on each character, now only one interrupt is needed when a carriage return character is received.

The idea of the beta versions is to test new features and bug fixes that have the potential break something else within the interpreter. I will keep updating the beta version until it is stable and then make it into a final release. If you find any issues or bugs in this beta please report them in this thread and I will try to fix them ASAP.

Thanks
Geoff
Geoff Graham - http://geoffg.net
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 02:21am 12 Dec 2018
Copy link to clipboard 
Print this post

Thanks Geoff,

I see you have also changed the CLOSE command to wait until the last character has been sent before closing the port. Does it wait until it has actually been sent or until the buffer is empty? Also, do you plan the same update for the DOS version?

Bill
Keep safe. Live long and prosper.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 08:21am 12 Dec 2018
Copy link to clipboard 
Print this post

  Turbo46 said  Does it wait until it has actually been sent or until the buffer is empty?

It actually waits for the last character to be clocked out of the hardware UART. So nothing will be lost.

  Turbo46 said  Also, do you plan the same update for the DOS version?

No. In the Windows/DOS version writes are not buffered so any command that writes to a serial port will only return when all the data has been sent. There may be one last character being clocked out of the hardware UART but a CLOSE should not disturb it.
Geoff Graham - http://geoffg.net
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 08:43am 12 Dec 2018
Copy link to clipboard 
Print this post

Great! Thanks Geoff.

Merry Christmas
Bill
Keep safe. Live long and prosper.
 
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 186
Posted: 10:30am 12 Dec 2018
Copy link to clipboard 
Print this post

Hi Geoff,

Thanks for the ability to trigger the interrupt on a specific received character value. It appears to be working as expected. So far I have only done a fairly simple test, using an ETX character (CHR$(3)) as the End Sentinel and it correctly detected the end of every message I threw at it with just the one interrupt per message. I will test further as soon as time permits.

Phil.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 07:27pm 12 Dec 2018
Copy link to clipboard 
Print this post

Can the long string functions be added to the DOS version?

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

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 02:36am 13 Dec 2018
Copy link to clipboard 
Print this post

They could be. The other option is to increase the default size of strings to 1K or even 2K (there is plenty of memory on a PC). I will look at both options.
Geoff Graham - http://geoffg.net
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 03:39am 13 Dec 2018
Copy link to clipboard 
Print this post

Thanks for looking. On the Pi-cromite I'm currently reading in an HTML template file which is 6K long. I'd like to run basically the same code (without i/o, of course) on mmbasic DOS.

Edited by lizby 2018-12-14
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 08:28am 13 Dec 2018
Copy link to clipboard 
Print this post

  Quote  I'd like to run basically the same code (without i/o, of course) on mmbasic DOS.


lizby: It would be very easy for you to add my longstring commands to your own version of MMBasic for DOS. Download Geoff's source and get yourself set up to compile/link it. Then download the MMX source. Once you have got this working I can provide very simple instructions as to how to copy/paste them across - no coding needed.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 01:58pm 13 Dec 2018
Copy link to clipboard 
Print this post

matherp--that's a very generous and tempting offer to get myself familiar with the process. I will put that somewhat high up on my to-do list--if the offer remains open. Copy and paste would be good for starters--I have written a lot of C code, but that was mostly over 30 years ago, so I'm rusty. Can still read it pretty well unless it's hard-core C++. Are there instructions somewhere on the compile/link process for the DOS mmbasic code under Windows.

Meanwhile, upon reflection overnight, I realized that I can easily enough rewrite my code to just read the HTML template file whenever there is a need to update--on a PC, any delay in execution is not likely to be noticeable.

Thanks for consideration and suggestions.
Edited by lizby 2018-12-15
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 01:22am 14 Dec 2018
Copy link to clipboard 
Print this post

how many different variants on mmbasic would that leave us with? i am just a little concerned that the language may be fragmenting.

it seems that we now have, with differing abilities and features the following hardware: MX170, MX470, MZ, ST micro, RPi. core features that vary are: single/double precision, long/short strings, other things???

does a chart exist detailing this all yet?

one option (no pun intended) would be for the interpreter to default to regular strings, then have a (non-permanent) OPTION LONGSTRING ON|OFF. the same could perhaps be done for single/double precision. this would at least mean default behaviour would be consistent, and any program that used long strings or double precision would throw an error if not supported.

note: this idea may be impractical due to the flash overhead of supporting both sets of routines.


cheers,
rob :-)

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 08:22am 14 Dec 2018
Copy link to clipboard 
Print this post

  Quote  it seems that we now have, with differing abilities and features the following hardware: MX170, MX470, MZ, ST micro, RPi. core features that vary are: single/double precision, long/short strings, other things???


Its not such an issue:

All versions are double precision except the basic MM2
All versions use normal strings, my versions have Geoff's longstring CFunctions embedded as separate additional built in commands/functions
All versions support core MMBasic using identical code
Additional capabilities and any other differences are identified in add on manuals, MM+, Pi-cromite, MMX, Armmite H7, Armmite L4 (to be written)

My proposal to lizby was simply that he builds himself, for his own usage only, a version of MMBasic for DOS with the LONGSTRING commands and functions added, something that Geoff's architecture makes trivial to inplementEdited by matherp 2018-12-15
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 03:55pm 14 Dec 2018
Copy link to clipboard 
Print this post

@Peter:

In your (I think last manual) "2018-11-29_210840_Micromite_eXtreme_Manual.pdf" on page 6 you can read that the Micromite Plus has only single Floating Point Precision... - that irritated me a little...

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8584
Posted: 10:44pm 14 Dec 2018
Copy link to clipboard 
Print this post

  Quote  that irritated me a little...


Are you easily irritated?

The MM+ was single precision until a very recent release - I am really really sorry that I didn't update the MMX manual with this change - sorry , sorry, sorry!!!!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 11:22pm 14 Dec 2018
Copy link to clipboard 
Print this post

Easy to check for double/single precision

  Quote   IF isdouble() THEN
PRINT "Double precision"
ELSE
PRINT "Single Precision"
ENDIF

FUNCTION isdouble()
LOCAL x AS FLOAT
x =
5000000000
IF x <> x + 1 THEN isdouble = 1
END FUNCTION


Jim
VK7JH
MMedit   MMBasic Help
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 02:27am 15 Dec 2018
Copy link to clipboard 
Print this post

Hi Peter,

Where can one find the latest documentation etc. on the Micromite Extreme? Maybe the Document Register would be a good place?

Bill

PS Don't be too offended, English is not Frank's first language.
Keep safe. Live long and prosper.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 04:10am 15 Dec 2018
Copy link to clipboard 
Print this post

Latest MMX manual in this thread:
https://www.thebackshed.com/forum/forum_posts.asp?TID=10946&PN=3

Jim
VK7JH
MMedit   MMBasic Help
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1593
Posted: 09:27am 15 Dec 2018
Copy link to clipboard 
Print this post

Thanks Jim,

Peter's work is too valuable to be sprinkled through the forum and too hard to find even when you know its there. As is yours, TimeLord and FontTweak are two that I have found (not to mention MMEdit). I think they should be in the Document Register. If you and Peter don't have the ability to put stuff in there then maybe Gizmo could give it to you.

Thank you both.

Gizmo?

Bill
Keep safe. Live long and prosper.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 813
Posted: 09:56am 15 Dec 2018
Copy link to clipboard 
Print this post

Excuse me, Peter, I really didn't mean to attack you with this!!!! What you did is phenomenal and creating the documentation is really a lot of work! That the events can overtake the documentation is only natural!
I was only recently looking for a platform with double Precision and was no longer sure if the Micromite Plus really supports this...
It really wasn't an attack on you and I really appreciate your work!!!!!
I hope you didn't misunderstand me!!!
If you do, I want to apologize to you!

Frank
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 02:44pm 15 Dec 2018
Copy link to clipboard 
Print this post

Is it reasonably possible, and would it make sense, to have an MM.LINENO variable which would return the current line number, so that you could, for instance, log info with an indication of what line number you are on, e.g.?

PRINT MM.LINENO;" variable A now has value of "+A

I sometimes hard code line numbers, but, of course, they shift.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
     Page 1 of 4    
Print this page
© JAQ Software 2024