Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:27 12 Nov 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 : MM Extreme 64 not enough memory

Author Message
astro1
Regular Member

Joined: 26/06/2016
Location: Australia
Posts: 53
Posted: 06:13am 11 Nov 2018
Copy link to clipboard 
Print this post

Running the code below exits with not enough memory. Uncomment line 12 (print date$, time$) and no error. date & Time are the same from line 9. (This is a reduce version of the code being run).

MM Extreme 64, Ver 5.04.18 @ 252MHz,
OPTION CPU 252
OPTION LCDPANEL SSD1963_4, LANDSCAPE
OPTION TOUCH 12, 14
OPTION SDCARD 18,
OPTION RTC 5, 6
OPTION HEARTBEAT ON

Results when run.
11-11-2018 05:59:48
[13] UTC = GetSec(Val(Right$(Date$, 2)), Val(Mid$(Date$, 4, 2)), Val(Left$(Date$, 2)), Val(Left$(Time$, 2)), Val(Mid$(Time$, 4, 2)), Val(Right$(Time$, 2)))
Error: Not enough memory



-----------------------------------------
' MMX
option explicit
option default none
Dim Integer tyear, tmth, tday, tdow, thour, tmin, tsec, tdst
Dim Integer md(12) = (0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334)
Dim integer UTC
'
cls
print date$, time$
UTC = GetSec(Val(Right$(Date$, 2)), Val(Mid$(Date$, 4, 2)), Val(Left$(Date$, 2)), Val(Left$(Time$, 2)), Val(Mid$(Time$, 4, 2)), Val(Right$(Time$, 2)))

'print date$, time$
UTC = GetSec(Val(Right$(Date$, 2)), Val(Mid$(Date$, 4, 2)), Val(Left$(Date$, 2)), Val(Left$(Time$, 2)), Val(Mid$(Time$, 4, 2)), Val(Right$(Time$, 2)))

end

Function GetSec(yr As Integer, mth As Integer, day As Integer, hr As Integer, min As Integer, sec As Integer) As Integer
GetSec = (yr - 14) * (365 * 24 * 60)
GetSec = GetSec + ((yr - 13) \ 4) * (24 * 60)
GetSec = GetSec + (md(mth) * (24 * 60))
GetSec = GetSec + ((day - 1) * (24 * 60))
GetSec = GetSec + (hr * 60)
GetSec = ((GetSec + min) * 60) + sec
If (yr - 16) Mod 4 = 0 And mth > 2 Then GetSec = GetSec + (24 * 3600)
End Function
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 08:47am 11 Nov 2018
Copy link to clipboard 
Print this post

I have same problem with micromite/mx170

if you uncomment second "print" (line12): it work correctly
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10572
Posted: 11:34am 11 Nov 2018
Copy link to clipboard 
Print this post

  Quote  Running the code below exits with not enough memory.


Please ensure you are running 5.04.19
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 11:45am 11 Nov 2018
Copy link to clipboard 
Print this post

There were some problems in V5.04.09 regarding "Not enough memory" errors that should have been fixed in V5.04.10 Beta 13 for the MX170 and MX470. Download the beta version from http://geoffg.net/micromite.html#Downloads

I understand that Peter avoided this particular bug in his port of MMBasic to the MM Extreme so perhaps there is a different issue there.

EDIT: Peter beat me to the answer.

GeoffEdited by Geoffg 2018-11-12
Geoff Graham - http://geoffg.net
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 01:06am 12 Nov 2018
Copy link to clipboard 
Print this post

I confirme: for mx170, V5.09.10 beta 10, work correctly with astro1's programm

 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025