Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:13 04 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 and Micromite Plus Beta 28

     Page 1 of 3    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 05:02am 14 Sep 2015
Copy link to clipboard 
Print this post

A new beta (B28) for both the standard Micromite (MX170) and the Micromite Plus (MX470) is available for download from: http://geoffg.net/Downloads/Micromite/Micromite_4.7_Beta.zip

This fixes some bugs (see Changes.txt in the zip file) but there are still plenty more to hunt down.

The main feature of this version is that it introduces the LIBRARY command. This allows you to compress and store BASIC code and CFunctions into a hidden area. Because it strips the hex codes from CFunctions it is also great for loading large CFunctions like Peter's LCD drivers without consuming too much precious program space.

I have updated the User Manual to describe the LIBRARY commands but to make it easy I have extracted the relevant text into this PDF: 2015-09-14_144957_Library_Command.pdf

Have fun with it and as usual, please let me know if you find a bug.

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

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 05:18am 14 Sep 2015
Copy link to clipboard 
Print this post

Many thanks Geoff!
This LIBRARY function is for me THE game changer.
With this i could make a piece of hardware and have all the pins defined as they are connected. A NEW will not change that and all IO is defined at startup.
This makes it easier for people who want to change the code while having the hardware side of the software already setup.
Best thing is i can load a chip with MMBasic, load the library functions that are needed, then read the flash to create a HEX file and burn thast into a new ready to go chip.
Next weekend will be fun to try that out.
I am particularly interested into making this work for steppermotors/servos.
A library MOVETO(x,y,z) is then al that is needed from the main program.
My uMite controlled CNC is getting closer and closer!

Edited by TZAdvantage 2015-09-15
Microblocks. Build with logic.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10317
Posted: 05:32am 14 Sep 2015
Copy link to clipboard 
Print this post

  Quote  This LIBRARY function is for me THE game changer.


Indeed it is

I've been helping test this new release for a few days and it is now difficult to imagine anything in the embedded computing space you can't do with a Micromite(+)Edited by matherp 2015-09-15
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 05:38am 14 Sep 2015
Copy link to clipboard 
Print this post

Great! The LIBRARY functionality is a revolutionary addition as it changes the entire programming model. You should have probably numbered the version 5.0 instead of the insignificant 4.7b28 :)
I am still yet to try that, but hopefully problems with the servo from the previous beta have gone away too, because this is something which is really putting a brake on my project at the moment...
http://rittle.org

--------------
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 06:08am 14 Sep 2015
Copy link to clipboard 
Print this post

spotted a small error in the manual, where reference is made to DS1703 instead of DS1307 in several places.

and i see a factory reset does clear the library contents - is this as intended?

given that there is a LIBRARY LIST command, that lists the basic statements in the library but not cfunction contents, how practical would it be to include reconstruction of the cfunction source? and, if this were possible, would it then be viable to consider adding in a LIBRARY EDIT command?

or am i looking too far ahead!


cheers,
rob :-)
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1594
Posted: 06:35am 14 Sep 2015
Copy link to clipboard 
Print this post

@Geoff

That is F A N T A S T I C !! A Revolution!

  kiiid said  Great! The LIBRARY functionality is a revolutionary addition as it changes the entire programming model. You should have probably numbered the version 5.0 instead of the insignificant 4.7b28 :)


I support that.




Michael




causality ≠ correlation ≠ coincidence
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10317
Posted: 06:56am 14 Sep 2015
Copy link to clipboard 
Print this post

  Quote  but hopefully problems with the servo from the previous beta have gone away too,


I'm pretty sure the problems are still there. I've had a look at the code and the fix is reasonably easy so I've let Geoff know.

 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 07:46am 14 Sep 2015
Copy link to clipboard 
Print this post

Yes 5.0 is a better version number. When asking people which version they use for support, this is a huge difference.

