Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 07:27 26 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 : New Version: Micromite MMBasic Ver 5.05.03

Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 07:17am 09 Jul 2020
Copy link to clipboard 
Print this post

I have a new version of MMBasic for the Micromite and Micromite Plus.  It is Ver 5.05.03 and you can download it from here: http://geoffg.net/micromite.html  (scroll to the bottom of the page)

This is a minor update that fixes some trivial bugs.  Check the Change Log for the details.  Peter has already put the relevant fixes into his current beta test version of the Colour Maximite 2 firmware.

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

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 10:07am 09 Jul 2020
Copy link to clipboard 
Print this post

Thanks for this, and for still supporting the Lite version.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 11:52am 09 Jul 2020
Copy link to clipboard 
Print this post

Good to hear that someone actually uses the Lite version.
Geoff Graham - http://geoffg.net
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 03:12pm 09 Jul 2020
Copy link to clipboard 
Print this post

Hello Geoff !


Thank you very much, me and my friends (Erwin and Günter) use the "MM170 version" for 90% of our hobby projects.

Thank you and best regards from Tyrol!  

Wolfgang
Edited 2020-07-10 01:13 by PicFan
 
Canada_Cold
Newbie

Joined: 11/01/2020
Location: Canada
Posts: 23
Posted: 11:06pm 09 Jul 2020
Copy link to clipboard 
Print this post

Hi Geoff,

I just wanted to say thanks for your continued development and supporting of the Micromite.  This is an awesome tool for us hobbyists.  

Don
 
Lou

Senior Member

Joined: 01/02/2014
Location: United States
Posts: 229
Posted: 12:19am 10 Jul 2020
Copy link to clipboard 
Print this post

Geoff,

Thanks for the continued MicroMite support.  I use the 44 pin TQFP chips all the time, and sometimes the 28 pin DIP on PC boards Zonker has designed for me.

And thanks to you and Peter for the CMM2, I am considering ordering a couple from CG for me and Zonker to play with.  I can imagine having that instead of the black and white TRS-80 with 4k of dynamic RAM I had back in the late 70's.

Lou
Microcontrollers - the other white meat
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2287
Posted: 10:47am 12 Jul 2020
Copy link to clipboard 
Print this post

hi geoff,
  ran a few tests, and it all seems to work well    

there is a tiny drop in speed (approx 1%) compared to the previous release (5.05.02), but this is quite minimal in the scheme of things. we have seen far greater speed increases in the past between versions.


cheers,
rob   :-)


Micromite MKII MMBasic Ver 5.05.02
Copyright 2011-2019 Geoff Graham

> RUN
Sieve of Eratosthenes Speed Test

4.226 seconds

48122 statements
19747 lines

11387.1 statements per second
4672.74 lines per second

>


Micromite MKII MMBasic Ver 5.05.03
Copyright 2011-2020 Geoff Graham

> RUN
Sieve of Eratosthenes Speed Test

4.276 seconds

48122 statements
19747 lines

11254 statements per second
4618.1 lines per second

>
 
skillet
Newbie

Joined: 13/07/2020
Location: Australia
Posts: 9
Posted: 07:25am 14 Jul 2020
Copy link to clipboard 
Print this post

Hi all, hate to say it but there may be an issue with 5.05.03 in some specific circumstances.

I took two micromite pluses up to a mate's place on the weekend to reprogram into 5.05.03. One is driving a silicon chip DAB+ radio. When upgraded to 5.05.03, the system crashes and restarts about once every second, but at random places - it might go for longer or shorter. The error is always the same: a bus error. I apologise but I did not write the details down as I was more interested in verifying the radio was OK.

We then tried 5.05.01 and 5.05.02, and both of these versions worked perfectly, so I have reverted to 5.05.02.

There is clearly something misbehaving with 5.05.03. Even if the SC basic programme has bugs, whatever bugs are there should not cause MMbasic to crash and restart.

I tried slowing CPU down, but didn't fix it, but maybe might have changed it - not sure.

