Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:08 02 Aug 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 : Micromite MMBasic Ver 5.04.10 Beta

     Page 1 of 4    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 04:01am 14 Aug 2018
Copy link to clipboard 
Print this post

A new beta version of the Micromite firmware V5.04.10 (Beta 8) 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.04.10 Beta Test Version" at the bottom of the page.

New in this version (Beta 8) is the ability to embed OPTION commands for configuring LCD panels, touch, etc in a program. To support this feature a new command, OPTION SAVE has been introduced. This should be placed after the last OPTION command in a program and will trigger a bulk save of all the options that were previously set in the program. For details see the file "Configuration Options in a Program.pdf" in the beta distribution zip file.

Other features introduced in previous beta versions include:
• Fixed an issue with glitches in the PWM output waveform.
• When the Micromite is first powered up it will no longer rewrite its flash memory.
• Improved the speed of string operations by up to 10%.
• Added the GUI GAUGE and GUI BARGAUGE controls for displaying multicoloured circular and bag gauges.
• The GUI TEXTBOX keyboard has extra keys on all layouts for cancel, delete and space.

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.

Geoff


Geoff Graham - http://geoffg.net
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 11:45am 14 Aug 2018
Copy link to clipboard 
Print this post

Just spotted something strange in Beta 8 build

This code
Dim i As integer, ms As string
sub pwmstep intensity, delayms
PWM 2,200,intensity
Text 20, 40, "Intensity "
Text 100, 40, Str$(intensity)
Pause delayms
end sub

ms = mm.device$ + " " + str$(mm.ver,1,4)
text 20, 20, ms

For i = 0 To 100
pwmstep i, 200
Next i

For i = 100 To 0 step -1
pwmstep i, 200
Next i

pwmstep 40,0
End


With firmware 5.04.09 is works fine and displays on the LCD with changing brightness
> print "Hw:"MM.DEVICE$" - firmware:"MM.VER
Hw:Micromite MkII - firmware: 5.0409
>
> option list
OPTION LCDPANEL ILI9341, LANDSCAPE, 2, 23, 6
OPTION TOUCH 7, 15
>


With firmware 5.04.10 Beta 8 it doesn't display anything on the LCD but the display brightness goes up and down and the new GUI CALIBRATE line shows up in the options list, options were all set via command prompt.
> print "Hw:"MM.DEVICE$" - firmware:"MM.VER
Hw:Micromite MkII - firmware: 5.041
>
> option list
OPTION LCDPANEL ILI9341, LANDSCAPE, 2, 23, 6
OPTION TOUCH 7, 15
GUI CALIBRATE 0, 3941, 3851, -887, -652
>


With firmware 5.04.10 Beta 4 and Beta 7 it also works fine on the display, just like 5.04.09 does and no extra options listed.

Tested on 2 different MM LCD Backpacks just to be sure.Edited by Azure 2018-08-15
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 01:47pm 14 Aug 2018
Copy link to clipboard 
Print this post

The GUI CALIBRATE line is there to support programs that want to embed the configuration options (including the touch calibration) in a program.

I am not sure what you mean by "Beta 8 it doesn't display anything on the LCD". Do you mean that the display is completely blank? That is strange, I will setup a test rig in the morning.
Geoff Graham - http://geoffg.net
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 02:12pm 14 Aug 2018
Copy link to clipboard 
Print this post

  Geoffg said   The GUI CALIBRATE line is there to support programs that want to embed the configuration options (including the touch calibration) in a program.


Yes, I edited the post after I read up on the new feature. Seems like a very nice new feature.

  Quote   I am not sure what you mean by "Beta 8 it doesn't display anything on the LCD". Do you mean that the display is completely blank? That is strange, I will setup a test rig in the morning.


Correct display is blank with Beta 8. 5.0410 Beta 7, 5.0410 Beta 4 and 5.0409 are all ok. Tried on 2 different hardware setups going backwards and forwards in FW on both and problem appears only in Beta 8. Options setup uaing command prompt.

Test sequence was:
Load firmware
Setup lcdpanel and test (gui test lcdpanel displays ok)
Setup Touch and test (gui test touch displays ok)
Load program (listed in post above) and run it (display blanks and no text appears, you can see backup intensity go up and down while program runs)