Microblocks. Build with logic.
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 09:50am 14 Sep 2015
Copy link to clipboard 
Print this post

  matherp said  
  Quote  but hopefully problems with the servo from the previous beta have gone away too,


I'm pretty sure the problems are still there. I've had a look at the code and the fix is reasonably easy so I've let Geoff know.



Keeping my fingers crossed for a sooner solution :)
Thanks!
http://rittle.org

--------------
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 09:54am 14 Sep 2015
Copy link to clipboard 
Print this post

This is fantastic stuff!

I agree with moving to 5.0. The LIBRARY function and the added capabilities are a good point to bump to a major number.
Micromites and Maximites! - Beginning Maximite
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 724
Posted: 11:29am 14 Sep 2015
Copy link to clipboard 
Print this post

Hi Geoff,

i wonder why the Win 10 console USB Bug is not on the Bug/ todo- List?
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 12:47pm 14 Sep 2015
Copy link to clipboard 
Print this post

  from changes.txt said   Modified the CFunction API interface (see the new header file
for CFunctions called cfunction.h). (thanks to matherp).


Is the cfunction.h file available. It does not seem to be in the zip file.
I understand this would replace the previous header apidefs.h

Thanks
Gerry
Latest F4 Latest H7 FotS
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6284
Posted: 02:07pm 14 Sep 2015
Copy link to clipboard 
Print this post

It was a pleasure to set up the LCD and TOUCH etc without having to reboot each time.

When doing Touch calibrate, could we have the "Success" message displayed on the LCD as well as the console.

Well done.

Jim
VK7JH
MMedit
 
JohnL
Senior Member

Joined: 10/01/2014
Location: Seychelles
Posts: 128
Posted: 03:18pm 14 Sep 2015
Copy link to clipboard 
Print this post

Well done Geoff,

As others have acknowledged, this could be a game changer for lot of applications.

My request and has been flagged before by someone else, is to have a bare bones (core basic) version available, by removing most of if not all of the accessory driving firmware such as distance, temperature, IR, LCD etc. But to have individual accessory firmware available as libraries.

Micromite was developed as an "Embedded controller" as such there are many specific applications that may only require certain accessory features or none at all. Once programmed and built into an application, may never require further modifications.

I have applications that would be ideal for DIP MX170 and even MX150 that will never require most of the accessory driving firmware, but that could benefit from more free memory.

John
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 06:00pm 14 Sep 2015
Copy link to clipboard 
Print this post

I agree that this should be called version 5.0 when it is ready for prime time. It is a departure from my normal practice of incremental change - this has a new processor (MX470), complex peripherals (LCD panels) and many new features (LIBRARY, GUI objects, etc). Testing it has become a nightmare and this is partially why progress is slow.

Peter has dug through the PWM code and found the bug that was causing trouble (in fact Peter has found and corrected most of the bugs recently fixed). I have built a new beta (B29) (with the PWM fix) and updated the 4.7 beta zip file at: http://geoffg.net/Downloads/Micromite/Micromite_4.7_Beta.zip. Download it and you will find B29 inside (clear your browser cache first).

Replying to some of the comments:

  robert.rozee said  spotted a small error in the manual, where reference is made to DS1703 instead of DS1307 in several places.

Thanks, the updated manual is in the beta zip file.

  robert.rozee said  i see a factory reset does clear the library contents - is this as intended?

Yes, there may be something in the library area which could stop the Micromite from reaching the command prompt, so you need some way of recovering.

  robert.rozee said  given that there is a LIBRARY LIST command, that lists the basic statements in the library but not cfunction contents, how practical would it be to include reconstruction of the cfunction source? and, if this were possible, would it then be viable to consider adding in a LIBRARY EDIT command?

The LIBRARY LIST command deliberately does not reconstruct the CFunction contents so that the user can see exactly what is in the library. Editing the library would be rather complicated and goes beyond what the library concept is supposed to be (ie, fixed code that does not change). The idea is that you debug and experiment with the library code as a normal BASIC program. Then, when you are satisfied with it, save a copy somewhere else and execute LIBRARY SAVE.

  atmega8 said  i wonder why the Win 10 console USB Bug is not on the Bug/ todo- List?