I will make a crazy wild guess, but have no real basis for believing this is the real cause: has something changed with the SPI WRITE implementation? The SC radio program is full of them, and the other test programme I ran was not. The only other things unique about my setup I can think of, but I don't think are likely causes, are my baud rate setting (increased to 115200) and display option (60,132) - but still the micromite only crashed when running the SC DAB+ radio program.

Cheers, and thanks for the great work
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3656
Posted: 10:21am 14 Jul 2020
Copy link to clipboard 
Print this post

I suspect it would be worth trying the latest RC2 (or other) beta from
here

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3521
Posted: 12:32pm 14 Jul 2020
Copy link to clipboard 
Print this post

Reprogramming may have erased option setting

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3521
Posted: 01:12pm 14 Jul 2020
Copy link to clipboard 
Print this post

Generic question:

Does anyone have a suggestion how the internal editor can be used with colourcode ?
Normally I use the internal editor in monochrome mode, with the default light text on black background.
Whenever I turn on colourcode, one of the colours is black, making some text invisible.

Is there a way to change the black text to some other colour so it becomes readable.

I know I can change the background to white in Putty, but usually work with black background as it is easier to my eyes.

Volhout
PicomiteVGA PETSCII ROBOTS
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 04:21pm 14 Jul 2020
Copy link to clipboard 
Print this post

  JohnS said  I suspect it would be worth trying the latest RC2 (or other) beta from
here

John


This thread is about the MICRO-mite. That's the CMM2 firmware.
Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3656
Posted: 05:55pm 14 Jul 2020
Copy link to clipboard 
Print this post

Sorry!

John
 
skillet
Newbie

Joined: 13/07/2020
Location: Australia
Posts: 9
Posted: 10:33pm 14 Jul 2020
Copy link to clipboard 
Print this post

  Volhout said  Reprogramming may have erased option setting

Volhout


When booting 5.05.03 (as all other versions), the option settings were reset to default and I needed to reapply them all. That is for example, I needed to redo the LCD and touch and interrupt setup from scratch, change from the default bitrate to 115200 which is what I use, set the keyboard locale, change display size. 5.05.03 was fine doing all of this.

Not until I loaded the DAB+ radio program from SD card flash onto the micromite plus and typed 'RUN' did it start crashing. The effect was immediate and totally consistent every time I typed 'RUN' using 5.05.03.

Following precisely the same sequence of steps with 5.05.01 and then 5.05.02 worked as expected (i.e. no crashing, DAB radio ran as expected) and I therefore kept with 5.05.02. This leads me to believe there's an issue with 5.05.03 as mentioned in my first post.

I don't know how to help further at this stage, because I had my mate reflash my micromite pluses back to 5.05.02 before I left. I thought I should let the developers know that it seems there's a new issue with 5.05.03.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5900
Posted: 10:54pm 14 Jul 2020
Copy link to clipboard 
Print this post

I can't run the software here but I expect that it is running out of memory.
There is probably a bit less memory available with the new firmware.

Another possibility is that there was some greater error checking in the new firmware so if there is some code that cheats a bit, it might now get caught.

I tend to favour memory size as the reason.

Jim
VK7JH
MMedit   MMBasic Help
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 04:19am 15 Jul 2020
Copy link to clipboard 
Print this post

  skillet said  When upgraded to 5.05.03, the system crashes and restarts about once every second, but at random places - it might go for longer or shorter. The error is always the same: a bus error.

That does not sound good.  A bus error occurs when the MIPS CPU tries to access a memory address that is not there.  It can be caused by a fault in MMBasic but that would be very unlikely as little changed between the last version and this version.  Another clue is that it occurs at a random time... if it was a bug it would have consistent timing.

I do a lot of testing and it is next to impossible that bug which causes a bus error could slip through.  Most times a bus error is caused by the wrong CPU speed, noise on the power supply or an incorrect capacitor on Vcap.

However, as you say, it is corrected by reverting to V5.05.02.  All very confusing.

I just don't know what it could be.  I doubt that it is a memory capacity issue but anything is possible.  If you observe the error again it would be good if you could note the address that it failed on and if this address is consistent from one failure to the next - that might give me a clue.

