How do I Select a specific COM Port in CW5.1?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I Select a specific COM Port in CW5.1?

5,879 Views
hc08
Contributor I
Hi all,
 
Just wondering if anyone knows how to select a specifc COM port using CodeWarrior V5.1.
Unlike the older version V3.1, it doesn't allow me to select, for example, COM port 4.
 
Can anyone help out?
 
Thanks,
Steven.
Labels (1)
Tags (1)
0 Kudos
Reply
13 Replies

2,953 Views
CrasyCat
Specialist III
Hello
 
Which HC08 derivative are you using?
Which connection are you trying to use?
 
How many serial port do you have on your Host PC?
 
CrasyCat
0 Kudos
Reply

2,953 Views
hc08
Contributor I
Hello CrasyCat,

I am using the HC908QY4A and I am using the MON08 serial interface and
I only have two ports, however I would like to use a USB to serial converter,
where i can configure what ever port I lilke.

Thanks,
Steven.
0 Kudos
Reply

2,953 Views
peg
Senior Contributor IV
Hi Steven,
 
I am not sure of the answer to your exact question, but be aware that using a MON08 interface adapter through an USB-to-serial adapter VERY rarely works at all or reliably. Be sure to get everything working using a "real" serial port first then when you get how to switch figured out do only that if it stops working it will be the converter or its setup. See the many other threads about these converter problems in these forums.
 
0 Kudos
Reply

2,953 Views
hc08
Contributor I
Hi Peg,

Thanks for your reply, I have read up alot about USB to serial converters and I  have been able to program, debug the HC08 with 2 different types of conveters.

Anyhow, maybe I should clear up what I specifically want to ask.

Lets say I start with a new project with the QY4A, MON08 interface and press the debug button.

On the 'Connect to Target' tab, you can 'add a connection', I select class 3.

In the 'Interface Details..." section > on the drop down selection 'Communication Ports:',
it is blank and does not allow me to select a COM Port, which is the problem that I am
coming into.

Thanks again.
Steven.



0 Kudos
Reply

2,953 Views
bespenschied
Contributor III
Steven,
 
I also have this problem. I have used this USB to Serial adapter before and it works fine. When I started CW today and tried to debug I got the P&E Connection Manager and even though my system has a COM2, the drop down box for Communication Port is empty. There is no way to select which port I want to use. The last time I used CW it worked fine and I have not made any changes to my system.
 
Any Ideas anyone?
0 Kudos
Reply

2,953 Views
hc08
Contributor I
I have finally worked out why I wasn't able to select a different COM port other than COM1!
 
Codewarrior assumes that there are no COM ports after any available blank COM ports.
 
Especially if you are using a USB to serial converter that doesn't assign the next available port.
 
For example, in device manager, COM 1 - serial port on computer, COM 3 USB to serial converter
 
COM 1 (in use)
COM 2
COM 3 (in use)
 
If you change the COM 3 to COM 2 then code warrior will recognise COM1 and COM2.
 
Otherwise you will only see COM1.
0 Kudos
Reply

2,953 Views
J2MEJediMaster
Specialist I
Assuming that no one has fooled with your gear since the last time you used it, try the following:

1) Unplug the USB-to-Serial adapter, both from the USB port and its power supply.
2) Shut the computer down. Not restart, you want to do a cold reset-everything-in-the-box, which means shutting the computer down.
3) Now restart the computer.
4) Plug in the USB adapter's power supply.
5) Now plug the USB device into the computer. If you're running XP, you should get a "ding-dong" sound as the operating system recognizes the device.
6) See if CodeWarrior recognizes the port now.

I use XP and it seems after some length of time it randomly tosses it cookies on handling USB devices. There's no warning, the interface just stops working. My apologies if you've already tried this incantation.

---Tom
0 Kudos
Reply

2,953 Views
bespenschied
Contributor III
I found out what was causing the COM Ports to not show up. I have an HP Pavilion a1430n computer. It does not have any Serial (COM) or Parallel ports on it. I assume PC's are being made without them because most people never need them anymore. Anyhow...
 
When I plugged my USB serial port into my system it gave it COM23. I tried to change it to COM1, 2, 3 or 4 and it would not let me. It (XP) said the com port 1-22 were already in use. The com ports 1-22 did not show up anywhere but in the registry. COM Port 23 showed up in the Device Manager. The Codewarrior Debugger did not see any COM Ports either.
 
After some research and Registry cleaning I was able to get rid of the non-existant com ports and assign my DYNEX USB Serial Port to COM1. The debugger now sees it and works fine.
 
