Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:11 15 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 7 of 13    
Author Message
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 07:41am 30 Sep 2018
Copy link to clipboard 
Print this post

  TassyJim said   You used SSD1963_7A
perhaps try SSD1963_7

Although I expect that touch is separate from the display routines.
Make sure that you haven't clamped the edges of the display when mounting it.

Jim


Tried that and I also felt it would make no difference to touch, aware of LCD construction and pitfalls of Touch panel. New display and not mounted, used on the mm.plus perfectly. Touch actually works well for normal GUI elements, but there is some edge overlap due to calibration errors. Sort ribbon cabling to board, could be a problem but didn't expect touch to be a problem, tried extra earth etc, nothing changes touch cal errors, display quality is perfect, no noise or artefacts.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2143
Posted: 07:44am 30 Sep 2018
Copy link to clipboard 
Print this post

Morning Peter.

There is something odd going on with Function definitions. If I have had a program running and then break into it then call a function from the command line, I get an error on the definition line. If I clear the variables it works as expected, but after a RUN, I get the error again:


> clear
> ? now()
05-01-2000 11:32:21
> run
947071984 05-01-2000 11:33:04 05-01-2000 11:33:04 1 1
947071984 05-01-2000 11:33:04 05-01-2000 11:33:04 1 1
947071984 05-01-2000 11:33:04 05-01-2000 11:33:04 1 1
947071984 05-01-2000 11:33:04 05-01-2000 11:33:04 1 1
947071984
> ? now()
[349] Function Now(opt As Integer) As string
Error: OPT already declared
>


same code running on a MkII works as expected:

> clear
> ? now()
04-01-2000 22:33:27
> run
947025211 04-01-2000 22:33:31 04-01-2000 22:33:31 1
> ? now()
04-01-2000 22:33:38
>




Other than this I had my test code running continuously for five and a half days with no problems.

h

EDIT: NO WAIT! The MKII does the same if I leave it running long enough. Same happens with other functions too. Seems to be mis-operation on my part... never noticed this behaviour before.

live n learn. sorry

Edited by CaptainBoing 2018-10-01
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10078
Posted: 08:05am 30 Sep 2018
Copy link to clipboard 
Print this post

  Quote  same code running on a MkII work as expected:


No it doesn't. The issue arises when you ctrl-C the program while it is in the function. If it is you get the issue. The attached program highlights the issue and was tested on MM2 and Armmite and both give the problem - I'll report to Geoff.

Note CONTINUE also doesn't work if you are in the function when ctrl-C is executed

Do
Print now(a%)
a%=a%+1
Loop
Function now(opt As integer)As string
now=Str$(opt)
Pause 1000
End Function




 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 08:41am 30 Sep 2018
Copy link to clipboard 
Print this post

  matherp said  

  Quote  Perhaps someone here can answer this, nothing I do will allow Calibrate without errors.


The code for calibration is identical for all the displays but I also find that the 7" display is much noisier and more difficult to calibrate accurately - the 5" display works perfectly every time. The 7" display uses a lot of power and has two onboard switching regulators so I suspect that it is inducing electrical noise and that for some reason the STM is more susceptible to this than the PIC. I've already put in additional checks into the calibration as someone else was having problems but I don't think the answer is in software.


Thanks, I'll try my 5" display tomorrow and then have a look at the 7" again with my 200 MHz digital storage scope and see what I can find for my own interest.

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

Guru

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

Just tried the 5" display, it's out about -4 and -8 but that is reported as no errors, however GUI TEST TOUCH has the same garbage on screen when used. Would be interested to know what others see with gui test touch display before I bother looking any further.

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 10078
Posted: 09:44am 30 Sep 2018
Copy link to clipboard 
Print this post



Have you got a SDcard plugged in/connected and not configured?
Edited by matherp 2018-10-01
 
PicFan
Senior Member

Joined: 18/03/2014
Location: Austria
Posts: 133
Posted: 09:58am 30 Sep 2018
Copy link to clipboard 
Print this post

  matherp said  
  Quote  same code running on a MkII work as expected:


No it doesn't. The issue arises when you ctrl-C the program while it is in the function. If it is you get the issue. The attached program highlights the issue and was tested on MM2 and Armmite and both give the problem - I'll report to Geoff.

Note CONTINUE also doesn't work if you are in the function when ctrl-C is executed



Hello Peter !

This bug exists since Version V5.03 and has been mentioned several times by us. Please refer:

