Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:04 01 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 Plus USB coms problem

     Page 1 of 2    
Author Message
Gillis55
Newbie

Joined: 01/02/2018
Location: Australia
Posts: 21
Posted: 08:48am 01 Sep 2018
Copy link to clipboard 
Print this post

Guys, I've just resurrected a now fairly ancient ASUS EeePC notebook running Windows 7 Starter. I've had success using this PC to communicate to a Micromite via one of the USB ports but I have no joy trying to connect to a Micromite Plus backpack via USB. I've followed the advice provided by Geoff Graham by installing the Maximite USB driver as per instructions in Geoff's Micromite Plus manual V5.4 and driver download from his website, however, still no joy. The PC recognizes the MM Plus and I can get either Terra Term or MMEDIT to open a USB connection but with a blank screen and no response from the MM Plus. Any thoughts/ideas would be much appreciated otherwise I think the notebook may have had its last chance and is heading for the bin?
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 09:02am 01 Sep 2018
Copy link to clipboard 
Print this post

Does the MM Plus possibly have a program AUTO running?

Try pressing CTRL-C (control key and the 'c' key) to see if it returns you to the MMBASIC Command Prompt

WW
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 10:03am 01 Sep 2018
Copy link to clipboard 
Print this post

Couple more questions Gillis55, when you say " the PC recognises the Micromite", what does this mean? Do you get a copyright message when when you press Reset?

You also talk about a "Maximite USB driver" - make sure you have the Microchip USB driver which is required for the Micromite when you are driving the 470 directly as in the Sil Chip MM+ backpack.

Doug.

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
SteveA
Regular Member

Joined: 10/03/2017
Location: United Kingdom
Posts: 48
Posted: 11:29am 01 Sep 2018
Copy link to clipboard 
Print this post

I've had similar problems with the MM+ backpack on a chromebook.

It turned out the usb socket couldn't supply enough current to run the board.

Try powering the MM+ from a bench psu or batteries.

Another thing I found was using a very short, but thick usb lead helped because it reduced the voltage dropped by the cable.
 
Gillis55
Newbie

Joined: 01/02/2018
Location: Australia
Posts: 21
Posted: 11:35am 01 Sep 2018
Copy link to clipboard 
Print this post

Hi WhiteWizzard, my MM Plus does have a program in AUTO running, however, CTRL-C has no effect. I have no problem using my desktop PC running Windows 10.

Hi panky, no copyright message received. Your advice re use of the Microchip USB driver makes sense. Do you have a link to a download for this?

G55
 
Gillis55
Newbie

Joined: 01/02/2018
Location: Australia
Posts: 21
Posted: 11:43am 01 Sep 2018
Copy link to clipboard 
Print this post

SteveA, not a bad thought. My MM+ backpack is mounted in an enclosure so it will take a bit of effort to separately power but I'll give this a try when I can.

G55

 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 02:48pm 01 Sep 2018
Copy link to clipboard 
Print this post

Try simply removing the TFT (to minimise current draw) and then Ctrl-C to see if you get to the Command Prompt!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:22pm 01 Sep 2018
Copy link to clipboard 
Print this post

There is a known problem with the USB on recent versions of MMBasic when running Windows prior to W10.
The best fix is to use an external USB-TTL adaptor.

Geoff is aware of the problem but is unable to look for a fix for a few weeks.

Jim
VK7JH
MMedit
 
Gillis55
Newbie

Joined: 01/02/2018
Location: Australia
Posts: 21
Posted: 03:07am 02 Sep 2018
Copy link to clipboard 
Print this post

Guys, I'm pleased to report the cause of my problem has been found . SteveA was spot on when advising it could be a USB supply problem. As suggested, I separately powered the MM+ backpack and now all good talking to the EeePC notebook. The supply current being drawn by the MM+ backpack was about 150mA with TFT on about 20% brightness. Obviously all too much for the USB capability of the notebook. Oh well, the old EeePC notebook has its limitations but now understanding this I think it may still be useful for some tasks so it has been saved from the scrap heap for a little bit longer.

Thanks for all you help which has been much appreciated.

I've had a lot of pleasure playing around with the Micromite technology to date and have now successfully built a number of useful little projects....well to me anyway. It's nice to know the "brains trust" are available if/when required.

Hoping to see more great things from Geoff Graham and the team in the future.

Stephen (G55)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 04:06am 02 Sep 2018
Copy link to clipboard 
Print this post