In case anyone wants to know it is a Dynex DX-UBDB9 USB to Serial adapter. It shows up in My Device Manager as a Prolific USB-to-Serial Comm Port (COM1)
 
It appears that the Debugger does not see any com ports unless COM1-4 are installed.
 
0 Kudos
Reply

2,953 Views
mke_et
Contributor IV
There's a number of issues here.

One is the USB to serial hardware. I've seen problems with SOME USB-Serial cables where the serial data of the com port works just fine, but there appears to be subtle problems with the control and status lines. These devices will have problems with certain serial peripherals, such as Palm docks and OBDII interfaces. It's to the point that I've seen some cables labeled as 'Palm compatible'. Belkin for one says their cable is compatible. I've also used the Radio Shack cable without problems. Others... Well... Again, they work fine for serial streaming, but that's about it.

The other issue is com port assignment. I have software that I wrote that allows me to attach my devices (mostly hardware that I designed) out to Com port 99. (I did one that allow 100+, but that's only for some programs.) I did that because I've seen some drivers for other stuff get in there and grab com ports. I've pulled my hair out trying to get a low number 'released' so I can get in there, and I just haven't been 100% successful in that I need to make it work, and I need to be able to repeat how I made it work again and again. I gave up and just made my software work out at any valid port.

Another advantage of that is that I can now work on 'virtual' ports that link over the network. If I can get at the port, I can use it. (Well, mostly. Some things that count on real time quick action of the port have problems with the network delays.)

Another thing to be carefull of. If you use com1 through com4 I've seen some programs have problems with USB-serial. The only thing that makes sense is that somehow there's some kind of 'virtual collision' with the hardware that may be part of the chipset, even if the parts aren't there.

And finally, I've had a LOT of problems with laptops that have 3 USB ports. HP and Compaq. If they have 2 USB ports on the back and 1 USB port on the side, if I plug in on the side to the SINGLE USB port, the serial data there seems to work but it's not right. The data is right, but my software, which depends on certain things happening in tight sequences with the control lines and data streams, fails. ONLY on this PHYSICAL 'third' USB port. If I use USB hubs and expand, or dock and use other ports, no problem, it's just that physical third port.

Personally, I use the LPT-MON08 adapter. The only catch there is you have to tickle the registry with XP (don't know if you have to do it with Vista) otherwise XP will occasionally touch the LPT port on some kind of poll and it messes up the pod. The pod doesn't have the problem with Win98SE. Hmm, I just changed my home desktop from Win98SE to Win2KPro and haven't tried the adapter yet, so I don't know if I need to edit the registry for Win2KPro yet.

Message Edited by mke_et on 2007-10-28 09:15 AM
0 Kudos
Reply

2,953 Views
peg
Senior Contributor IV
Hi,
 
Whilst I know a bit about this stuff I rarely use Codewarrior and don't think I have ever used it with HC08. Hopefully CrasyCat will get back to you soon with some suggestions.
 
Do you know the chipset involved in the converters you have working with MON08? There are a lot of people who would like to know.
 
0 Kudos
Reply

2,953 Views
hc08
Contributor I
Hi Peg,

The USB-Serial Converter that I am using has the Prolific PL-2303X Chipset in it.

The USB-Serial converter that I am using is the COMSOL UMC100, where I believe
it is now obsolete. I have been sucessful at using it but no gurantee!!

Where as the other one I am not sure....

Anyhow, hope it helps.

Steven.
0 Kudos
Reply

2,953 Views
CrasyCat
Specialist III
Hello

I am not sure you can connect through a USB to serial converter.
I have a side question, how are you physically connected to your hardware board?
Do you have a Multilink cable, a simple serial cable between your USB to serial
converter, ...?

Which connection did you select in the debugger (Multilink/CyclonePro, ....)?
To find that out, just tell me what is the name of the menu next to the "Run"
menu.

CrasyCat
0 Kudos
Reply

2,953 Views
JimDon
Senior Contributor III
While it is true that some USB serial ports do not work properly, there is no reason why under windows it will not work, as the driver emulates a real serial port. There is s defined system interface for a com port, and with the  exception of Hyperterm which uses hacks, most com port software will work.

I don't have a mono8, but other serial BDM will let you choose a serial port from the debugger, notably when it fails to find the BDM, it should ask to set up the connection. Also note that it is my understanding and observation that this (setting up the connection details) is done in a DLL provided by the BDM maker, so it really has nothing to do with CW, other than the debugger and CW knowing about the DLL and using it.
0 Kudos
Reply