Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:53 16 May 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 : Armmite H7: Full release & documentation

     Page 8 of 13    
Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 06:09am 02 Oct 2018
Copy link to clipboard 
Print this post

I edited the first one about autorun on, makes no difference.

Ops looks I missed the first mention of autorun, autorun is not a problem.

The last post is 3 commands from the command prompt at power up, you can see the error. There is no program loaded or running.

Mike.

Edited by KeepIS 2018-10-03
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 06:21am 02 Oct 2018
Copy link to clipboard 
Print this post

Jim I got it going:

All I had to do was this:

Put Chdir "R:/" as the first command before checking the current directory with CWD$.

In Geoffs Basic this is not needed as CWD$ returns the current directory straight away.
Edited by KeepIS 2018-10-03
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6224
Posted: 06:35am 02 Oct 2018
Copy link to clipboard 
Print this post

You can also do
CHDIR "."
That way it won't change any existing folder location.

Jim

VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 06:43am 02 Oct 2018
Copy link to clipboard 
Print this post

Yes I've actually gone with CHDIR ".." to go to the root. I have a generic function for creating directories if they don't exist, and not changing directories if I don't need to. But it's interesting that the Current directory string CWD$ is not being initialised at start-up as it is in all versions of MM.Basic that I've used on the MM-100. My first command was always where am I? using the contents of CWD$.

MikeEdited by KeepIS 2018-10-03
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10079
Posted: 07:07am 02 Oct 2018
Copy link to clipboard 
Print this post

When I do a port I start by commenting out all code that won't work on the new platform, then as I implement the features one by one I either re-instate or replace the code as required. I left in a commented SD card initialisation on the CWD$ function

Should work now:

2018-10-02_170533_Armmite1.3.zip

As Jim explains, in order to save command tokens I've removed all the deprecated Basic statements like WHILE/WEND. It should give a better error but the problem is that WHILE is still a valid keyword just not in that context.

  Quote  Another question - when using the display drivers in 8 bit mode, are data bits D7 to D15 available for general use?


No: the only advantages of the 8-bit drivers are that they are RGB888 rather than RGB565Edited by matherp 2018-10-03
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 09:05am 02 Oct 2018
Copy link to clipboard 
Print this post

  matherp said   When I do a port I start by commenting out all code that won't work on the new platform, then as I implement the features one by one I either re-instate or replace the code as required. I left in a commented SD card initialisation on the CWD$ function

Should work now:

2018-10-02_170533_Armmite1.3.zip


Yes I guessed that WEND had been dropped and it only took a few minutes to convert.

Like I said, everything is running great, screen is perfect and I only mention the things I find like CWD$ in case it was an oversight, and again, an easy work around, thanks again for all the ongoing work and the updated files.

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10079
Posted: 09:54am 02 Oct 2018
Copy link to clipboard 
Print this post

  Quote  I only mention the things I find like CWD$ in case it was an oversight


Please do raise everything you find.

The attached should give a better error message with WHILE for which thanks to Geoff who sent me the code change to properly get rid of WHILE/WEND

2018-10-02_195332_Armmite1.3.zip
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 10:17am 02 Oct 2018
Copy link to clipboard 
Print this post

Thanks again, and I will be using these for all my projects from now on.

So slightly off topic - but - the program I wrote for the MM-100+ that controls what is basically a dual axis CNC with 3 steppers and SYNC generating and decoding of two Digital positioning slide scales went across with only the pin numbers changed in the header constants for the 25 I/O pins and dual PWM channels.

I just wired up the two Digital scale slides and they worked perfectly first time, the speed difference in timing and sync clock generation is like night and day between the 120 MHz MM-100 and this thing, it absolutely flies.

I spent almost 2 days mapping every pin on a large colour print out of the two main board headers, so once done, pin selection for the 25 I/O pins literally took seconds. No conflicts, every port works first time and I'm just blown away, glad I stuck at it.

Thank you again for all the effort that is going into making this Armmite such a fabulous platform for Geoffs wonderful MM.Basic and the effort in porting it across and getting this device working with it.

Mike.


NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
2001cpx

Regular Member

Joined: 03/10/2013
Location: Canada
Posts: 59
Posted: 09:40pm 02 Oct 2018
Copy link to clipboard 
Print this post


Very Great Jobs!! Thanks,

This Is a Very Low Cost Devboard,Buyed at Element for 30$.

VGA out Option Will Be Great!
"Color Maximite,(Duinomite-Mega,Mini),CGmmStick,GCmicroboard2b,Micromite + explore 64,100,LCD backpack,Lcd Backpack V2,TFT Backpack,Micromite Extreme,Armmite L,F,H,CMM2"
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 06:12am 03 Oct 2018
Copy link to clipboard 
Print this post

Latest Armmite1.3.zip

NOTE: If you put the card back in while it's locked, the CTRL-C prompts suddenly reappears and/ or the EXIT button will now work.


Option default none
Option explicit

Font 4
GUI BUTTON 2,"EXIT",100,100,80,100,RGB(white),RGB(RED)

DO
IF TOUCH(REF) = 2 then END

TEST_SD()

LOOP


SUB TEST_SD()
local TMP as string
on error ignore
TMP = CWD$
on error abort
END SUB