EDIT:  I did make one minor change to V5.05.03 without changing the version number.  If you have the chance it would be handy if you could re download V5.05.03 from my website and try the upgrade again.  There is an outside chance that might fix your issue.

Geoff
Edited 2020-07-15 14:23 by Geoffg
Geoff Graham - http://geoffg.net
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3521
Posted: 06:50am 15 Jul 2020
Copy link to clipboard 
Print this post

Hi skillet,

You have set up a terminal resolution of 132 character by 60 lines.
In the editor that may consume 8k of memory.  
Is it possible, just for this test, to change that to the default 80x24.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2287
Posted: 03:17pm 30 Jul 2020
Copy link to clipboard 
Print this post

hi,
   have just spent a bit of time looking through how microsecond timing is done in the source code for the MX170/470 version of micromite basic.

i noticed a couple of issues in the timing for the 1-wire routines. according to microchip's application note AN126 here:
https://www.maximintegrated.com/en/design/technical-documents/app-notes/1/126.html
the following timings should be used:

write "1" bit: 6uS low, 64uS hi-Z
write "0" bit: 60uS low, 10uS hi-Z
read bit: 6uS low, 9uS hi-Z, 45uS data valid, 10us idle
reset: 480uS low, 70uS hi-Z, READ, 410uS idle

whereas the mmbasic source uses:

write "1" bit: 8uS low, 64uS hi-Z
(6uS vs 8uS, probably not a big issue)
write "0" bit:same as AN126
read bit: 6uS low, 8uS hi-Z, READ, 56uS idle
(we are reading the data 1uS before it becomes valid)
reset: close to AN126, timing of 481//70/411uS


while the timing error in writing a "1" bit is minor, we are operating right on the edge of failure when reading a bit. in order to safely read a bit, we should be reading close to the middle of the 'valid data' interval; that is using timing of:

read bit: 6uS low, 32uS hi-Z, READ, 32uS idle

note that the code in question, ow_readBit() in "Onewire.c", is used by both the generic 1-wire routines as well as the DS18B20/tempr function. i do wonder if this may be why some forum members have seen issues with DS18B20 sensors of dubious parentage.


cheers,
rob   :-)
Edited 2020-07-31 01:19 by robert.rozee
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 10:32pm 30 Jul 2020
Copy link to clipboard 
Print this post

Well done Rob and huge thanks.  That code is very old, it was contributed over eight years ago by a user of the original monochrome Maximite and I have hardly looked at it since.

I will connect up a logic analyser and do some testing and digging around, something for a cold winter's evening.

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

Joined: 31/12/2012
Location: New Zealand
Posts: 2287
Posted: 05:07pm 01 Aug 2020
Copy link to clipboard 
Print this post

looks like i was wrong about the timing. from page 16 of the DS18B20 datasheet here:
https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
the following diagram suggests that the values used are pretty much right:




basically, while the DS18B20 may sample the bus at any time between 15uS and 60uS after the beginning edge of the negative pulse, the MASTER should read within 15uS of the beginning - which the MX170/470 version of mmbasic does do.

although it may still be worth tweaking that 8uS back to 6uS (when writing a "1" bit) to match the comment, just in case some 1-wire devices use the length of this pulse to set the timing elsewhere.

HOWEVER, i did have a look at the matching CMM2 1-wire code, and see the timing values (while within the right ballpark) vary quite a bit:
write "1" bit: 10uS low, 56uS hi-Z
write "0" bit: 65uS low, 5uS hi-Z
read bit: 3uS low, 10us hi-Z, READ, 53uS idle

but it could well be that peter has tweaked the values for good reason to match actual measured signals on the 1-wire bus.


btw, i've been experimenting with some genuine DS18S20 devices (although supplied by Maxim as "S" devices, they are just marked as "1820"), and verified the following code works with an MX170, using external (3v3) power:
' code to read 1820 and 18S20
Do
 DS18B20 START 26
 Pause 1000
 Print DS18B20(26)*8
Loop



cheers,
rob   :-)
Edited 2020-08-02 04:30 by robert.rozee
 
Print this page


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

© JAQ Software 2024