I will have a try using the new program save options.
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 02:46pm 14 Aug 2018
Copy link to clipboard 
Print this post

I did some more testing.

I tried cls and cls rgb(colour) with various colours and they work.

When I run the program it just blacks the background where the font would be.

If I add the colours to the text commands it works. I also added a line command just to see if it worked, it is also black if the colour is not specified.

So I think the default foreground and background colour is black.

Here is the updated program that works specifying the text and line colours.
Dim i As integer, ms As string
Sub pwmstep intensity, delayms
PWM 2,200,intensity
Text 20, 40, "Intensity ",l,1,2,RGB(blue), RGB(yellow)
Text 100, 40, Str$(intensity),l,1,1,RGB(green)
Line i, i, MM.HRes - i, MM.VRes - i, 10, RGB(red)
Pause delayms
End Sub

ms = MM.Device$ + " " + Str$(MM.Ver,1,4)
Text 20, 20, ms

For i = 0 To 100
pwmstep i, 200
Next i

For i = 100 To 0 Step -1
pwmstep i, 200
Next i

pwmstep 40,0
End


Edited the code (as per below) to go back to default colours but specified background and text is black by default.

Dim i As integer, ms As string
Sub pwmstep intensity, delayms
PWM 2,200,intensity
Text 20, 40, "Intensity ",,,,, RGB(yellow)
Text 100, 40, Str$(intensity),,,,,RGB(green)
Line i, i, MM.HRes - i, MM.VRes - i, 10, RGB(red)
Pause delayms
End Sub

ms = MM.Device$ + " " + Str$(MM.Ver,1,4)
Text 20, 20, ms,,,,, RGB(magenta)

For i = 0 To 100
pwmstep i, 200
Next i

For i = 100 To 0 Step -1
pwmstep i, 200
Next i

pwmstep 40,0
End


I went back to the first program (no colours specified) and add the line [quote]colour rgb(white)[/quote] at the start and it works. I think that confirms the foreground colour is defaulting to black
Edited by Azure 2018-08-16
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 05:05am 15 Aug 2018
Copy link to clipboard 
Print this post

now for something a little bit obscure...