Without an SD card this locks the system and only a reset will get it back to the prompt - CTRL-C will not work OR plug an SD card back in.

I've updated the code make it easier to test.

Take out the GUI and it will run without locking.

NOTE It's not just CWD$ but Chdir will do the same, anything that tries to see if an SD card is present without crashing to the prompt won't work, it works in the MM-100.

Hopefully someone else can try this and confirm.

EDIT: It also needs to be in a Procedure for it to lock, does not lock in the main loop as easily.
Edited by KeepIS 2018-10-04
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6224
Posted: 06:41am 03 Oct 2018
Copy link to clipboard 
Print this post

You have tight loop
Put a pause in the main loop and it works OK.
  Quote  OPTION DEFAULT NONE
OPTION EXPLICIT

FONT 4
GUI BUTTON 2,"SETUP",100,100,80,80,RGB(WHITE),RGB(RED)

DO

TEST_SD()
PAUSE 1000 ''''''''''''''''''''''''
LOOP


SUB TEST_SD()
ON ERROR IGNORE
PRINT CWD$
ON ERROR ABORT
PRINT "123"
END SUB


Without the PAUSE, there is no time to check the console/keyboard.

Jim
VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 06:56am 03 Oct 2018
Copy link to clipboard 
Print this post

I had a longer pause in there initially, but stripped everything out that was not needed, in my system I can CTRL-C out first time every time without any pause.

I've changed the code I posted to show how it appears to hang without the SD card but starts working once a card is inserted. Like I said - I need to check for a card error without crashing to the prompt, I've been doing this for ages, now it no longer works.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6224
Posted: 07:12am 03 Oct 2018
Copy link to clipboard 
Print this post

My version loops happily and prints 123 without the SDcard inserted and 123 and the CWD with it inserted.
RUN
123
123
123
R:/
123
R:/
123
R:/
123
>

Output when started without the SD card then continues when the SDcard is inserted.

Jim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10079
Posted: 07:45am 03 Oct 2018
Copy link to clipboard 
Print this post

Need more info. What is the objective here? I can understand a single test at the start of a program as to whether the SDcard is inserted but to continue to check over and over again? Are you using CD?

It would be possible to create a system variable MM.SDCARD that gives the status of the SDcard rather than the coarse technique of trying to access it.

Checking the SDcard is easy enough if CD is wired. If it isn't you have to send a command and wait for a response or timeout. This wastes processor time so I have only set this to happen every 65536 Basic statements.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 08:02am 03 Oct 2018
Copy link to clipboard 
Print this post

This is a tiny crappy test program to show that trying to check if the SD card is working causes the program to NOW appear to hang until a card is inserted.

!: The SD card is ONLY checked ONCE in the main program and normally bring up a message box alerting the user that the SD card cannot be read.

2: It ONLY appears to hang if GUI elements are declared.

3: I'm using the SD slot on the LCD.

4: In the previous version I got my message box if the card was faulty or removed.

5: In the latest version I don't, it never get to the message box because it sits somewhere in MM.Basic until a SD card is eventually inserted OR reset is pressed.


NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10079
Posted: 08:05am 03 Oct 2018
Copy link to clipboard 
Print this post

  Quote  In the previous version I got my message box if the card was faulty or removed.


Which version?
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 08:34am 03 Oct 2018
Copy link to clipboard 
Print this post

Should have said the previous ZIP that fixed the display problem.

NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 09:00am 03 Oct 2018
Copy link to clipboard 
Print this post

Look like I was wrong I didn't check with no card on the previous version.

So the only solution is to just plug in a card or a new card and wait for whatever is happening outside of the main program to see a card, and then it returns back to the next line in the main program.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 144
Posted: 09:30pm 03 Oct 2018
Copy link to clipboard 
Print this post

Hi Peter,

The last changes to touch on page 12 you wrote:-
  Quote  Please try the attached and let me know if it improves things

2018-10-01 191415 Armmite1.3.zip

Well it worked for for me also.. Many Thanks!!!

Have you one of the daughter boards V1.3 available??

Trevor.
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 02:24am 04 Oct 2018
Copy link to clipboard 
Print this post

The last word on the SD card - I promise.

I did a rewrite of the main SD check code so that swapping the SD card from the MM-100 into an Armmite and back the other way always works even though the drive letters are different.

First off, I realise that the following would likely not happen if I had a card detect line on the LCD SD slot.

The same complete application is running on both units:

MM-100 with CD Disabled for this test.

MM-100 no SD card:

Pops up a program message box with an error (takes about 2 seconds to appear) click OK and the program opens with default set-up values.

Armmite no SD card:

Will sit forever inside the Basic interpreter and will never come back to the next line.

HOWEVER: Every so often on a restart it will continue and bring up the program Message box.

Both the Armmite and MM-100 handle a newly formatted SD card with no files or directories. They both open the correct message boxes and make the missing directories and setup files as needed.

NOTE: The SD program code runs with "ON ERROR IGNORE" and checks for errors accordingly. There is never a dump to the prompt no matter what the error. On exit from the SD code "ON ERROR ABORT" is set.

So it's all good, I'll get an small SD reader with CD and use it instead of the LCD unit, which is not that good at holding the SD card anyway.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
     Page 8 of 13    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025