HERE:
HERE:

I think the problem exists even if no "function" is used. By reprogramming (PICKIT-3) the problem can be prevented for a certain time, but it will come back. Only with V5.02 does "Control-C and Continue" work perfectly.

Thanks and best regards !

Wolfgang
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10078
Posted: 10:25am 30 Sep 2018
Copy link to clipboard 
Print this post

  Quote  I think the problem exists even if no "function" is used. By reprogramming (PICKIT-3) the problem can be prevented for a certain time, but it will come back.


The second reference is unrelated and was a simple bug in the way memory was allocated when DS18B20 was used.

On the first one, I think Ctrl-C/CONTINUE works perfectly EXCEPT when the code is running inside a function or subroutine when Ctrl-C is executed.

The problem found by CaptainBoing is more subtle, but again relates to executing Ctrl-C whilst processing is inside a subroutine.

Of course the probability of you seeing the problem is entirely defined by the amount of time the code spends in a subroutine compare to the main code which I demonstrated by ensuring that it was pretty much always in the subroutine in my little test program
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 144
Posted: 01:34pm 30 Sep 2018
Copy link to clipboard 
Print this post

Hi, @KeepIS,

The problem you describe with touch is exactly the same with my setup. My displays are from Sainsmart which were always frowned upon in the Arduino camp, Peter has tried one of my displays
and noted problems with touch. As yet NO solution is available.
I would like to try one of my other displays but without a driver no can do (CPLD driver chip).

Trevor.

Ps. @ matherp, are the new daughter boards available yet?
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 04:12pm 30 Sep 2018
Copy link to clipboard 
Print this post

Hi Jim




Thank for this explanation. No problem
next time I read ALL the user manual

Hi peter

  matherp said  

As Jim says the issue is the driver you are using. Unless you specifically need the buffered driver use SSD1963_n_16

If you really need this driver then disable it, load the program and then re-enable it. That way all the RAM will be available for program load.


ok for idea. I can also delete all comments before loading (thank mmedit for this function)


question: when I load prog, fonts are deleted before loading? or can I load somes fonts and after load prog?

  matherp said  
The code reserves some RAM for housekeeeping so you can never use all the RAM available during program load


it is just a remark. In fact it is interesting to know the real available size of the memory
Edited by goc30 2018-10-02
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1837
Posted: 11:19pm 30 Sep 2018
Copy link to clipboard 
Print this post

  matherp said  

Have you got a SDcard plugged in/connected and not configured?


My 5" looks similar to you picture with just a few more noise speckles, its GUI element boundaries are good, the 7" is a bit out on some GUI boundaries.

SD card in or out makes no difference, yes SD card is configured and works perfectly, SD-CS and T-CS work correctly when looking at signal timing on the CRO.

I'm going to power the 7" screens 5 volt and 3v3 supplies from separate regulators and see if there is any difference, no doubt you have already tried something like this but I'll give it a go in any case.

Thanks for the picture.

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

Guru

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

More on the SSD1963 7" Touch screen.

I used 3 separate linear supplies, separate 5V and 3.3v to the LCD and a seperate 5V supply to the armmite, GUI calibrate returned around the same errors of X -2 to -7 and Y -48 to 58.

The interesting thing is that no matter where I press on the screen during Calibrate, the errors returned are basically the same? However the touch position coordinates returned to the program are now way out of position - obviously.

Do the above on a MM-100 and you get errors over a 1000.

There is something not right here:

If I make a page with about 12 buttons then the 7" is unusable - some buttons work, others don't respond, if you use a touch pen you can get some to work, but touch with a finger and what you get is the button press (sometimes) along with a zero returned to the Touch ISR indicating an area of screen with no GUI assignemnt was touched.

This does not happen with the MM-100.

The 5" screen is usable BUT in reality, only with a touch pen. Pressing with a finger returns the button MOST of the time but also returns 0 as well a lot of the time.

Again the MM-100 works fine and does not return 0 unless you press on the edge of a button.

So until I can solve the 7" LCD touch problem it's basically unusable as I really need the 7" screen to work.

This problem with returning almost the same small error values no matter where you press on the screen in calibrate with respect to the calibrate circles is strange, are they being limited in SW and not being displayed?

Any other ideas? Does someone have a 5" display running with around 5 buttons along the bottom of the screen, how reliable is it with using your hands for touch control?

It's a shame as I really love the Armmite now, and the possibilities it promises.

