Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 10:21 29 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 : Small options and setup pgm

     Page 2 of 3    
Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 09:54am 25 Jul 2019
Copy link to clipboard 
Print this post

First, an apology for anyone trying the program as I've rearranged a couple of Buttons.

I added an option to Download the Device Program memory to the Screen Buffer, from there it's simply a matter of cutting the first few lines of device responses from the start of the buffer and saving the buffer.

It has been a perfect copy of the file loaded into memory, so far! I tried the M100+ and the ArmH7. I can download a 230K file in Program memory from the ArmH7 to the buffer window and save it to disk in 10 seconds. Obviously there is no handshaking and the result is somewhat dependant on the PC at very high baud rates like 230400. It's something I often want to do quickly and may be of little benefit to others, but it's there anyway. I'm reasonably sure this is the last addition to the program.


It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 12:59am 27 Jul 2019
Copy link to clipboard 
Print this post

If a connected Device is running a program, no attempt will be made to stop the running program, this now has to be done manually by sending CTRL-C.

I also found that allowing the receive buffer to update in real time during a memory download can result in an extra character being inserted in a few places, so the display update is delayed until the complete program code is received. Fixed file Close/Open directory paths. Cleaned up Info Messages and consolidated the various displays for option, user and disable selections.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 09:11am 27 Jul 2019
Copy link to clipboard 
Print this post

Downloading a code file from device memory now captures "only" the file in the buffer with only one extra char, the prompt char ">", which is displayed at the end of the screen display (end of the captured file). Updated the com port selection and added a Transmit LED to main screen.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 10:18am 29 Jul 2019
Copy link to clipboard 
Print this post

Added History to the manual command line input field that sits below the Main buffer display window.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 11:48pm 29 Jul 2019
Copy link to clipboard 
Print this post

A: Stopped History button opening if other send lists are open.
B: History will open and close via the History button.
C: History wraps after 20 commands removing the oldest cmds as new ones are added.

BTW If the history list is open, new manual commands won't be saved to history. Clicking on an history entry places it in the command field, pressing enter sends the command, obviously this allows editing of any history command in the command field as often as needed before sending it again.
It's all too hard.
Mike.
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1094
Posted: 12:53am 30 Jul 2019
Copy link to clipboard 
Print this post

@KeepIS

Interesting program and I would like to make more use of it but I have the following problems:-

- running Win 7 Pro with an MMite 470 connected on COM11 (confirmed working connection with GFXTerm then disconnected GFXTerm)

Initially, when the program first starts it appears to create an .ini file with a range of parameters, the first is a COM port but it defaults to COM0 which then continuously throws up an error in the program about port not existing.

If I edit the .ini file and change the COM port to COM11, although it shows the port in the COM window, SAVE or REFRESH throws up and error box with
Location: OpenCommPort
Description: A device attached to the system is not functioning.

Clicking on OK then brings up another window, Port Error Close Anyway?

Back to the main window but nothing is working as there is no valid connection to a device.

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

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 01:46am 30 Jul 2019
Copy link to clipboard 
Print this post

Hi panky,

Thanks for that, happened when I made a change a while back and forgot to check with a virgin system, uploaded a new file.

Mike
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 02:27am 30 Jul 2019
Copy link to clipboard 
Print this post

Found a second bug in the port selection, fixed and uploaded. I can't generate an error in the COM PORT window under any condition on my system. New file uploaded.

BTW panky, thanks again for the boards, arrived yesterday.

FYI The COM PORT window continually scans for ports while it's open, so any disconnect or reconnect is shown immediately, if a current saved port is disconnected, it now reverts to NONE in the selection list, which is what it was supposed to do.
It's all too hard.
Mike.
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1094
Posted: 07:20am 30 Jul 2019
Copy link to clipboard 
Print this post

@KeepIS,

Thanks mate, all good now.

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

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 04:46am 02 Aug 2019
Copy link to clipboard 
Print this post

For anyone interested, I found another option I wanted and added.

With some of the ARM boards, the MMBasic BIN file is simply copied to a virtual drive. I use this all the time on the ArmH7 and as I want to do as much of the setup as I can from within the program it's now included.

Added COPY BIN button that also looks for an ARM drive and gives you the option of copying the selected BIN file to that location, with the option of selecting another location if needed.

Clicking on a PORT in the COM window now gives you information about the port.

Changed the PIN INFO and layout in the MM.INFO list.

So Basically I can setup a device from scratch, including the BIN file, all options, GUI calibration and program loading.

FYI: When using the old INI file with the new program, some File Save / Open names may have numbers in them, once an entry is changed and saved everything will be back to normal, or just delete the existing Port.INI file.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 08:52am 02 Aug 2019
Copy link to clipboard 
Print this post

My humble apologies, there was an error in the Cancel button in one of the COPY BIN messages.

Fixed and uploaded.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 09:18am 02 Aug 2019
Copy link to clipboard 
Print this post

Wrong file uploaded - fixed.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 12:35am 03 Aug 2019
Copy link to clipboard 
Print this post

