Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:11 13 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 : new version of GFXterm.exe uploaded to doc register

     Page 2 of 2    
Author Message
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2464
Posted: 01:11pm 07 Sep 2019
Copy link to clipboard 
Print this post

hi Gert,
   see the below .PDF file detailing where to download the Microchip drivers from:
E-28 v1D blurb.pdf

generally XP requires the drivers, win10 does not, and win7 seems to be pretty random as to whether or not the drivers are pre-installed. in fact the drivers are not even drivers, but just a couple of definition files that confirm to windows that it is a CDC device and that windows should use the drivers that are already built into the operating system. microsoft could have made this MUCH simpler of they had wanted to!


cheers,
rob   :-)
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3470
Posted: 01:19pm 07 Sep 2019
Copy link to clipboard 
Print this post

  plover said  How many MMBasic commands and what are they that responds in command line ?

Like panky, I am confused about where MM.DRIVES$ and MM.FNAMES$ came from.

Depending on what lines preceded it (definition and setting of variables, etc.), almost any valid MMBasic command for the device you are running on can be entered at the ">" prompt, for instance:

? mm.ver,mm.device$

Also, you don't need an E28 or any microprocessor to test and develop with MMBasic--you can use MMBasic DOS on a PC, available as a download under "Other Downloads" here. (But there is no option for a graphics screen with mmbasic dos, and of course, no I/O except through a serial port--or to a file, which can provide output for an HTML browser page.)

Manuals with MMBasic commands for DOS and other implementations are also available on that page.
Edited 2019-09-07 23:28 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 02:00pm 07 Sep 2019
Copy link to clipboard 
Print this post

Thank you all, some of the mystery may be solved.

First the Win 7 "CDC driver" the link 'robert' provided had a rang a little bell so I did a search on my desktop Win7, and sure enough in the file for E-28 there is the driver sitting.  Then I realised that the information I got with the E-28 had it all. Completely out of my head. So the problem would have been solved had I taken the folder with me and not just the E-28.

I have just been looking for the two MM. commands I gave, I thought I copied them out of the one of the two manuals for MMBasic I have, even thought I could find it very quickly.  Now I am confused with respect to them as well.

I use the E-28 to be 100% sure that what I was trying would be working on the real deal.  I do also run the DOS version, and yes it is very nice in few minutes just turning on and test a few ideas.

I am going to go through a few more MM. and see what I get.
Edited 2019-09-08 12:44 by plover
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 03:18am 08 Sep 2019
Copy link to clipboard 
Print this post

Pheeewww, some of my sanity has returned, I really struggled to figure out where I had those 'odd' statements from, referred to be members more versed in this programming  business than me.

MMBasic Language Manual Ver 4.5
downloaded from this page, notice Maximite
http://geoffg.net/maximite.html#Downloads

I made a quick scan of the document and picked up 'MM.*' values

MM.VER
MM.DEVICE$
MM.DRIVE$   <----------------
MM.FNAME$   <----------------
MM.CMDLINE$
MM.ERRNO
MMBasic Language Manual
MM.I2C
MM.ONEWIRE

Now I feel much better, I did not make them up or dream about them  

I copy/pasted above to GFXterm and get following:

  Quote  
> ? MM.VER
5.0408
> ? MM.DEVICE$
Micromite MkII
> ? MM.DRIVE$

> ? MM.FNAME$

> ? MM.CMDLINE$

> ? MM.ERRNO
16
> ? MM.I2C
0
> ? MM.ONEWIRE
0
>
>


Ok, so sometimes you get a sensible answer, other times you get nothing. What I am looking for is I guess which statements return something interesting, when using the command line only, not the Editor at this stage.

Just for curiosity I ran the same statements through the MMBasic DOS and got

  Quote  DOS MMBasic Ver 5.04.09
Copyright 2011-2018 Geoff Graham

> ? MM.VER
5.0409
> ? MM.DEVICE$
DOS
> ? MM.DRIVE$

> ? MM.FNAME$

> ? MM.CMDLINE$

> ? MM.ERRNO
0
> ? MM.I2C
0
> ? MM.ONEWIRE


Something more practical perhaps, which started me off was following thinking. Ok I am looking at the terminal connected to MMBasic. I have say 10 small .BAS programs hopefully in the directory where I start either DOS window or GFXterm but what was their names?

Well linux people looking at a terminal would use something like "ls -la" followed by enter and the files roll up or down as you like. Well GFXterm has "paste from text file" that is a GUI way of getting the information (very handy).

DOS window so far I have not found out how to list files from the command line?

