Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:02 02 Aug 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 : Micromite and Micromite Plus Beta 32

     Page 2 of 3    
Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 12:20pm 28 Sep 2015
Copy link to clipboard 
Print this post

  WhiteWizzard said  could you consider adding a 'default' backlight parameter to the OPTION LCDPANEL SSD1963.... command

You could do this in MM.Startup

  WhiteWizzard said   If I then switch WP on (on the SD card), then system resets

What exactly do you mean by "system resets" ?
Did you get an error message?
what was it?

Geoff Edited by Geoffg 2015-09-29
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 01:21pm 28 Sep 2015
Copy link to clipboard 
Print this post

  Geoffg said  If you ask Microchip about this they say use the code from Harmony (Aaaggghhh).


Rather then an aaaggghhh scream, two words......and the 2nd one is 'Off!'.

It never stops amusing me that they call it 'Harmony'.
Something of a contradiction, based on a few people who have had a go at Harmony.
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 08:14pm 28 Sep 2015
Copy link to clipboard 
Print this post

  Quote  
  WhiteWizzard said  could you consider adding a 'default' backlight parameter to the OPTION LCDPANEL SSD1963.... command

You could do this in MM.Startup


Yeah, thats what I've done - just thinking of trying to think of ways that would reduce the size of my current Library. Is there a size limit (other than physical memory) as to how big the Library can be?

  Quote  
  WhiteWizzard said   If I then switch WP on (on the SD card), then system resets

What exactly do you mean by "system resets" ?
Did you get an error message?
what was it?

Geoff


Because I have a CLS in my MM>Startup (Library) I do not see any message.
It was when I was taking CLS out of MM>Startup (to see if there was an error message) that the reset issue disappeared; and the reason I had to edit my post saying I can't get it to go wrong any more. I will see if I can re-create this scenario again . . . .
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 724
Posted: 08:24pm 28 Sep 2015
Copy link to clipboard 
Print this post

Isn't there someone out there who owns a Bus / Protocol-analyzer/ digital scope to compare what is going wrong here?

There must be a difference on the USB bus " between MM+ and the Maximite on Win 10.
MX 795 and MX 470 seem to work different with "essentially the same USB" code.Edited by atmega8 2015-09-30
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:46pm 28 Sep 2015
Copy link to clipboard 
Print this post

Error in manual:

Micromite manual page 11
The pins for the 64pin MM+ have 'CONSOLE Rx (IN) | COM4: Rx' on pin 6 as well as pin 12.
Pin 6 is the original (and working) pin for CONSOLE Rx

Jim
VK7JH
MMedit
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 12:33am 29 Sep 2015
Copy link to clipboard 
Print this post

Thanks Jim.


  WhiteWizzard said  Is there a size limit (other than physical memory) as to how big the Library can be?

No, the whole 100KB of free flash could be used up by the library if you wanted to do that.

On the MX170 library space is allocated in 1KB chunks and in 4KB chunks on the MX470. So, you might as well put as much into the library as you want up to 4KB. If you go over 4KB you will cause a second chunk to be allocated (8KB total), etc.

Geoff
Geoff Graham - http://geoffg.net
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 1003
Posted: 12:02am 30 Sep 2015
Copy link to clipboard 
Print this post

Issue with DISTANCE() command on MM2+ at CPU SPEED 120 and 100.

I am using Beta32 on a SNAD-PIC and think there is an issue with the
DISTANCE() command using HC SR04. The value returned seems to be double that expected at CPU Speeds of 100 and 120.
Lower CPU speeds return the expected value.
I have not tested on a 64 pin MX470.



'Test of 100 pin MX470 and ILI9341
'Demonstrate issue with distance() function and HC SR04.
'At CPU speeds 100 and 120 returns a value twice the distance.
'
'Seems OK at lower speeds.

'CPU 30 'returns correct distance
'CPU 80 'returns correct distance
'CPU 100 'returns double distance
CPU 120 'returns double distance
SETTICK 1000,tick4,4
FONT 2,2
Do:LOOP


SUB tick4
' ? DISTANCE(52,53)
TEXT 1,1,STR$(DISTANCE(52,53))+" "
END SUB


Regards
Gerry
Latest F4 Latest H7 FotS
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 01:57am 30 Sep 2015
Copy link to clipboard 
Print this post

Thanks, just from reading your great description I can guess what the issue is. I will fix it ASAP.
Geoff Graham - http://geoffg.net
 
