Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:12 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 Firmware V5.03

     Page 2 of 3    
Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 12:00am 09 Feb 2017
Copy link to clipboard 
Print this post

@evbo

I have started a new post for this topic rather than overtake Geoff's 5.3 release post - hope that's OK?

Doug.

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
piclover
Senior Member

Joined: 14/06/2015
Location: France
Posts: 134
Posted: 04:33am 27 Mar 2017
Copy link to clipboard 
Print this post

  Geoffg said   That is definitely not good. I did some work in that area for 5.3 and I am amazed that such a bog got through testing.

I will fix it (it will take a few weeks before I can get to it).


Bump !

Any news on this front ?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 05:42am 27 Mar 2017
Copy link to clipboard 
Print this post

No, sorry. It is on the list for the next version but it is going to take some more time.

Geoff
Geoff Graham - http://geoffg.net
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 03:25am 06 Apr 2017
Copy link to clipboard 
Print this post

Geoff, a small 'bug' in the V5.03.02 MMBasic Plus Manual.

The top line of page 36 says: Refer to the pinout diagrams in the “Micromite Manual” for the I/O pin numbers to use with the keyboard. in reference to the clock and data pins for the PS2 keyboard.

This should read: Refer to the pinout diagrams in section "Micromite Plus Connections" of this manual for the I/O pin numbers to use with the keyboard.

GregEdited by paceman 2017-04-07
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 11:41am 07 Apr 2017
Copy link to clipboard 
Print this post

Thanks Greg.
Geoff Graham - http://geoffg.net
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 11:08am 08 Apr 2017
Copy link to clipboard 
Print this post

Just wondering if the SSD not connected issue can be addressed at some point in 5.3.

Had a quick look in the release notes & don't see it mentioned.

Noticed previously that PeterM wrote some C-code to check.

Cheers

Phil.
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 09:49pm 20 Apr 2017
Copy link to clipboard 
Print this post

Hi Geoff,

Just noticed that Page 46 of the manual doesn't mention the flash capability of GUI LED.