My curiosity is too great, I feel I am totally missing something basic.

Will do for now  
Edited 2019-09-08 21:39 by plover
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3470
Posted: 01:10pm 08 Sep 2019
Copy link to clipboard 
Print this post

  plover said  ... DOS window so far I have not found out how to list files from the command line?


In DOS MMBasic, FILES will list the files in the directory in which mmbasic was started, as it will list the files on an SD card for one of the microprocessors running mmbasic if fitted with SD.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 11:54pm 08 Sep 2019
Copy link to clipboard 
Print this post

@plover,

I think where the confusion lies regards the 2 commands referred to earlier is that these are for the version of MM Basic for the Maximite.  As you were using the E28 (a Micromite), they were invalid commands.

It's a bit confusing but you need to be aware that the are several "flavours" of MM Basic (for different platforms of hardware chips) and not all flavours have all the same commands and functions. It gets worse in that there are also several "families" of 'mites -

The 'Maximite' family based on the PIC32MX795 chip;
The 'Micromites' family which are further dived into the following groups:-
    - the PIC32MX based group comprising the PIC32MX170 & PIC32MX470 chips;
    - the PIC32MZ based group comprising the PIC32MZ2048 series of chips;
The 'Armmite' family based on the ST Micro range of STM32 chip -
    - the STM32L series, mainly aimed at low power and low cost;
    - the STMF series, mid power mid cost;
    - the STM32H743 high performance chip;
The 'Picromite' family based on the Rasberry Pi

Currently, the Maximite series ( mono and colour) are stuck on MM Basic version 4.5 and have been for some years - Geoff (I understand) is working on a new version to bring the Maximites up to the same level as the Micromites).

The Micromite series has two groups, the MX based group and the MZ based group. Extreme.

The Micromite MX group based on the PIC32MX170 (MM Basic 2) and PIC32MX470 (MM Basic Plus) chips are Geoff's babies and are basically (no pun intended) to be the standard against which all the other versions should adhere to regarding base functionality.

The Micromite MZ group based on the PIC32MZ2048 series of chips offer a high performance version of MM Basic know as MM Basic Extreme.

The Armmite MM Basic for the ST Micro chips were developed by a BackShed member Peter Mather and generally include all the functionality of the Micromites but with extra features.

Lastly, the is the DOS version - basically the same as the Micromite version but with no I/O capabilities.

In my humble opinion, I would STRONGLY recommend any newcomers to the 'mite world to start of with an E28 Micromite and MMBasic2, print the manual, read it from end to end (several times), print out the "Getting Started with MMBasic" from Geoff's site and read that several times, then start programming to your hearts delight!.


This is by no means an authoritive description of all in the 'mite world but it should give you some idea of the scope of this hobby area you are getting into            - enjoy.  

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

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 10:29am 09 Sep 2019
Copy link to clipboard 
Print this post

lizby & panky
Thank you both for posting two more items cleared up for the time being. It will be a struggle to remember as soon as I let go of working with it daily. Will have to see how I go.

I have no figured out that the 'files' command will work in the DOS terminal, command line, that is before entering the 'Edit' mode.

When I enter 'Edit' mode and type 'files' then save and run this will also give me the same list.

About the varies versions, here is a problem I was well aware of the different 'models' I have jut dipped my toes with the Duinomite, Maximite Colour and I think I may have a monochrome version as well. I also have some of Bigmik's offerings.  

Unfortunately when I was really going to get involved, I offered to help with research project, a dream job which I could not resist. that has taken for more time than I expected.  So I never really have gotten out of the start hole with programming.

The GFXterm.exe my instinct kept encouraging me to 'jut have a play'. Thinking, well a 5 minute job can't hurt (that happens now and then).  

This seems to have broadened out somewhat. On the bright side it is interesting and I am learning all the time.  

I am also very good at crashing programs, uncanny in my own opinion.  Seems I have succeeded in stuffing something up in GFXterm, so badly I can't really know how to describe it, apart from when I try to run the two test programs they just fail partly run and then fail.  I will see how much I can put together tonight and post later.
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 01:54pm 09 Sep 2019
Copy link to clipboard 
Print this post

I have had trouble running the two programs, 'Demo' and 'bouncing ball' Initially I had no trouble, I would load mainly 'paste > from text file' and away the program would run.

Then at some stage I went in to the editor and accidentally made change to the programs I believe.  Mainly not realising that hitting the F2 key to run probaly saved the file with my changes before running the program.

The 'Demo program' I compared with the original and realised it was missing a the last 'LOOP' statement and adding this in and saving the file seems to have fixed the problem.  The sinewave nicely rools over the table being printed in the terminal.