Mike.

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 10078
Posted: 09:14am 01 Oct 2018
Copy link to clipboard 
Print this post

  Quote  So until I can solve the 7" LCD touch problem it's basically unusable as I really need the 7" screen to work.


Please try the attached and let me know if it improves things

2018-10-01_191415_Armmite1.3.zip

 
KeepIS

Guru

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

  matherp said  
  Quote  So until I can solve the 7" LCD touch problem it's basically unusable as I really need the 7" screen to work.


Please try the attached and let me know if it improves things

2018-10-01_191415_Armmite1.3.zip



Thank you, thank you, thank you X 100

Max error -8 on first try with 7" screen, no errors reported and every GUI is great with hand touch.

Thanks again - this is great.


EDIT Y error down to -5 on the second try, tested the limits of the 17 screen button - as good as the M-100, even ONE very small button can be used by hand, the on screen Keypad is now perfect to use.

EDIT: GUI TEST TOUCH now works as expected, one dot exactly where I touch instead of a line of rubbish in random directions
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: 03:39am 02 Oct 2018
Copy link to clipboard 
Print this post

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

Mike.

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

Guru

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

On I have an error I've not seen before.

Program is straight from the MM-100 with pin I/O pin changes.

Everything runs as far as GUI and SD card read writes and buttons flashing are expected with no physical interface - in other words all correct.

The error is:

[1345] While Button_NOT_OFF <> 0
Error: Internal fault (sorry)

The piece of code is:


While Button_NOT_OFF <> 0
Wend


Anywhere in the code where I use this to wait for my short timer_sub that turns the button colour back to normal causes this same error.


If I change the code to below, it works perfectly:


Do While Button_NOT_OFF <> 0
Loop


BTW I'm rapped that this big program with numerous I/O and pages of GUI and SD setup files ran except for this one tiny error - Oh and changing the SD card directory from A:/xxx to R:/xxx

I still have to see if the PWM is working as expected but really impressed so far.

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: 05:02am 02 Oct 2018
Copy link to clipboard 
Print this post

Perhaps I've answered my own question?

Looking at the Micromite Manual, it says that DO WHILE - LOOP is the equivalent of the older WHILE - WEND statement, perhaps it's not been implemented here? Anyway I'll go through the program and replace the few places that I've used WEND.

Mike.

EDIT: Something strange with the SD card:

If I set option autorun on, when the reset button is pressed my program restarts with an error, cannot find Drive R: - the SD card.

If I CTRL-C and type files, I get a list of files displayed from drive R: (SD card)

If I type RUN, the program runs and finds the SD card R: and reads and writes to it.

Press Reset and the cycle repeats - program starts and the SD card R: is not accessible.

EDIT: It looks like CWD$ returns a null when reset is pressed or power is removed and reconnected, typing files and then run is the only way the program gets anything from CWD$
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: 05:41am 02 Oct 2018
Copy link to clipboard 
Print this post

  KeepIS said   Perhaps I've answered my own question?

Looking at the Micromite Manual, it says that DO WHILE - LOOP is the equivalent of the older WHILE - WEND statement, perhaps it's not been implemented here? Anyway I'll go through the program and replace the few places that I've used WEND.

You are right.

I got caught last week when I played with an older program.

WHILE WEND has been superseded in MMBasic. It's still there for now in the standard MMBasic but Peter has not implemented it. There are only a limited number of functions available due to the way programs get tokenised and Geoff might have to drop it in the future.
As you have found, it's easy to update to the new syntax.

I think I will put a test for WHILE WEND in the variable report of MMEdit.

I don't use autorun so haven't noticed the SD card problem.

Jim
VK7JH
MMedit
 
KeepIS

Guru

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

Screen capture:


ARMmite MMBasic Version 5.04.32
Copyright 2011-2018 Geoff Graham
Copyright 2016-2018 Peter Mather

> print cwd$
Error: The volume has no work area

> files
R:/
<DIR> DCIM
<DIR> DROSetup
<DIR> DustSetup
<DIR> JOBS
<DIR> MISC
60778 DustSensor.bas
640 Led.bas
87607 TestiGaging.bas
5 directories, 3 files

> print cwd$
R:/
>



Mike.

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

Guru

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

I did a quick test.
My program loads an image file from the SDcard on startup.
It has no problems finding the file with AUTORUN set.
The file is in the root directory on the SDcard.

I don't have any problem changing directory either.

Jim
VK7JH
MMedit
 
     Page 7 of 13    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025