Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: MAXIDASH dashboard and IDE Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rave
Newbie
Newbie


Joined: 24 February 2018
Location: United States
Online Status: Offline
Posts: 14
Posted: 16 April 2018 at 7:37am | IP Logged Quote rave


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

- Rob

Edited by rave on 16 April 2018 at 7:43am



Back to Top View rave's Profile Search for other posts by rave
 
panky
Guru
Guru
Avatar

Joined: 02 October 2012
Location: Australia
Online Status: Offline
Posts: 450
Posted: 16 April 2018 at 10:08am | IP Logged Quote panky

Rob,

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

Doug.

__________________
DonTSM1,Duinomite,CGCMM1,CGCMM2,2xDimitech,3xWWuMites,MicksMuP,Grogster1A,4xPeterMuM+,Zonker DIP-600,3xCGuKits,CGuBoard2,SnadPic100,SCBP64 & Exp100,PMMZ144,PMMZ100 .. and loving it![:D
Back to Top View panky's Profile Search for other posts by panky
 
Azure
Senior Member
Senior Member
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Online
Posts: 244
Posted: 16 April 2018 at 4:14pm | IP Logged Quote Azure

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.
Back to Top View Azure's Profile Search for other posts by Azure
 
rave
Newbie
Newbie


Joined: 24 February 2018
Location: United States
Online Status: Offline
Posts: 14
Posted: 16 April 2018 at 11:17pm | IP Logged Quote rave

Azure wrote:
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
Back to Top View rave's Profile Search for other posts by rave
 
rave
Newbie
Newbie


Joined: 24 February 2018
Location: United States
Online Status: Offline
Posts: 14
Posted: 20 April 2018 at 11:32pm | IP Logged Quote rave

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
Back to Top View rave's Profile Search for other posts by rave
 
Paul_L
Guru
Guru


Joined: 03 March 2016
Location: United States
Online Status: Offline
Posts: 303
Posted: 21 April 2018 at 4:29am | IP Logged Quote Paul_L

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
Back to Top View Paul_L's Profile Search for other posts by Paul_L
 
Chopperp
Regular Member
Regular Member
Avatar

Joined: 03 January 2018
Location: Australia
Online Status: Offline
Posts: 91
Posted: 21 April 2018 at 8:07am | IP Logged Quote Chopperp

Paul_L wrote:
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
Back to Top View Chopperp's Profile Search for other posts by Chopperp
 
Paul_L
Guru
Guru


Joined: 03 March 2016
Location: United States
Online Status: Offline
Posts: 303
Posted: 21 April 2018 at 3:48pm | IP Logged Quote Paul_L

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
Back to Top View Paul_L's Profile Search for other posts by Paul_L
 
rave
Newbie
Newbie


Joined: 24 February 2018
Location: United States
Online Status: Offline
Posts: 14
Posted: 23 April 2018 at 9:13am | IP Logged Quote rave

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!

- Rob

Edited by rave on 23 April 2018 at 9:24am
Back to Top View rave's Profile Search for other posts by rave
 


If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Search the forums using Google.
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1250 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.12