The second program 'bouncing ball' gave me a real headache. I could 'paste > from text file', I could see the program loading and it would execute but stumble, some missing LOOP.  

The program would stop, with the command line prompt (>) and if I went into the 'Edit' mode I would find the previous program being displayed.

I tried clearing with alt-c, alt-d, and alt-a then doing a 'list' giving me no output. Then loading the bouncing ball.

I believe I have done this a number of times. Then the program would try and run and falter. Then on the last try the program again loaded but stopped at the last line. No automatic run took place. Gingerly I type in 'run' and the bouncing ball is back. So I think I have it working again.

I find that the connection to the E-28 will get lost especially if I forget and walk away from the pc to make a cup of coffe. See following, in this case I was trying to find out where I was, in a Basic program or just the command line and system did a flip.  



Below is the loading of the 'bouncer' finished and it is not auto running.  AAaaahhh I just noticed that it looks like I have loaded into the editor. Crumbs this may be part of the problem. I have a concern about the indenting, this now seem to be a new problem I am seeing but the program does work. I will look up a note I saw in the documentation about a space after the prompt or something.



Following picture is the bouncing ball snapshot, when it worked.  I stopped the program with 'ctl-c' and moved the pointer focus off the terminal, I love the keyboard sign showing up.  Now red blinking cursor hardly gets my attention, by the time I see the red cursor I have almost automatically clicked the focus to the terminal.


The night has run away from me so it is ZZzzz.... here  
Edited 2019-09-10 00:00 by plover
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2464
Posted: 02:22pm 09 Sep 2019
Copy link to clipboard 
Print this post

one of the problems you are striking is the editor auto indenting as the code is pasted into it. see the earlier post in this thread about pasting into the editor:

  Quote  within the editor, at a blank line press space, then left arrow. this places a space character to the right of the cursor which DISABLES automatic indenting. this is IMPORTANT.

now (as before) from the menu select paste -> from text file. GFXterm will paste from the text file directly into the editor. it liaises with the editor to ensure no characters are lost, so this method is much slower than using autosave.


having text to the right of the cursor (such as a single space) disables the auto indenting, which is what you need to stop the program lines from running past the 80-character limit imposed by the editor.


dropping the usb connection could be a great number of different things. my first suspect would be a dodgy usb plug somewhere, another may be the computer entering a low-power mode when left for a while and shutting down power to the usb port that is supplying the E-28.

you can just press alt-space to reconnect to the same port as was last in use after a disconnection happens.


cheers,
rob   :-)
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 01:16am 10 Sep 2019
Copy link to clipboard 
Print this post

robert.rozee
Thank you for posting, you confirmed that the notice I had seen somewhere in your documentation mentioned the 'space' that should be inserted. When I first read it and tried to test I failed to get it right. After having loaded a program a number of times and not seeing any effect I forgot about it.

I assume that the indenting may or may not interfere with the running of a program. I will look at this way that the 'bouncing ball' demonstrates the effect of the missing space [without harm].

About the 'Disconnection' this could well be due to the pc going to power down which does happen after 30 min and so of inactivity. I will try and pay attention to this as I think the action of the disconnect notice actually triggers the pc to stay in full power mode for another period.  I now remember that when I come back to the computer I may see the notice, ie the computer did not power down at the first trip to do so.

I will have to test the 'alt-spacebar' reconnect.  I have worked out my main confusion, as usual when you know the answer it is simple. Will be my next installment.

Added some time later:
I have tested the 'alt-space' to do re-connection, it works fine.
Edited 2019-09-10 14:14 by plover
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 02:45pm 10 Sep 2019
Copy link to clipboard 
Print this post

Finally I figured out what went wrong for me. I simple terms, I was not clear on where I was or what mode the terminal was in when I tried to 'load' or 'paste from a text file'.

IMPORTANT - Really is IMPORTANT:
1..  When loading/pasting a .bas file be sure to understand the difference between interpreter-MMBasic/edit mode.

2..  As well add the space to turn automatic indentation off in 'edit' mode

Ensuring the two points above, now it looks like plain sailing for me to 'load' a .bas program.

I started mixing up pasting into interpreter mode or 'edit' mode. I would load and run successfully a program in 'edit' mode. Stop the program with ctl-C, congratulate myself with the success go and make a cup of coffee come back and try to load the 'Demo' and to my dismay the program crashed.

I stopped the program with ctl-C, which leaves the process in [b]interpreter[/b] which I forgot. Promptly loading the next program into the interpreter.  Well it may be some weeks before I forget this again.