150mA SHOULD be well within the USB power spec. The average USB port should be able to supply up to 500mA, so I am surprised to see such a low current being allowed on that EeePC. Good for flash-drives, and not much else!
Smoke makes things work. When the smoke gets out, it stops!
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 949
Posted: 09:54am 02 Sep 2018
Copy link to clipboard 
Print this post

@Grogster:

...150mA only for USB3.0!:

"Low-power devices (such as a typical USB keyboard) may draw at most 1 unit load (1 unit load is 100 mA for USB devices up to USB 2.0, while USB 3.0 defines a unit load as 150 mA), and all devices must act as Low-power devices when starting out as unconfigured. " - from Wikipedia...

If a device requires more power, it must first request this from the host and must first be released by the host.

Frank
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 02:44pm 02 Sep 2018
Copy link to clipboard 
Print this post

a useful summary can be found here:
www.ti.com/lit/an/slyt118/slyt118.pdf
with the datasheet for one of the devices referenced in the above here:
http://www.ti.com/lit/gpn/tps2140

this does raise an interesting set of issues. until the USB connection is up and running and the MX470 is talking to the USB port, no more than 100mA can legally be drawn. at that point it is then up to the USB code in the MX470 to ask for an increase in available current (in steps of 100mA up to a maximum of 500mA). this request may or may not be granted.

now if the MX470 had control over the colour LCD backlighting, this is not impossible to implement - i have no idea if such negotiation is currently carried out by the mmbasic firmware. the MX470 would just need to be careful to not turn on the backlighting until it was granted 500mA of current draw. however, if the backlighting is hardwired on, probably a not uncommon arrangement, all bets are off.

i have it in the back of my mind that the current 1455 firmware (version 1.18) does not ask for more than 100mA, peter will be able to confirm this either way. but this is a moot point if the backlighting is hardwired on. have just checked the CP2102 datasheets, and as far as i can tell the default configuration used by it is also only 100mA.


what does this mean? well, essentially we can not assume that more than 100mA is available from any USB port a micromite is plugged into. while some ports may have no or only limited current control (older desktop PCs are the more likely to be wired up like this), modern notebook computer will more than likely exert far more stringent power management.

while a device (such as your cellphone) can negotiate for up to 500mA, until such a request is granted no more than 100mA can legally be drawn. this is a big problem for any device that wants to draw higher currents right from the get go.


i can't think of a good solution to the conundrum! the only thing that comes to mind is a 1455 configured to provide two extra outputs - '5v enable' to turn on a 3v3 regulator for the MX470, and '500mA OK' to indicate to the MX470 that it is ok to draw more than 100mA. i think this could be done in a backwards-compatible way, using the 2 spare pins on the 1455 and configuring them as open-collector(ish) outputs.


cheers,
rob :-)
Edited by robert.rozee 2018-09-04
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 04:37pm 02 Sep 2018
Copy link to clipboard 
Print this post

At the moment the V1.18 pic16F2455 asks for 100ma

Change this line in the hex

:1010000002348034323408340B3400340234023475


to

:1010000002348034FA3408340B34003402340234AD


and it will ask for 500mA
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 05:03pm 02 Sep 2018
Copy link to clipboard 
Print this post

problem is this doesn't solve the issue of the LCD backlighting attempting to draw more than 100mA prior to the 1455 completing the request to increase the current limit. to keep everything kosher, power should not be fed to the MX470, LCD backlighting, etc until this has happened, and accomplishing that is going to be very messy.

the best solution would be to simply specify that an MX470 can not rely upon good power being available from a USB port. even an MX470 alone could easily go over 100mA with just a few LEDs hooked up to output pins.

an idea has just come to mind... it is called... a powered USB hub! building a single-port powered USB hub should be relatively easy


cheers,
rob :-)
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 09:21pm 02 Sep 2018
Copy link to clipboard 
Print this post

  robert.rozee said  an idea has just come to mind... it is called... a powered USB hub! building a single-port powered USB hub should be relatively easy


That thought was entering my mind as I browsed the tread.
After reading about the negotiation stuff etc, I wondering what the non-powered hubs do.

They are something I've always shunned, but I've come across few PC's with a collection of things handing off them & seemingly working Ok.

Maybe they negotiate the maximum power available & blindly share it to all ports.


Cheers

Phil.

 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 11:52pm 02 Sep 2018
Copy link to clipboard 
Print this post

