Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: Weird GUI Numberbox Post ReplyPost New Topic
Page of 2 Next >>
Author
Message << Prev Topic | Next Topic >>
Malibu
Newbie
Newbie


Joined: 07 July 2018
Location: Australia
Online Status: Offline
Posts: 12
Posted: 12 July 2018 at 2:26pm | IP Logged Quote Malibu

G'day All,
Not sure what I've done here, but I have weird things happening when I use the GUI Numberbox...

Around 75% of the time it seems to do what it's supposed to, but sometimes it plays up. If I touch the NumberBox area on my screen, the background dims and highlights the numberbox area - but NOT show the actual 'keypad' on the screen. The numbers will work and I can enter a number (say "123") by 'guessing' where the numbers are located. As I enter each numeral, the number keys then show in full brightness (only the numbers I hit)
By this time, if I select the "enter" key to finish up, the number is displayed on the numberbox area, the screen goes back to full brightness, but the keypad is shown ghosted and hides everything under it....

Here's the code that I'm trying to use

gui NumberBox #64, 20,20,100,30,cYellow,cBlack

and I'm using an MM+E 64 with an ILI9341 screen
None of the other GUI controls seem to be a problem and here's a picture of what I'm blathering about...





It's got me baffled, so any pointers to what I've done wrong would be appreciated

John


Back to Top View Malibu's Profile Search for other posts by Malibu
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2343
Posted: 12 July 2018 at 3:59pm | IP Logged Quote Geoffg

What version of MMBasic are you using?

In the current beta (V5.04.10 beta 2 and 3) I messed around with the NUMBERBOX code so something could have gone wrong. But nothing was touched in previous versions so they should be OK.

The randomness of the occurrence is a worry. That points to degradation of the signal to the LCD panel or the power supply. Do you have anything loading down the SPI bus. Final thing to check is your power supply. Try a solid lab supply, not a USB charger (these have very noisy outputs).

Edited by Geoffg on 12 July 2018 at 4:11pm
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Malibu
Newbie
Newbie


Joined: 07 July 2018
Location: Australia
Online Status: Offline
Posts: 12
Posted: 12 July 2018 at 5:54pm | IP Logged Quote Malibu

Hmmmm.. Ok, the versions are throwing a bit of confusion my way, so I'll give you all the version numbers I can come up with...