Perhaps it is possible to test that the load is meant for the 'editor' and warn about trying to load into the 'interpreter.

As I was also experimenting with using 'select area-copy' out of the terminal I discovered that when using 'select and copy' and 'select all' that really does give you all, including the bottom line?   Is that meant to be?

Here is an example, part of bouncing ball:


Print GFX "ink" 0, 0, 255, 5
Print GFX "arc" Gw\2-25, Gh\2, Gw\2+25, Gh\2+30, 100, 260

dX=-1
dY=-1

Do
 Print GFX "S" X1, Y1, X2, Y2, dX, dY
 Print, X1, Y1, X2, Y2, dX, dY
 X1=X1+dX
 Y1=Y1+dY
 X2=X2+dX
 Y2=Y2+dY

 If X1=0 Then dX=-dX
 If Y1=0 Then dY=-dY
 If X2=Gw-1 Then dX=-dX
 If Y2=Gh-1 Then dY=-dY

 Pause 10
Loop

ESC:Exit  F1:Save  F2:Run  F3:Find  F4:Mark  F5:Paste  Ln: 32  Col: 1     INS


Something I noticed when using the 'edit' mode and try to use the 'select all' I was actually thinking that it would copy the complete .bas program but as can be seen in the example I only get the visible portion in the terminal window.

Is that by design?

Well for me ZZzzz....  
Edited 2019-09-11 00:51 by plover
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2464
Posted: 02:33pm 11 Sep 2019
Copy link to clipboard 
Print this post

  plover said  Perhaps it is possible to test that the load is meant for the 'editor' and warn about trying to load into the 'interpreter'


the problem is that GFXterm does not know if it is pasting into the editor or the command line (the 'interpreter' as you call it) until after it has sent the first line or two of text being pasted. essentially, it starts out every paste operation by assuming you are in the editor and pasting in "slow" mode. if it does not see any escape sequences coming back after 1000ms it switches into "fast" mode. if any escape sequences arrive back while in "fast" mode, it immediately switches back to "slow" mode.


  plover said  As I was also experimenting with using 'select area-copy' out of the terminal I discovered that when using 'select and copy' and 'select all' that really does give you all, including the bottom line?   Is that meant to be?
[...]
I was actually thinking that it would copy the complete .bas program but as can be seen in the example I only get the visible portion in the terminal window.

Is that by design?


not so much by design, but rather the product of GFXterm being just a simple terminal emulator.

GFXterm has an array of 24 by 80 characters - one for each character cell on the terminal screen - that it maintains internally. when the screen scrolls, it shuffles around lines within this array. when characters are received from the micromite, they are both drawn on the terminal screen and copied into this array. this is necessary because the terminal screen is a graphical object. once a character has been displayed on the screen for you to see, it is no longer retrievable - it is just a pattern of dots.

when you choose 'select and copy' from the menu, GFXterm cheats. it quickly makes a copy of the character array in a win32 edit control, with trailing spaces trimmed from lines. this edit control is then drawn (by the operating system) in front of the normal terminal window and you interact with it quite independently from GFXterm. When you exit the edit control (with esc or enter) the normal terminal screen is revealed again.

while the edit control is displayed, the terminal window keeps going in the background, you just can't see it.


to save a basic program using GFXterm, do the following:

1. get out of the editor, and at the command prompt type LIST ALL but do not press enter yet.
2. select 'LOG to file' from the menu, and enter the name you would like to save your program to.
3. press the enter key. your whole program will be listed on the screen as well as being saved to the log file.
4. press alt-L to toggle logging off.
5. from windows, edit your saved file and delete the ">" character from the end.

this is essentially the same as what MMedit does. while i could wrap it all up into an automated process, i've resisted the idea as there are several things like autorun and custom prompts that would break it.

(edit: upon reflection, MMedit more likely uses xmodem)

cheers,
rob   :-)
Edited 2019-09-12 00:35 by robert.rozee
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 02:53pm 11 Sep 2019
Copy link to clipboard 
Print this post

Thanks for posting. I have got it now, I have not missed anything. Just forgotten that I have actually at one stage read about it.

Last night I was pondering what I would do if I had a longish program and had messed around in it, how to get a copy.  Then I remembered that I had tested LIST ALL while logging to file.

What I will look at next is hooking up a temp sensor, one of those DALLAS things and try to see if I can understand anything about logging temp to the graphics in the terminal, that seem to be a simple way to see the result of something running.

Well already ZZzzz... here  
 
     Page 2 of 2    
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