MMAndy
Regular Member

Joined: 16/07/2015
Location: United States
Posts: 91
Posted: 05:48pm 30 Sep 2015
Copy link to clipboard 
Print this post

SSD1963 TO MM+ 100 pin connections...

The touch MISO and MOSI connections going to pins 12 and 11 the 100 pin MM+
seemed to swapped on the Advanced Features PDF?
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 11:22pm 30 Sep 2015
Copy link to clipboard 
Print this post

Thanks Andy, I will fix it in the next beta.
Geoff Graham - http://geoffg.net
 
crez

Senior Member

Joined: 24/10/2012
Location: Australia
Posts: 152
Posted: 02:16am 01 Oct 2015
Copy link to clipboard 
Print this post

Running the following code under beta 32 gives some strange results. When the step size is set to 0.1, the step is sometimes slightly higher of lower than this.

tmax_set=1
CLS
GUI Spinbox tmax_set, 20, 20,130, 40,RGB(white),RGB(black),0.1, 30, 60
CtrlVal(tmax_set) = 40
Do
Text 0,70,Str$( CtrlVal(1))+" "
Text 0,90,Str$(CINT(10*CTRLVal(1))/10)+" "
Loop

for example, when the value is stepped up to 43.2, the next step leaves the displayed value in the spinbox at 43.2. the ctrlval has increased to 43.2999 and the second displayed value below the spinbox reads 43.3. It would be nice if the value displayed in the spinbox was rounded to the number of displayed digits, which depends on the width of the box.

David
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 02:30am 01 Oct 2015
Copy link to clipboard 
Print this post

@Geoff,

Small BUG:

At the command prompt, if an arrow key is pressed after the delete key, then the typed entry is misinterpreted.

I'll give an example:

At the command prompt, start typing a valid command such as EDIT, and at anytime press Delete AND THEN an arrow key. Now complete the word correctly. Even though EDIT is now displayed as the typed input, when Enter key is pressed the response is 'Error: Unknown command'.

I have not checked for any other keys other than the four arrow keys - hopefully this is enough info to track the issue down.

WW

EDIT: Note this is on a standalone SSD/PS2 setup.

ALSO: Just got a similar thing with ESC key. Type: 'E' then 'D' then 'I' then hit ESC, then type 'T'.
'EDIT' will be displayed, but as soon as you hit Enter, you get the same 'Error: Unknown command' message.Edited by WhiteWizzard 2015-10-02
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 05:52am 01 Oct 2015
Copy link to clipboard 
Print this post

Yes, that is because the codes for up arrow and escape have been entered into the input queue and read by the command prompt. You cannot see them (they are non printing chars) but they are still there and embedded in your string.

I am tempted to say just stop doing it and the problem will go away but there are a couple of other things that could be done. One is to make the non printing chars visible (hard) or magically remove them from the input queue (even harder).

I will look at it but it is not the highest priority.
Geoff Graham - http://geoffg.net
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 05:56am 01 Oct 2015
Copy link to clipboard 
Print this post

  Geoffg said   One is to make the non printing chars visible (hard) or magically remove them from the input queue (even harder).


There is a 3rd option, Ignore them in the command line editor code so that they don't get entered at all.

Cheers
Chris

http://caroper.blogspot.com/
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 06:15am 01 Oct 2015
Copy link to clipboard 
Print this post

  Geoffg said  ... I am tempted to say just stop doing it and the problem will go away .... will look at it but it is not the highest priority.


It is one of those things that happened 'randomly' and took time to work out exactly what was causing the Error message. I agree, I WILL stop doing it, but if I can see the message, then 'others' will too and when first witnessed it makes you think 'what did I do wrong?'

Agree, not the highest priority - but striving for perfection then . . . . .

WW
 
piclover
Senior Member

Joined: 14/06/2015
Location: France
Posts: 134
Posted: 12:39pm 01 Oct 2015
Copy link to clipboard 
Print this post

Greetings,

I just received a couple of ILI9341 panels I ordered from China on Ebay (man, it's incredible that such a little jewel can be found at such a low price !... It's cheaper than a 2 lines x 20 chars LCD display !).