[Code]The GUI LED can now be instructed to flash, ie, turn on for a short time then
automatically turn off. This is accomplished by setting the value of the LED (using
CtrlVal(#ref) = ) to the number of milliseconds that it should remain on. As before,
setting its value to one will turn it permanently on and zero will turn it off.[/code]

Cheers

Phil.Edited by Phil23 2017-04-22
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 12:42am 21 Apr 2017
Copy link to clipboard 
Print this post

Regarding defining GUI objects.

Is this a feasible suggestion regarding this fragment of code.

  Quote   'Heading Buttons
GUI SETUP 9
GUI Switch SwT1, "Home Page", MM.HRes/4*0,0,MM.HRes/4-2,TabHgt, RGB(Cyan),RGB(Gray)
CtrlVal(SwT1)=0
GUI Switch SwT2, "2nd Page",MM.HRes/4*1,0,MM.HRes/4-2,TabHgt, RGB(White)
CtrlVal(SwT2)=1
GUI Switch SwT3, "3rd Page",MM.HRes/4*2,0,MM.HRes/4-2,TabHgt, RGB(White)
CtrlVal(SwT3)=1
GUI Switch SwT4, "Full Detail",MM.HRes/4*3,0,MM.HRes/4-2,TabHgt, RGB(White)
CtrlVal(SwT4)=1



Could CtrlVal's be initially assigned when the control is defined?

Bit like:-
DIM INTEGER Runtime &
DIM INTEGER Runtime=60

And if so, would it be correct to say it would save 52 bytes of program memory in this example?
CtrlVal(SwT1) being 13 characters in the above.

  Quote   'Heading Buttons
GUI SETUP 9
GUI Switch SwT1=0, "Home Page", MM.HRes/4*0,0,MM.HRes/4-2,TabHgt, RGB(Cyan),RGB(Gray)
GUI Switch SwT2=1, "2nd Page",MM.HRes/4*1,0,MM.HRes/4-2,TabHgt, RGB(White)
GUI Switch SwT3=1, "3rd Page",MM.HRes/4*2,0,MM.HRes/4-2,TabHgt, RGB(White)
GUI Switch SwT4=1, "Full Detail",MM.HRes/4*3,0,MM.HRes/4-2,TabHgt, RGB(White)




Just a thought that came to mind whilst looking at my code.
It's the memory saving with lots of controls & longer names that had me thinking.

Cheers

Phil

Edit: Had to give posting in colour a try.Edited by Phil23 2017-04-22
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 07:04am 21 Apr 2017
Copy link to clipboard 
Print this post

  Phil23 said   Just wondering if the SSD not connected issue can be addressed at some point in 5.3.

Had a quick look in the release notes & don't see it mentioned.

Noticed previously that PeterM wrote some C-code to check.

I cannot reproduce the "bug" that you refer to and there is nothing that I can see in the code that would make the console stop working when a display is removed. I don't know what caused the problem that you and WW experienced but it could a power glitch or a hiccup that upset Tera Term.

Peter's code was related to reading from the display and not the console/LCD interaction.

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

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 07:19am 21 Apr 2017
Copy link to clipboard 
Print this post

  Phil23 said   Regarding defining GUI objects.
Is this a feasible suggestion regarding this fragment of code.
...

I think that I can see what you are suggesting. On the surface it looks good but it introduces a complicated and non obvious syntax. Either way you will be defining a new identifier so the memory usage would be the same.

I don't think that trying to save a few bytes of RAM is worthwhile but if it was important you could just use literal numbers instead of defining constants.

Geoff
Geoff Graham - http://geoffg.net
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 12:50am 22 Apr 2017
Copy link to clipboard 
Print this post

Hello Geoff !

Please try this, look at the Output ! V5.3.0.2



frq = 414000250
print str$(frq,9,0)
frq = frq + 156250
print str$(frq,9,0)

end

OUTPUT:

RUN
414000256
414156512
>


Thank you !

WolfgangEdited by PicFan 2017-04-23
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 01:19am 22 Apr 2017
Copy link to clipboard 
Print this post

Set frq as an integer and then try again. You are outside the resolution of single precision floats
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 01:31am 22 Apr 2017
Copy link to clipboard 
Print this post

ie, use fre% instead of fre

however, this isn't quite right:

i=1000000
Print Str$(i)

> run
10.00000e+05
>



cheers,
rob :-)

addendum: it is actually more simply shown with:
>
> Print 1000000.0
10.00000e+05
>


the ".0" at the end just ensures that the value isn't converted to a 64-bit integer before being printed.Edited by robert.rozee 2017-04-23
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 01:40am 22 Apr 2017
Copy link to clipboard 
Print this post

  matherp said   Set frq as an integer and then try again. You are outside the resolution of single precision floats


With "integer" it works correct !

Thank you !

Wolfgang
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 05:42pm 29 Apr 2017
Copy link to clipboard 
Print this post

  piclover said  I found a bug in v5.03.02: with v5.02 and all former versions, it was legal to pass a float to a function taking an integer as a parameter (an implicit float to integer conversion happened). Now, MMBASIC, without complaining about the parameter type, sets the parameter to 0 whenever a (non-zero) float is passed...

Simplified repro code:

OPTION EXPLICIT
DIM FLOAT presslog(24)

presslog(24)=1013
LogData(presslog(24))

SUB LogData(p AS INTEGER)
PRINT p
END SUB
This wrongly prints "0" instead of "1013"...

I have finally got the time to start on the bug list and this is one of the first that I have found and fixed - the fix will be in the next version.

But I just wanted to say a big thanks for the succinct demo code, it was a huge help in nailing a subtle bug.

Geoff
Geoff Graham - http://geoffg.net
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 11:11pm 29 Apr 2017
Copy link to clipboard 
Print this post

Hello Geoff, hello Peter M. !

First of all thank you for your fantastic work, it is great.

I have a little problem with "Control C" and "Continue". It ist only with Version V5.3, Micromite MK2 and Micromite plus explore 64. V5.2 works correct.

Please, try this !


OPTION EXPLICIT
OPTION DEFAULT INTEGER

DIM A$
DIM x
DIM z

REM TEST 1 OK

DO
PRINT "ABC"
PAUSE 200
LOOP

"RUN"

ABC
ABC
ABC
...

"Control C"
>
"CONTINUE"

ABC
ABC
...

--------------------------

REM TEST 2 FAIL

DO
a_SUB1("XYZ")
LOOP

"RUN"

XYZ
XYZ
...

"Control C"
>
"CONTINUE"

[8] Loop
Error: LOOP without a matching DO

---------------------------

REM TEST 3 FAIL

DO
a_SUB1("XYZ")
x = z
LOOP

"RUN"

XYZ
XYZ
...

"Control C"
>
"CONTINUE"

[8] x = Z
ERROR: X not declared

---------------------------

REM TEST 4 FAIL

DO
z = a_FUNC1(5)
PRINT z
LOOP

"RUN"

15
15
...

"Control C"
>
"CONTINUE"
>
"CONTINUE"
>

With a "Function" Continue works not !
---------------------------

REM SUBROUTINE and FUNCTION

sub a_SUB1(a$)
print a$
pause 200
end sub

function a_FUNC1(b)
a_FUNC1 = b * 3
pause 200
end function



I use MM-EDIT 3.7.0

Thank you !

WolfgangEdited by PicFan 2017-05-01
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 11:48pm 29 Apr 2017
Copy link to clipboard 
Print this post

I will look at it but my first instinct is to remove CONTINUE entirely.

CONTINUE worked well in the early versions of MMBasic which were much simpler (without subs, CFunctions, etc). But now the interpreter needs to keep track of so many different states (eg, is it inside a function? is it timing a temperature measurement? etc) that it is almost impossible to restore everything after a break.

Geoff
Geoff Graham - http://geoffg.net
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 07:48am 30 Apr 2017
Copy link to clipboard 
Print this post

Hello Geoff !

Please try this !


option autorun on
option explicit
option default integer

dim test1 = 3

on error skip
RTC gettime
if (mm.errNO <> 0) then
print "RTC NICHT VORHANDEN, interne Uhr wird verwendet !"
print ""
endif
print test1

end


"RUN"

RTC NICHT VORHANDEN, interne Uhr wird verwendet !

ERROR: test1 not declared !


Thank you !

Wolfgang
 
rentner111
Newbie

Joined: 18/03/2014
Location: Austria
Posts: 19
Posted: 07:57am 30 Apr 2017
Copy link to clipboard 
Print this post

Hello Geoff!

First - the Mikromite with your MM-Basic is the best for hobby programming in Basic of all times.

I've already written some programs and used them. The programs are partly up to 40kB.

but:

I had to go back to Version V5.2 from version V5.3B10.

The key function Control-C and the subsequent CONTINUE no longer works if a SUB is present in the program.

Again: in version B5.2, CONTINUE works flawlessly, but in version B5.3 no longer works.

Please DO NOT remove the CONTINUE function as it makes debugging and testing the hardware very easy for large projects.

Thank you in advance
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 08:25am 30 Apr 2017
Copy link to clipboard 
Print this post

  PicFan said   Hello Geoff !

Please try this !


option autorun on
option explicit
option default integer

dim test1 = 3

on error skip
RTC gettime
if (mm.errNO <> 0) then
print "RTC NICHT VORHANDEN, interne Uhr wird verwendet !"
print ""
endif
print test1

end


"RUN"

RTC NICHT VORHANDEN, interne Uhr wird verwendet !

ERROR: test1 not declared !


EDIT: Problem only with V5.3. V5.2 no ERROR.

Thank you !

Wolfgang
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025