Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:53 11 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 : MAXIDASH dashboard and IDE

Author Message
rave
Newbie

Joined: 24/02/2018
Location: United States
Posts: 28
Posted: 09:37pm 15 Apr 2018
Copy link to clipboard 
Print this post


Hi,

MAXIDASH is a dashboard, and an IDE of sorts, for the (colour) maximite. MAXIDASH is an MMBASIC 4 program that runs on the MM to experiment with an MM and to build event-driven programs. You can interactively control pins/ports and enter values and formulas for pins, pretty much like you would enter values and formulas into a spreadsheet. The formulas can be saved and exported to a stand-alone .BAS program.

My design goals for MAXIDASH were:

- I wanted a UI in MMBASIC to immediately give me an overview of pins and connectors and their state, mode and values, to toggle pin modes (restricted to their capability), display pin values or enter their values/formulas;

- I wanted the UI to be interactive, to set pin modes and enter values and formulas while the display is continuously updating (entering formulas requires some tricks to extend the program on the fly );

- the formulas are expressive, including if-then-else (with the C-like ternary operator ? and : pair), conditional operators || and &&, arithmetic, BASIC functions, values of pins and memory cells (Pn, Mn, Dn, An, Cn), timer (T), and key press (KEY);

- fast screen updating, so pin values are read or set at each cycle in a fraction of a second;

- the ability to temporary "hold" values, which suspends updating pin/mem values;

- a feature to save and export pin settings and the pin-updating formulas to .BAS files, to integrate the generated code easily in MMBASIC projects;

Below is an overview of the UI display on a VGA monitor of the current version:



Below are two simple MAXIDASH examples. The first is just a blinking LED (pin0 is switched each second). The second example runs 8 LEDs on D0-D7 as a continuous wave of 4 LEDs lit up. These simple examples should give you a very basic idea how MAXIDASH is programmed as an IDE:

PIN0LED = (T\1000) % 2


M0=1000
M1 = 125
M2 = 500
D0 = t % m0 < m2
D1 = (t+m1) % m0 < m2
D2 = (t+2*m1) % m0 < m2
D3 = (t+3*m1) % m0 < m2
D4 = (t+4*m1) % m0 < m2
D5 = (t+5*m1) % m0 < m2
D6 = (t+6*m1) % m0 < m2
D7 = (t+7*m1) % m0 < m2


For the second example, the variables M0, M1 and M2 can be interactively changed in MAXIDASH to influence the pattern, or you can create formulas for M0-M2 based on the timer value (t) or a key press (key) value, e.g. M2=key?10*key:m1 will set m1 to the ASCII value times 10 when a key is pressed.

This is free and open source software. The current version 1a is still a bit experimental though I've tested it on a CMM without issues. The export feature currently saves the exported program as a .DSH file since the program itself saves as a .BAS file using the specified file name (ZZZZDASH by default). I'm currently using CHAIN to extend the program with formulas entered, but perhaps LIBRARY LOAD can be used instead to speed this up in the future.

I've uploaded MAXIDASH to FruitOfTheShed.com (under MMBASIC) and I will also post a link to another download site soon that will be updated with newer versions

Feel free to comment

- RobEdited by rave 2018-04-17
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 12:08am 16 Apr 2018
Copy link to clipboard 
Print this post

Rob,

What a great program - can't wait to have a play. Thanks for sharing this.

Doug.
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Azure

Guru

Joined: 09/11/2017
Location: Australia
Posts: 446
Posted: 06:14am 16 Apr 2018
Copy link to clipboard 
Print this post

Great work. Thank you for sharing. I will be downloading it to have a play.

I can't see it in MMBasic or anywhere else on FruitOfTheShed yet.
 
rave
Newbie

Joined: 24/02/2018
Location: United States
Posts: 28
Posted: 01:17pm 16 Apr 2018
Copy link to clipboard 
Print this post

  Azure said   can't see it in MMBasic or anywhere else on FruitOfTheShed yet.


Thanks Azure! Here is the FruitOfTheShed link:

