|
Forum Index : Microcontroller and PC projects : Multiple Microbridges on one Computer
| Author | Message | ||||
| kg4pid Regular Member Joined: 08/03/2015 Location: United StatesPosts: 50 |
Would there be any problems using more than one microbridge on one system? Linux or Windows. Not for programming but for USB to Serial. Are all microbridges going to have the same serial number? I've had problems with some of the cheap USB to Serial converters over the years changing ports. I want to make sure my ports stay the same across reboots. My 16F1455 chips are on order but haven't shipped yet so I can't do any testing. Thanks in advance, Max |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
I don't see any reason why not. Try it and see. Windows will assign a VCP COM port number to any new USB-serial adaptor you plug in, even if one of exactly the same type is still plugged in. Therefore, if one you have plugged in was COM4 for example, you could plug in another one, and windows SHOULD assign a new COM port number to that - say COM5 or something. I have often had multiple CP2102 USB-serial adaptors plugged in at the same time, and windows does not care - it just issues another COM port number. Linux should have no issues at all. It should just show up as a duplicate folder under /dev/ if you already have one plugged in and working. On Linux, provided Linux sees them at all, you are less likely to have the changing port numbers problem. Windows loves to change COM port numbers on you all the time, depending on what it thinks you have plugged in and where. I think there is a system setting you can change to force Windows to NOT assign COM port numbers higher then a certain point, but that still means the actual number a USB-serial adaptor gets assigned by Windows is at the discretion of the operating system - it's a pain, actually, to be honest. Smoke makes things work. When the smoke gets out, it stops! |
||||
| kg4pid Regular Member Joined: 08/03/2015 Location: United StatesPosts: 50 |
Most higher quality USB devices have a unique serial number which allows you to use two or more of the same type of device on a system. But not all USB devices are created equal. As I already stated I can't test yet bcause my parts are in shipment. If I know for sure one way or the other I can plan ahead. Since there is only one hex file I have a feeling it may be a problem, unless it is in the chip itself. I couldn't find anything in the 16F1455 datasheet that said for sure. Max |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
I will plug in several E28's all of which use the 1455 chip, and let you know. I am still not expecting a problem, but you may in fact be correct so I will post back shortly. EDIT: Plugged in two E28's and one MMX all with 1455 chips. All running at the same time, all of which were assigned unique COM ports, and I can talk to all of them. Here is a shot of my accessing two different 1455 projects at once: ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Should not be a problem. The first part that is used to identify one is the VID/PID. After that a serial number. If those are the same (which is often) then it will be enumerated according to which USB port it is connected to. If you have a USB-HUB it will also use that as part to uniquely identify it. Microblocks. Build with logic. |
||||
| kg4pid Regular Member Joined: 08/03/2015 Location: United StatesPosts: 50 |
On page 10 of the MCP2200 datasheet it says 2.2 "The MCP2200 is supplied from the factory with a serialied USB serial string." Itn't the MCP2200 the same chip with simular code? Was this the code that was used and modified to create the microbridge? Max |
||||
| kg4pid Regular Member Joined: 08/03/2015 Location: United StatesPosts: 50 |
If I understand you correctly I'll be ok as long as I don't move them to a different USB port. My FTDI USB to serial converters don't do that, they stay the same. But they cost a whole lot more. Max |
||||
| kg4pid Regular Member Joined: 08/03/2015 Location: United StatesPosts: 50 |
Grogster, try moving them to different USB Ports. Does the same 1455 get the same port or does it move? I think that will tell me what I need to know. Thanks, Max |
||||
| JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 4126 |
Linux should be happy. It knows enough (like its internal path to the physical USB port) to make it just work (even if there is no unique serial #). John |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
No, it assigned it a new COM port number. It was COM11. I move it to another USB port, and it is still accessible, but has been assigned COM14 not COM11. I don't THINK there is much you can really do about that. Windows assigns the VCP number when you plug the USB thing in, and you don't get a choice as to the actual number that the operating system assigns to that adaptor. Smoke makes things work. When the smoke gets out, it stops! |
||||
| kg4pid Regular Member Joined: 08/03/2015 Location: United StatesPosts: 50 |
Thanks Grogster, as long as the OS assigns the same port after a reboot I'll be OK. Max |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
So long as you stick to a certain USB port physically, the COM port number SHOULD stay the same. Note I said 'Should'..... Windows does odd things. Smoke makes things work. When the smoke gets out, it stops! |
||||
MicroBlocks![]() Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Nope windows does exactly what it has to do according to the USB specs. :) First VID/PID then serial number, then physical port on the computer. This is done to get a unique identifier. It works the same on all other OS'es. If you have more then one that has the exact same configuration (The microbridge) then things get confusing. If you swap the cables the OS has nothing to differentiate them and will enumerate them the same as it did the first time. USB1 - COM1 - Microbridge A USB2 - COM2 - Microbridge B will change into USB1 - COM1 - Microbridge B USB2 - COM2 - Microbridge A Only way to get them identified exactly the same is to leave them plugged in or plug them in the same port always. Imaging you have 2 USB ports on the computer and on one of them you connect a 7-port USB hub. This will give you 8 USB ports in total. If you have 8-microbridges they all get their own COM port. If you unplug them and plug them in again in a different order then they get the number as before (USB port --> COM port). You could therefore put a sticker on each USB port and write down the corresponding COM port. Once you plug something else in, then that port will get a new designation, If you afterwards but a microbridge in it again it will get a new comport number. As long as you plug the same device in the same port everything should stay the same. You can think of the PC assigning a comport to a USB and remembering which PID/VID/Serial number that was. If the same is plugged in no new enumeration is needed and the cached info is still valid. This is done to speed things up. Microblocks. Build with logic. |
||||
Grogster![]() Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9750 |
How come I sometimes have a situation where my USB3 hub(four ports) starts causing Windows to report: "The USB device you have plugged in has malfunctioned and Windows does not recognise it." On ANY port. Things that were working just fine. I pull the cable to the USB3 hub(to reset it), wait a little, plug it back in, and everything works as it should. What's getting Windows muddled there then? The hub? Smoke makes things work. When the smoke gets out, it stops! |
||||
| BrianP Senior Member Joined: 30/03/2017 Location: AustraliaPosts: 292 |
In my experience with Windows & USB I find that periodically I need to go into device manager - show hidden devices & delete all the ghost entries for USB devices. I think Windows just runs out of space - buffer overflow? I also delete any ghost disk drives & storage devices. Seems then to work fine (until next time). B |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
this is why I have moved away from putting USB<->Serial thingies in every project - unless there is a definite need for it. I had millions of COM ports simply because I had moved devices between usb ports on hubs etc and each time Windows made a new com port for the same device in a different port... this is down to how the USB interface reports itself as mentioned above - if it is strictly compliant then windows will recognize the same device but cheapie CH340G's from ebay, while a bargain and they "just work" are obviously dirty coded. What I do now is to equip most projects with a 3.5mm jack and take the console to that, they usb interface is now on the cable from the PC (which has a 3.5mm plug). this also gives me lots of options on connections from a direct USB/serial cable, a USB/HC12 pod thingy etc... is saves £1 per device and stops my laptop getting dirty with loads of com ports and expands the possibilities of the console - including sending logging to serial printers. http://www.fruitoftheshed.com/Circuit%20Ideas.Simple-Serial-Console-Connection.ashx |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2463 |
that might be a little extreme - there are simply two different approaches, both of which are quite valid and legitimate. imagine having 20 or more identical devices you regularly plug into, only ever one at a time, and each one grabbing a new comm port name. it would be an absolute nightmare. whereas, if each one popped up as the same comm port name, life would be considerably simpler. i do suspect that if presented with the two options, a majority (though not all) of folks would wish all their usb/serial devices to appear under the same comm port name, or under a small group of names. cheers, rob :-) |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
Hi Rob. I do take your point but I suppose I should clarify that a bit: I have 17 CH340G scattered around, all purchased over a period of time... all have the same ID and serial values - they are quite literally clones. Hence my PCs don't stand a chance of keeping track of them and when I present the same device to a different USB port, It gets a new COM port assignment. As you point out above that can have advantages if you are doing one at a time or for specific users - it drive me mad to have "COM24" etc , I never knew if a combination of devices made project A COM4 or COM7 and there's a period of finding out most times when i connect. If the coding on them had progressive/different serials (thus, with the mfctr & type etc. identifying a specific device) each would be assigned a com port and it would track regardless of which physical USB port it was plugged in... such serialisation requires work (=$$$) and evidently isn't done for whatever reason (and it might be just one offender) . That is quick and dirty in my book - BUT... I don't care because they are cheap as chips and do what they say. My hypocrisy goes to here. In further mitigation, I have developed my own techniques for USB<->serial comms which suits even better. This greatly simplifies field work because when I plug into a unit I*know* it is always on a the same com port, set up once forever and I don't have to change terminal settings or anything like that.Horses for courses I guess |
||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2463 |
very much so, and i do really like your idea of using 3.5mm sockets as a 'standard' for ttl serial interface. btw, it is not that devices such as the CH340G all have the same serial number programmed into them, but rather that they have no serial number. to have a unique serial number a device needs somewhere to store it, and a means for the user (or chip manufacturer) to get it in there. or a pin or two dedicated to an external eeprom or 1-wire unique serial # chip like the DS2411: https://www.maximintegrated.com/en/products/digital/memory-products/DS2411.html with peter's 1455 code i vaguely recall us very briefly discussing unique id numbers, but it really would have been impractical to do in any sort of 'user friendly' way. the firmware would have needed to be able to rewrite a block of flash dedicated to the serial number, and there would have needed to be a protocol for communicating the serial number to it. i suspect that in the case of the CH340G any internal firmware is on a masked rom, so there is not even the luxury of any flash to store a serial number in. cheers, rob :-) |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |