Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Micromite MMBasic Ver 5.04.10 Beta Post ReplyPost New Topic
Page of 6 Next >>
Author
Message << Prev Topic | Next Topic >>
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2446
Posted: 14 August 2018 at 2:01pm | IP Logged Quote Geoffg

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




Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Azure
Guru
Guru
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Offline
Posts: 446
Posted: 14 August 2018 at 9:45pm | IP Logged Quote Azure

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 on 14 August 2018 at 11:43pm
Back to Top View Azure's Profile Search for other posts by Azure
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2446
Posted: 14 August 2018 at 11:47pm | IP Logged Quote Geoffg

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.
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Azure
Guru
Guru
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Offline
Posts: 446
Posted: 15 August 2018 at 12:12am | IP Logged Quote Azure

Geoffg wrote:
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.
Back to Top View Azure's Profile Search for other posts by Azure
 
Azure
Guru
Guru
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Offline
Posts: 446
Posted: 15 August 2018 at 12:46am | IP Logged Quote Azure

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)
at the start and it works. I think that confirms the foreground colour is defaulting to black


Edited by Azure on 15 August 2018 at 1:05am
Back to Top View Azure's Profile Search for other posts by Azure
 
robert.rozee
Guru
Guru


Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 1315
Posted: 15 August 2018 at 3:05pm | IP Logged Quote robert.rozee

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 on 15 August 2018 at 3:10pm
Back to Top View robert.rozee's Profile Search for other posts by robert.rozee
 
Azure
Guru
Guru
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Offline
Posts: 446
Posted: 15 August 2018 at 4:59pm | IP Logged Quote Azure

@ 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.
Back to Top View Azure's Profile Search for other posts by Azure
 
Zonker
Guru
Guru
Avatar

Joined: 18 August 2012
Location: United States
Online Status: Offline
Posts: 702
Posted: 15 August 2018 at 8:13pm | IP Logged Quote Zonker

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
Back to Top View Zonker's Profile Search for other posts by Zonker
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2446
Posted: 15 August 2018 at 8:26pm | IP Logged Quote Geoffg

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 wrote:
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
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
robert.rozee
Guru
Guru


Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 1315
Posted: 15 August 2018 at 10:18pm | IP Logged Quote robert.rozee

Geoffg wrote:
robert.rozee wrote:
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 on 15 August 2018 at 10:23pm
Back to Top View robert.rozee's Profile Search for other posts by robert.rozee
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2446
Posted: 15 August 2018 at 10:39pm | IP Logged Quote Geoffg

Great detective work Rob, thanks.
Now, all I have to do is remember what I was trying to do there (and why).
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Azure
Guru
Guru
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Offline
Posts: 446
Posted: 16 August 2018 at 9:55am | IP Logged Quote Azure

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 on 16 August 2018 at 9:59am
Back to Top View Azure's Profile Search for other posts by Azure
 


Page of 6 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1406 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.14