- The editor I'm using is "MMEdit Ver 3.7.3" for Windows according to the help (That's the latest version I could find to download)
- The Upload Progress screen reports - "Micromite_Plus_V5.3 Version V5.4H detected". I can't find a V5.4 in the Syntax list, so I picked the latest one.
- Running code of MM.VER gives "5.0408" & MM.DEVICE$ is "Micromite Plus"
- and an "option list" command says -
*OPTION LCDPANEL ILI9341, LANDSCAPE, 43, 42, 44
*OPTION TOUCH 45, 46
*OPTION SDCARD 12, 14
and those were taken from one of the PDF manuals (I don't remember which one at the moment)

So now I don't know what version I have!

My wiring consists only of the LCD and touch screen, plus I have an SD card in as well. All of it runs directly from the USB cable from the computer. Just for quick and easy workflow, I haven't connected an external supply but I could try that.
To check any voltage dips, I could hook up the Fluke meter to supply on the record function to check the MAX and MIN voltage levels if you think it might help.

John

As a post Note: I just ran your demo program for the MM+ (The modified one for the smaller screen) starting on page 45 of the MM+ manual and THAT NumberBox ran sweet 35 times... Hmmm, curious!

Edited by Malibu on 12 July 2018 at 6:07pm
Back to Top View Malibu's Profile Search for other posts by Malibu
 
JohnS
Guru
Guru


Joined: 18 November 2011
Location: United Kingdom
Online Status: Offline
Posts: 1660
Posted: 12 July 2018 at 6:02pm | IP Logged Quote JohnS

Malibu wrote:
My wiring consists only of the LCD and touch screen, plus I have an SD card in as well. All of it runs directly from the USB cable from the computer. Just for quick and easy workflow,


You almost certainly need a proper power supply.

John
Back to Top View JohnS's Profile Search for other posts by JohnS
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2343
Posted: 12 July 2018 at 10:15pm | IP Logged Quote Geoffg

Yes, the power supply is probably the issue.

> Micromite_Plus_V5.3 Version V5.4H detected
That is strange, perhaps something created by Silicon Chip. I would recommend updating to the latest version.
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2541
Posted: 13 July 2018 at 7:35am | IP Logged Quote TassyJim

Geoffg wrote:

> Micromite_Plus_V5.3 Version V5.4H detected
That is strange, perhaps something created by Silicon Chip. I would recommend updating to the latest version.

No, that's MMEdit not up to date with the current numbering system.
H is the 8th letter so it is seeing version 5.408

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
Malibu
Newbie
Newbie


Joined: 07 July 2018
Location: Australia
Online Status: Offline
Posts: 12
Posted: 13 July 2018 at 8:14am | IP Logged Quote Malibu

Thanks to everyone for their assistance

Ok, here's the morning's effort - I downloaded Ver V5.04.10 Beta3, fired up the PicKit3 (first time I've used that one, but I've used PicKit2 many times)
I took a backup of the Version that was on the chip (just in case) and flashed the chip with the latest version... I had no screen connected, no SD Card in and power was supplied by the PicKit.

All good on the verify, so I got everything wired back up, plugged in and windows did it's "doo-dup" for the connection.
I started up MMEdit, got the right port (Com12) and in MM Chat, did an "option list" command, which came back with nothing - as expected...
So, I sent the command
OPTION LCDPANEL ILI9341, LANDSCAPE, 43, 42, 44

... and restarted the board by unplugging the USB cable and got the "da-doop"
Plugged back in, windows did the "doo-dup" and gave me an error on the driver. I did the usual windows driver stuff, but when I tried a re-install it said I already had the best driver.
So...... I flashed with V5.04.09 and you can re-read the last paragraph for those results.
A long story short, I'm now running the original V5.04.08 that I backed up with, windows is happy, the driver is happy and I'm back on Com12 again.

Another "option list" command says I have my original options back in - as expected.

I uploaded some code and everything is back to normal, so I don't know what that problem was either.
Once i get myself organised, I'll try power from another source and see what happens with that attempt
I'll keep you posted..

Speaking of separate power supply, is there any reason why I couldn't use a diode in place of J1 instead of fiddling with the jumper? I would guess that something like a schottky would be best?

John
Back to Top View Malibu's Profile Search for other posts by Malibu
 
TassyJim
Guru
Guru


Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2541
Posted: 13 July 2018 at 9:35am | IP Logged Quote TassyJim

With the EXplore64, I found it much easier to use a USB-TTL adapter and connect to the console pins. That way you ignore the inbuilt USB and can do things like reset and power cycle without loosing the USB connection.
Windows doesn't like you playing with USB while in use.

Separate power is also a mist for sanity.

Jim


__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
Azure
Guru
Guru
Avatar

Joined: 09 November 2017
Location: Australia
Online Status: Offline
Posts: 300
Posted: 13 July 2018 at 10:01am | IP Logged Quote Azure

Malibu wrote:
Speaking of separate power supply, is there any reason why I couldn't use a diode in place of J1 instead of fiddling with the jumper? I would guess that something like a schottky would be best?
John


There are 2 things that may cause trouble.
1. That still feeds the USB power to your other input voltage (not good), so it would also need a blocking diode.
2. That is getting very close to the limits of what the LDO regulator can make work. The USB power is going to be slightly below 5V at the board (after the USB lead). With a low forward voltage drop Schottky it only leave a few hundred mV at best without sending the LDO below its required Vin so it can maintain the refgulated output voltage.

That approach is normally used when there is more headroom between the supply voltages and the required output voltage.
Back to Top View Azure's Profile Search for other posts by Azure
 
panky
Guru
Guru
Avatar

Joined: 02 October 2012
Location: Australia
Online Status: Offline
Posts: 510
Posted: 13 July 2018 at 11:21am | IP Logged Quote panky

@Malibu,

As TassyJim said, Windows does some crazy things when you plug/unplug the USB.

It can assign a different COM number and some programs won't pick up the new assignment. Even if the assignment stays the same, MMEdit for example, will not automatically reconnect. You need to close MMEdit, plug the USB in again and then re-start MMEdit (no criticism Jim, I love MMEdit and use it every day - thanks).

You should never need to re-load any USB drivers. I use Teraterm to quickly check what COM ports are available, then close it and connect with MMEdit.

As Jim said, during any sort of developement stage, it is a great deal easier to use a USB to Serial adaptor and power the MM via an external power source - that way when you power reset the MM, the USB connection (from the PC's perspective) stays active all the time.

panky




__________________
DonTSM1,Duinomite,CGCMM1,CGCMM2,2xDimitech,3xWWuMites,MicksMuP,Grogster1A,4xPeterMuM+,Zonker DIP-600,3xCGuKits,CGuBoard2,SnadPic100,SCBP64 & Exp100,PMMZ144,PMMZ100 .. and loving it![:D
Back to Top View panky's Profile Search for other posts by panky
 
Malibu
Newbie
Newbie


Joined: 07 July 2018
Location: Australia
Online Status: Offline
Posts: 12
Posted: 13 July 2018 at 12:47pm | IP Logged Quote Malibu

Thanks for the input

I hooked up my Fluke for a while on 1ms record function to watch the power supply (just out of curiosity - I'll power externally once I get a few other jobs out of the way)
------------------------------------------------------------
Maximum: 5.045V, Minimum: 4.813V, Average: 4.959V over 1h32m
------------------------------------------------------------
I wouldn't have called it as being a problem, but I don't know a whole lot about power supply by USB systems... No probs, it's on the to-do list

One thing I do know about USB's is that windows has a wobbly with plugging/unplugging, so I'm comfortable with that side of things. When I do disconnect, I find it's easier to leave the MM unplugged, reset the Comms connection in MMEdit, plug it back in and re-allocate the port. A bit of a hassle, but I know what windows does, so I'm good with that.

What I didn't understand is why windows suddenly give me a port problem when I configure the screen, even though it was happy previous to the screen command.
Again, it's on the to-do list and I'll play around with the firmware upgrades a little later...

Thanks for everyone's help (I'll keep you updated as I try things)
John
Back to Top View Malibu's Profile Search for other posts by Malibu
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 5887
Posted: 13 July 2018 at 8:10pm | IP Logged Quote Grogster

The Explore-64 was designed before the wonderful 1455 USB chip became the now-standard way to connect USB to a Micromite, and also allow easy upgrading of the firmware in the PIC32 WITHOUT needing a PicKit-3 or the Microchip IPE.

The built-in USB on the PIC32 chip is technically under control of the PIC32 core - and that is fair enough. But what that means, is that when you press RESET on the E64 or earlier model E100, the core restarts. Windoze then throws a fit, and drops the VCP(Virtual COM port). The only way to get it back, is to remove the USB plug and put it back in again. This is such a PITA, that the native PIC32 USB connection has now been discontinued.

All of this was only discovered after some testing with the E64 and E100 module. The MMX has a 1455 chip, the latest versions of the E100 have a 1455 chip. The E64 does not, mainly due to space restrictions.

Edited by Grogster on 13 July 2018 at 8:13pm


__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 


Page of 2 Next >>
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1406 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.14