Sorry, I have now added it to the list and I will get to it soon.

  disco4now said  Is the cfunction.h file available. It does not seem to be in the zip file. I understand this would replace the previous header apidefs.h

Yes, it does replace apidefs.h. Peter (matherp) wrote cfunction.h and this is his latest version: 2015-09-15_034252_CFunctions.zip

  TassyJim said   It was a pleasure to set up the LCD and TOUCH etc without having to reboot each time.

Actually, the firmware does the reboot for you. It is so fast and the startup banner is not displayed so you don't notice it. The only exception is when you are connected to USB - then you are prompted to do a manual reboot.

  JohnL said  My request ... is to have a bare bones (core basic) version available, by removing most of if not all of the accessory driving firmware

Yes, this is something that I plan to look into when the beta has finished. However, it may not be as easy as it looks. Peter's display drivers hooked neatly into MMBasic but many devices will not be that easy. Also, writing CFunctions is very difficult as you must keep the code position independent and it is hard for MMBasic to call routines inside one. However, it is still worth investigating.

Thanks for all the comments. Expect plenty more betas... there is a long way to go.

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

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 09:34pm 14 Sep 2015
Copy link to clipboard 
Print this post

  TZAdvantage said   . . . Best thing is i can load a chip with MMBasic, load the library functions that are needed, then read the flash to create a HEX file and burn thast into a new ready to go chip.
Next weekend will be fun to try that out.


Hi TZA,

Please do update us with how you get on with this if you don't mind! Be good to know if this works 100% as you expect it to.

Thanks . . .
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 09:52pm 14 Sep 2015
Copy link to clipboard 
Print this post

It works with all the previous version, so i expect it to work on this version as well.
This week not too much time to 'play'. Will have to wait until the weekend.


Microblocks. Build with logic.
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 11:08pm 14 Sep 2015
Copy link to clipboard 
Print this post

  Geoffg said   Peter has dug through the PWM code and found the bug that was causing trouble (in fact Peter has found and corrected most of the bugs recently fixed). I have built a new beta (B29) (with the PWM fix) and updated the 4.7 beta zip file at: http://geoffg.net/Downloads/Micromite/Micromite_4.7_Beta.zip. Download it and you will find B29 inside (clear your browser cache first).

Geoff


Thank you both Geoff and Peter!
I will try it out these days and will report in case of a problem.

Just as an idea: would it be feasible to have the mite be able to self update its own firmware via the console with xmodem protocol?


http://rittle.org

--------------
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10317
Posted: 01:30am 15 Sep 2015
Copy link to clipboard 
Print this post

  Quote  Just as an idea: would it be feasible to have the mite be able to self update its own firmware via the console with xmodem protocol?


I'm hoping something similar will be possible using a pic16F1455 as the USB console. This would then be applicable to both the uM2 and MM+. I know TZ is looking at this based on Robert Rozee's pic32prog code.

The PCBs I've designed for the 44-pin and the 64-pin devices have the hardware connections needed to support this. I'm waiting on supply of the 44-pin PCBs from the fabricator and then can start work on it.

I've always been somewhat anti including the USB console in the MM+ firmware as I think there are too many downsides with driver support and issues around connection when the MM is reset that simply don't occur with a separate USB serial adapter. Also, there is a significant overhead of processing USB that could compromise real time operation in some circumstances. The addition of a 80-cent 14-pin pic16F1455 solves all these issues.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 05:35am 15 Sep 2015
Copy link to clipboard 
Print this post

@Geoff,

It maybe worth highlighting that when the LIBRARY SAVE command is issued, then it 'wipes' the program from memory (this threw me initially so no doubt others will be too). A sentence can be added to your third bullet point (under 'The LIBRARY Feature')

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