COM PORT description now has a permeant entry instead of a pop up. Tidied up some messages, forced cancel select as default on message windows. Added a warning popup for BIN Copy as a final chance to cancel the command.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 06:43am 07 Aug 2019
Copy link to clipboard 
Print this post

The program idea of initially sending options to setup a device has grown as I found it becoming more useful with each addition. This latest incarnation brings together an external program plane. I can set and launch my favourite Editor, Terminal program and more. For the ARM, it brings ST-Link and ST-CUBE programmers together and there are two user PGM defined buttons, one I use to launch PIC32 GUI for my M100.

Almost all are configurable. When opened, they free the COM port for the launched applications and reinitialise it when the external programming application close. The Editor, Terminal and USER APP 3 programs don't restart the port, these program will stay running independently of the my Program. The Programming apps (if open) will close when my program closes or the close button is pressed.

I know I really should make a simple info file for the program when I get a chance.

Lots or changes made to stop the different Devices causing problems as there response to some commands is different in subtle ways under certain conditions.

.


UPDATE: Added a warning in case someone is dumb enough (like me) to have TWO ARM devices connected and therefore two BIN load drives, not a problem except you could reset the baud-rate for wrong device if you're attached to the incorrect device com port. When your experimenting or comparing two similar devices it can happen, this is just a friendly reminder for (me) the next time I forget.

Mike.
Edited 2019-08-07 19:39 by KeepIS
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 04:32am 08 Aug 2019
Copy link to clipboard 
Print this post

Another apology to anyone trying the program, I seem to be doing this a lot lately, I uploaded the program with a debug screen for BIN copy, obviously copy didn't work.

Made P32PGUI a dedicated button, and added an extra user PGM button.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 09:42am 09 Aug 2019
Copy link to clipboard 
Print this post

Another day confined to the computer (health), so I finally sorted the device detect code, port status info and streamlined the last of the old code. The program Window caption now gives the correct port status along with the usual device ID.

The program only tries to find the device twice, if the Device ID is not found it flashes the ID button. Pressing the ID button at any time will send a device command and update the caption if needed.

I'm now happy with the program flow, I even found my old UBW32 Colour Maximite with MMBasic V4.5 and tested that - interesting results in some cases. Uploaded new file.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 09:56am 10 Aug 2019
Copy link to clipboard 
Print this post

I've added Setup options to the program, and a dedicated Tera Term button under the Program button.

Why?

I've been using Tera Term PRO for a while as it allows me to set a terminal of 40 x 132, which means no line wrapping in the Editor on really long lines, like GUI entries.

One of the New Setup options allows you to select the Terminal window size that you want the MM device to be set to, to match the terminal program, obviously you have to set Tera Term to the same terminal size. But once set in tera term and saved, it reopens at that size.

When Tera Term is launched from my program, I send the MM device the console size and colour code settings, followed by sending the Current Device COM port and Baud rate to Tera Term and it opens at those settings.

The other new Setup options are:

Setting Auto ID on/off for port changes. (press ID button to do it manually)
Setting Colour code for the Console output from the device, again for tera term.
Setting to not turn the Device Console ON after closing Tera Term.

BTW If anyone knows a better program than Tera Term, I'd like to try it out, but it must do at least 24 lines and 132 chars.

Hope above makes sense.
Edited 2019-08-10 19:57 by KeepIS
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 02:26am 11 Aug 2019
Copy link to clipboard 
Print this post

Now Remembers the Baud rate for each different port address (up to 10), so quickly switching between 2 or more USB Devices is simple if they are running at different com speeds.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 12:02am 13 Aug 2019
Copy link to clipboard 
Print this post

Got around to adding inbuilt HELP. This Help code is a little different that others.

When the Help button is pressed it flashes as a reminder that it's in Help mode.

When Help is open, all other buttons (except exit) become Help index select buttons, in other words, press any button you want information on. This is a WIP and not fully populated or spell checked, but it covers most of the basic functions.

Quite a few changes to the program launch code.

Having Tera Term launch with the port address and baud rate automatically set to whatever Device port I've swapped to in my program is so convenient. I was trying code snippets on two different MM Basic platforms yesterday, and swapping between them in my program and being able to just press the TERA TERM button and be in the editor in seconds with no re-config of Tera Term ports or baud rate is just so nice. New version uploaded.

NOTE: The ZIP has a directory and help file that must be placed in the program (MM_Options) directory.
It's all too hard.
Mike.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1358
Posted: 02:22am 13 Aug 2019
Copy link to clipboard 
Print this post

Just Uploaded with most of the basic Help added.

EDIT: There will be a few updates from time to time as I get the help a little more refined. Everything I need the program to do has been finalised, so barring bugs, that should be the last of the options and changes. I just added a confirm on Exit as the exit button does a few tasks, so it's just an option if needed, normally that just annoys me. So for anyone using the program, check occasionally as I won't bother post much from now on.
Edited 2019-08-13 14:56 by KeepIS
It's all too hard.
Mike.
 
     Page 2 of 3    
Print this page
© JAQ Software 2024