Very interesting information. Now that it has been mentioned, I seem to recall that is how the USB ports manage power, but I had totally forgotten and just assumed that 500mA was available at all times.

If by default, the USB port only lets you have 100mA on USB2 or 150mA on USB3, then this could really explain LOTS of problems with the MM+ series of chips and anything like an LCD connected at the same time - even the small SPI LCD's backlight will push the total current up there very close to the limit.

Just about everyone who reports problems powering from USB, have all come back to post that they fixed the problem with an external power supply. That too, would agree with everything said here.

For the last few years, I have been going on the assumption that up to 500mA was available on the USB port right from the off. If this has not actually been the case all along.....

Using one of those 5v plug-packs(wall-warts) with the USB socket on them is another option. The decent quality ones from the likes of Jaycar etc, will have reasonably good output. Avoid the really cheap ones from eBay etc. I have powered MM+'s with 7" LCD's on those plug-packs before no problems, provided you also use a good quality USB cable, and not one of those really thin ones which won't carry the current very well.

Would not a powered hub have the same problem? IE: the device must request the extra juice, and when that happens, the powered hub would feed the device more juice, but up until that time, the powered hub could also be throttled back to 100mA or so could it not? Something to test.

Or, simply build a MM-compatible PSU injector thing as suggested by Rob - I like that idea myself.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 06:13am 03 Sep 2018
Copy link to clipboard 
Print this post

Just a note: asking for more USB power does not guarantee it will be granted.

It is likely to be with a powered hub, but I guess the likes of an eeePC - probably not.

Is the 1455 involved and if the power is refused could that be reported?

I use USB volt/ammeter devices: they have USB in & out with a display so you can see the current being used. Like this

John
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 11:47am 03 Sep 2018
Copy link to clipboard 
Print this post

  JohnS said  Just a note: asking for more USB power does not guarantee it will be granted.
[...]
Is the 1455 involved and if the power is refused could that be reported?
[...]
I use USB volt/ammeter devices: they have USB in & out with a display so you can see the current being used.


that is the big problem, there is no certainty on what power you may get. at the moment there is no provision for the 1455 to signal to the MX470 the power level available - and i can see no way of doing so that is not a bit of a hack.

the 1455 does have a couple of unused pins, but for backwards compatibility their use is limited. as i said before, it may be possible for them to be used to indicate (for example) "100mA OK" and "500mA OK", but then one would still need to add a couple of MOSFETs to switch the two power lines ('5v low power' and '5v high power'). with the likes of the E-64 this would be almost impossible to squeeze onto the existing PCB. the MX470 may also need to monitor to see if "500mA OK" was asserted and behave appropriately if it was not.

external power really is the way to go, unless you're playing with an MX170 or MX470 without a colour LCD in the mix. i have one of those cheap inline power monitors, and can confirm that they are an extremely useful addition to one's kit of tools.


cheers,
rob :-)
Edited by robert.rozee 2018-09-04
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5089
Posted: 02:26pm 03 Sep 2018
Copy link to clipboard 
Print this post


the 1455 can measure the Vusb (5V) through a 10k/10k voltage divider, and compare that to a set level (i.e. 4.5V). Output through the LED (or a second LED).

Simple to rework, and backwards compatible.

Volhout
PicomiteVGA PETSCII ROBOTS
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 03:35pm 03 Sep 2018
Copy link to clipboard 
Print this post

if too much current is drawn from a USB port, the behaviour of Vusb is uncertain. it could simply sag, or it could drop out completely due to a polyfuse opening (something a polyfuse can not do an unlimited number of times). or the overcurrent could be sensed by the host, who then responds by cutting power to that USB port and popping up an alert for the user.

alternatively (in the extreme case) the host could decide to start smoking - this has been known to happen when there is NO current limiting and the 5v is shorted directly to ground due to catastrophic user error.

basically, it is not prudent to suck the current you need and see what happens. one really does need to know how much power is there beforehand.

maxim have a good summary:

"A bolder noncompliant scheme assumes that 500mA will be available and instructs users to plug only into powered ports and hubs that are capable of 500mA. Again, since most USB ports do not disconnect power, this approach can work in most cases. When such a device is plugged into a port that cannot support 500mA, the port is supposed to shut down. However, the overload behavior of a USB port is not always well defined and can lead to system reset or damage"
(from https://www.maximintegrated.com/en/app-notes/index.mvp/id/4803)


cheers,
rob :-)
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025