an odd behaviour in Ver 5.04.10 Beta 6, though i suspect it is in all versions; when sitting idle in the editor, every 6695 seconds (or thereabouts) the editor sends out the following character sequence:
ESC[24;56HLn: 636 Col: 1 INSESC[22;1H

i've not looked at the editor source, but am picking there is a counter in there overflowing! the intended behaviour is probably that after a certain (short) period of silence the editor updates the line/column counters. except the counter then carries on counting up until it wraps around.


cheers,
rob :-)
Edited by robert.rozee 2018-08-16
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 06:59am 15 Aug 2018
Copy link to clipboard 
Print this post

@ Rob

Wow that's a long wait... almost 2 hours. Is that on a MM or MM Plus. I can set one up (A MM BP V2 or MM Plus 64 BP) and let it run to see if it happens on my H/W.
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 10:13am 15 Aug 2018
Copy link to clipboard 
Print this post

A big thank you Geoff for the addition of the new internal Gauges to the new firmware..! Currently using both types in the DIN panel instrument design for the engine information system I'm trying to get done... Currently using 6 20 segment bar type gauges for CHT ant EGT thermo temps... Will be using the round gauge for RPM... The design uses the 470 MPU...
2018-08-15_201238_DIN_Panel_MPU_Engine.pdf
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 10:26am 15 Aug 2018
Copy link to clipboard 
Print this post

Thanks John (Azure), yes the default colour was set to black

I have fixed it and uploaded a new beta (Beta 9) which, as usual, can be downloaded from: http://geoffg.net/micromite.html
Look for "Micromite Firmware V5.04.10 Beta Test Version" at the bottom of the page.

This beta "might" also fix the gap in the PWM output (fingers crossed).


  robert.rozee said  an odd behaviour in Ver 5.04.10 Beta 6, though i suspect it is in all versions; when sitting idle in the editor, every 6695 seconds (or thereabouts) the editor sends out the following character sequence:
ESC[24;56HLn: 636 Col: 1 INSESC[22;1H


That is odd indeed. ESC[22; and ESC[24; are not used in the editor - in fact I don't know what they do. The fact that they are in clear text implies that they were recieved by the Micromite. Are you sure that they are not created by some function in your terminal emulator?

Geoff
Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 12:18pm 15 Aug 2018
Copy link to clipboard 
Print this post

  Geoffg said  
  robert.rozee said  an odd behaviour in Ver 5.04.10 Beta 6, though i suspect it is in all versions; when sitting idle in the editor, every 6695 seconds (or thereabouts) the editor sends out the following character sequence:
ESC[24;56HLn: 636 Col: 1 INSESC[22;1H

That is odd indeed. ESC[22; and ESC[24; are not used in the editor - in fact I don't know what they do. The fact that they are in clear text implies that they were recieved by the Micromite. Are you sure that they are not created by some function in your terminal emulator?
Geoff


oops, i probably should have been clearer - the ESC (red italics) is meant to represent character 27. the sequence does the following:
1. position the cursor on line 24, column 56
2. print the string "Ln: 636 Col: 1 INS"
3. position the cursor at line 22, column 1 (where is was before)

the text is produced by PrintStatus(void) in editor.c and is being called from here:

statuscount = 0;
do {
ShowCursor(true);
c = MMInkey();
if(statuscount++ == 5000) PrintStatus();
} while(c == -1);
ShowCursor(false);


one solution would be to split the offending line up into two parts:

statuscount = 5000;
do {
ShowCursor(true);
c = MMInkey();
if(statuscount == 0) PrintStatus();
if(statuscount >= 0) statuscount--;
} while(c == -1);
ShowCursor(false);


i've set the initial value high and count down in order to allow the encoding of the checks (==0 and >=0) to potentially be better optimized by the compiler.

btw: why is ShowCursor(true) called continuously in a loop? it could be pushed up to before the do and only run once. also, if you wanted to be really thrifty on power consumption, it may be possible (on the MX170 at least) to slow the CPU down to 5MHz while waiting in the loop. the same could possibly also be done while waiting at the command prompt.

i've not looked at what is inside ShowCursor(), but on an MX170 it does not hide/show the cursor. there is an escape sequence to do this - and it is most likely implemented in teraterm and most other terminal editors, not yet in GFXterm (but i can easily add it). personally, i find the dancing cursor a rather helpful diagnostic!


cheers,
rob :-)Edited by robert.rozee 2018-08-16
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 12:39pm 15 Aug 2018
Copy link to clipboard 
Print this post

Great detective work Rob, thanks.
Now, all I have to do is remember what I was trying to do there (and why).
Geoff Graham - http://geoffg.net
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 11:55pm 15 Aug 2018
Copy link to clipboard 
Print this post

Beta 9 fixed default background colour back to white.

Beta 9 I can confirm new OPTION SAVE command works.
Tested on MM LCD BP V2.
Values for program obtained from command line configuration then option list.
New MM 05.04.10 Beta 9 firmware loaded.
Confirmed memory 100% available and no options set.
Program with OPTIONs at start including LCD, TOUCH and GUI Calibration loaded.
Program run

Worked as if it had been previously configured.
Confirmed LCD and TOUCH setup correctly (with GUI TEST LCDPANEL/TOUCH and OPTION LIST).


Great work Geoff, can't wait to see what comes next.
Edited by Azure 2018-08-17
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 01:49am 19 Aug 2018
Copy link to clipboard 
Print this post

V5.04.10 beta test update...

I finally got some play time with the new beta release and I think I found something strange... I was working with the EIS panel design (PDF schematic above) and loaded up the beta firmware to have a go with the new bar gauge GUI objects...

The design uses the onboard USB for the console talking to Teraterm. So, after loading, I setup the onboard 2.2" LCD Display - option lcdpanel ILI9341,L,28,31,27

After rebooting, the USB port stopped working with windows.. Whats going on I said...
I re flashed the MPU again to be sure... Yep, same thing...

I had originally did the program work using the v5.04.08 release of the firmware...
I had not downloaded the v5.04.09 release, but did so now to go back one step...
After flashing it and setting up the display, it did the same thing.. (USB quit working).. By now, I was thinking.. Did I somehow brake the hardware..??

Nope..! I went back to v5.04.08 release and after flashing and display setup, everything is back to normal... All hardware working as expected....

So, next I went back and repeated the same sequence of version flashing to confirm what I had observed... Same results... So, I wanted to post my findings here to provide the feedback on this thread... Interesting stuff... I didn't think that v5.04.09 would behave the same as v5.04.10... Edited by Zonker 2018-08-20
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 02:35am 19 Aug 2018
Copy link to clipboard 
Print this post

@Zonker
I assume you are NOT using Windows 10.
There is definitely some issue with recent firmware that the USB driver used by all versions of Windows except W10.

This post covers it:
https://www.thebackshed.com/forum/forum_posts.asp?TID=10722&PN=1

I don't have any diagnostics that will run on XP, the only Windows I have except W10, but I expect that it is a timing issue.

Jim
VK7JH
MMedit
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 03:00am 19 Aug 2018
Copy link to clipboard 
Print this post

@Zonker

Just out of curiosity what MM Hardware setup are you using?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 03:16am 19 Aug 2018
Copy link to clipboard 
Print this post

I did make a small change to the USB interface in V5.04.09. I cannot remember exactly what it was now so I will have to dig back through my records. Can anyone else replicate this issue?

Geoff
Geoff Graham - http://geoffg.net
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 03:43am 19 Aug 2018
Copy link to clipboard 
Print this post

Wow.. Thanks Jim..! I did not know that... Currently using Win 7 here...

I read through the thread you posted, but I am a little confused by it all...
Why does everything work ok until I setup the ILI9341 display..??

I am running the board off of USB power from a powered USB hub..
I can provide external power to see if that works...
I am using the Silicon Chip driver for win 7...

Also, why is it when I go back to v5.04.08 that everything works OK..??

I wasn't planing to "upgrade" this computer to Win-10...

Not sure what the next move should be... I do want to try out v5.04.10 firmware and play with the new GUI bar gauge objects but not sure what my options are to resolve this issue... Thanks in advance for any insight you could provide..!!

EDIT: - Thanks everyone for responding.. I was away for a bit and didn't refresh the page to see the new post entries from Geoff and azure Edited by Zonker 2018-08-20
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 03:45am 19 Aug 2018
Copy link to clipboard 
Print this post

I think Zonker makes 4 including me who have posted here. But I only used the USB as a test, never use it normally.

Jim
VK7JH
MMedit
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 04:40am 19 Aug 2018
Copy link to clipboard 
Print this post

Ok... I will wait for Geoff's response before going any further..

@Azure
  Quote  Just out of curiosity what MM Hardware setup are you using?


I designed a set of boards that fit into a DIN panel box I can get from Turkey..
I wanted to code up an EIS to use for Ultralight aircraft use... It has 3 boards in the design, the MPU engine board, power plus board and the temp input board..



the 2.2" LCD display fits just right and after doing several other design projects, I am trying to get back to work on this one.. I like the box, as it is still small enough to not take up to much room in the cockpit panel of the airplane and has a simple set of buttons to change display screens without using "touch" on the display...

If others are interested, I can layout different PCB's for the 2 other boards and just provide a "sea of holes" to allow prototyping of what ever you want on them...

Externally, the box lets you have 2 12 pin connectors to interface to the "outside world"...

Here is the info on the 2 boards I made that plug into the MPU engine board...

2018-08-19_143731_DIN_Panel_PWR-PLUS_Plug-in.pdf

2018-08-19_143819_DIN_Panel_LTC2983_Temp_Plug-in.pdf

I hope this answers your question..!

 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 04:52am 19 Aug 2018
Copy link to clipboard 
Print this post

Sorry I should have been clearer in my question, I got half the answer, now what MM chip you are using?

Only asking so I can have a play as well (I don't normally use the USB interface). That will be when I have a moment (working on a film set today, so cannot do it right now).
 
     Page 1 of 4    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025