http://fruitoftheshed.com/MMBasic.MAXIDASH-dashboard-and-IDE.ashx

- Rob
 
rave
Newbie

Joined: 24/02/2018
Location: United States
Posts: 28
Posted: 01:32pm 20 Apr 2018
Copy link to clipboard 
Print this post

An updated version of MAXIDASH 1b is available for download. This update fixes an issue with the export feature and includes other minor improvements.

The UI can be easily extended with new functions that you may want to use in formulas, by extending the functions$ string in MAXIDASH.BAS and BASEDASH.BAS. For example, to add support for DS18B20, add "1:DS18B20," to functions$, where 1 means one argument is required.

Enjoy!

- Rob
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 06:29pm 20 Apr 2018
Copy link to clipboard 
Print this post

Hi Rob,

WOW!!! I don't think you should be classified as a newbie here or anywhere else! In four threads you have found places where the MMBasic stack is apparently trashed by looping constructions, figured out a way to make a case out of LEGO BLOCKS of all things, and now you have presented a working IDE and compiler aimed at building event driven programs !

After a quick reading of your BASEDASH and MAXIDASH program files I suspect that you have written compilers before. Programming hasn't changed much since I began learning it in the 1950s. It needs to be scaled up. We need to be able to generate source code automatically. I suspect that you might know how to do it.

I'm way too old to contribute much to your efforts so I think I'll just sit back and watch what you do next.

Paul in NY
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1106
Posted: 10:07pm 20 Apr 2018
Copy link to clipboard 
Print this post

  Paul_L said   Hi Rob,

WOW!!! I don't think you should be classified as a newbie here or anywhere else!
Paul in NY

I think your status works on your number of posts, nothing else. The only execption I'm aware of was @Geofg who went virtually straight to Guru when he joined for obvious reasons.
ChopperP
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 05:48am 21 Apr 2018
Copy link to clipboard 
Print this post

Brian ... you're correct, the status does work on the number of posts.

But .... that's not what I was referring to. Try reading through his BASEDASH and MAXIDASH program files. There is no way that that code was written by any newbie!

I think he is going to teach all of us quite a bit about programming!

Paul in NY
 
rave
Newbie

Joined: 24/02/2018
Location: United States
Posts: 28
Posted: 11:13pm 22 Apr 2018
Copy link to clipboard 
Print this post

Hi all,

OK, so I had to update MAXIDASH to version 1c. Squashed a little bug with save/export getting stuck in entering the file name

Here is an example on how to use MAXIDASH to control a 74HC595.

Connect a 74HC595 shift register pin DS to D0, pin ST_CP to D1 and SH_CP to D2. Then enter in MAXIDASH:

D0 = key=48 ? 0 : key=49 ? 1 : D0
D1 = key=97
D2 = key=98


You can now interactively control the shift register from the keyboard. Just type '0'/'1' to set bit value, shift one bit in with key 'a' and latch with key 'b'. Export the program as ZZZZDASH.DSH (or other name) and you can run ZZZZDASH.DSH as a fast standalone program or integrate it in a project.

It is also easy to shift values into the 74HC595 using a counter M2 of the "memory bank" that is initially set to M1=16 (for 16 half cycles) and to let M3 shift a bit into the register each cycle, starting with the initial value of M0. M0 is the value we want to shift in, for example &haa:

M0 = &haa
M1 = 16
M2 = M1 ? M1 : M2 ? M2-1 : 0
M3 = M1 ? M0 : M2%2 ? M3 : SHR(M3, 1)


The 74HC595 shift register pin DS connects to D0, pin ST_CP to D1 and SH_CP to D2:

D0 = M3%2
D1 = M1 ? 0 : M2 ? M2%2 : 0
D2 = key=98


When you interactively set M1 to 0 then the M2 counter will count down, triggering D1 to flip each cycle, and triggering M3 to shift from low to high bits into the register via D0.

MAXIDASH shows the values as they change. Not so impressive to seasoned pros perhaps, but still educational to watch.

Enjoy!

- RobEdited by rave 2018-04-24
 
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