I like a lot the new ability of MMBASIC v4.7 to control such a panel, but something is annoying about the panel (and touch) configuration: the fact it's done via a persistent OPTION (which must be typed in the console, and can't even be part of a program, if to believe the manual) makes it impossible to change the pins assignment on the fly in a program; I tested the panel on a Micromite bench module I made a few months ago, and the latter got a 2 lines LCD display too, which happens to share a Dn line of the LCD display with SPICLK (not a problem, as long as you hold the corresponding CS line disabled while you use that pin for an other purpose). As a result, when my default program runs after I issued the OPTIONs to configure the LCD panel + touch screen, it stops complaining that the line was configured for a different purpose on startup...

On a PI32MX170, pins are sparse, and it should be possible to reassign them via the program (like LCD INIT and LCD CLOSE do allow).

So my question is: could we get either a LCDPANEL/TOUCH INIT/CLOSE instead of the options, or could we, at least, have a command to "suspend" the saved OPTION and reuse the pins (excepted the CS pin, obviously) as we wish in the program ?Edited by piclover 2015-10-02
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 12:48pm 01 Oct 2015
Copy link to clipboard 
Print this post

  crez said   Running the following code under beta 32 gives some strange results. When the step size is set to 0.1, the step is sometimes slightly higher of lower than this.

David


Floating point rounding.

The problem was noticed and a solution found a couple of weeks ago.
http://www.thebackshed.com/forum/forum_posts.asp?TID=7956&PN=4

Jim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 02:32pm 01 Oct 2015
Copy link to clipboard 
Print this post

  piclover said   Greetings,

I just received a couple of ILI9341 panels I ordered from China on Ebay (man, it's incredible that such a little jewel can be found at such a low price !... It's cheaper than a 2 lines x 20 chars LCD display !).


It certainly is amazing, the things that can be had on eBay.

  piclover said  I like a lot the new ability of MMBASIC v4.7 to control such a panel, but something is annoying about the panel (and touch) configuration: the fact it's done via a persistent OPTION (which must be typed in the console, and can't even be part of a program, if to believe the manual) makes it impossible to change the pins assignment on the fly in a program; I tested the panel on a Micromite bench module I made a few months ago, and the latter got a 2 lines LCD display too, which happens to share a Dn line of the LCD display with SPICLK (not a problem, as long as you hold the corresponding CS line disabled while you use that pin for an other purpose). As a result, when my default program runs after I issued the OPTIONs to configure the LCD panel + touch screen, it stops complaining that the line was configured for a different purpose on startup...


The LCD commands are persistent because there is quite a bit going on in the background to drive these displays, so that you only need worry about a line or two of BASIC code to talk to them. Enabling/disabling the displays on the fly is not really possible with the current MMBASIC concept. Personally, I like it this way as it is a case of 'set it and forget it'.

To return the pins to their normal state so you can use them again for other things, you enter OPTION LCDPANEL DISABLE and/or OPTION TOUCH DISABLE. These commands will return the pins to their normal state, stopping that pin-assigned error you are seeing.

However, you can't have it both ways. Enable/disable has to be done at the command prompt.

  piclover said  On a PI32MX170, pins are sparse, and it should be possible to reassign them via the program (like LCD INIT and LCD CLOSE do allow).


A nice idea. My understanding is that this is not currently possible, because all of these LCD displays have initialization code that must be run to set them up ready to be talked to. All this initialization is done in the background for you, when you issue the OPTION LCDPANEL or OPTION TOUCH commands. This is problematic to do from within a BASIC program, as most of those commands require a restart of the PIC32, so that it can initialize the display and/or touch BEFORE it hands control over to the interpreter. That is how I understand it works(and I may be wrong - others will correct me if so), so therefore, hot-swapping within the code is not really possible with the current method.
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 02:36pm 01 Oct 2015
Copy link to clipboard 
Print this post

  piclover said  something is annoying about the panel (and touch) configuration: the fact it's done via a persistent OPTION (which must be typed in the console, and can't even be part of a program

A lot of people hare complained about this but it was necessary because (on the MX470) the screen must be configured before the prompt is displayed. Another issue is that calibration can only be done after the screen has been set up and you do not want to redo the calibration every time you start a program.

Some people like it the way that it is, others do not. It is only a problem when you are experimenting with different displays and configurations but, if your have a fixed setup (as in a final design) it works well.

Geoff
Geoff Graham - http://geoffg.net
 
crez

Senior Member

Joined: 24/10/2012
Location: Australia
Posts: 152
Posted: 03:51pm 01 Oct 2015
Copy link to clipboard 
Print this post

Yep, that'll fix it. It would be nice if a work-around wasn't needed though. I guess there is bigger fish to fry at the moment.

David
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025