PDA

View Full Version : MicroCode Studio+ with Sony Vaio and USB/RS232 converter



BrianT
- 9th July 2007, 12:43
Does any one have personal experience with using MCSP on a Sony Vaio? The Vaio has no RS-232, only USB ports, so to use the bootloader I have to use a USB to RS-232 adapter.

MCSP seems to load fine but any time I try to compile and program it comes back with an error message something like "can't open COM4".

Tera-term works a treat and opens COM1 but MCSP seems to try to open COM4.

How do I direct MCSP to COM1??

Cheers
Brian

Dave
- 9th July 2007, 17:23
BrianT, Just go into Microcode Studio View tab then select the serial communicator tab. Next after the window opens select the Port Number tab and select the Com Port you want to use. The next time Microcode studio opens it will use the com port you have selected.

Dave Purola,
N8NTA

BrianT
- 10th July 2007, 00:13
Sorry Dave, life is not like that with a Sony Vaio. MCSP on a Sony Vaio gives the choice of COM4 or COM5. I can select either but always get the same error message.

"Port Access Error... Unable to connect to te target PIC micro using the assigned serial port..."

Has any actually got a Sony Vaio to work with MCSP and a USB to serial adapter?

Cheers
Brian

Ioannis
- 10th July 2007, 06:39
Are you sure that your USB-to-Serial converter is on COM1?

Check with the Device Manager as to which port sits the converter.

Ioannis

BrianT
- 11th July 2007, 01:56
When I fire up TeraTerm as my serial monitor it automatically comes up as COM1. I can enter TeraTerm Setup and choose COM1 through COM4. When I shutdown TeraTerm and fire up MCSP it automatically comes up as COM4. The only choices MCSP Setup gives me are COM4 and COM5. I have not found any way within MCSP to change this port assignment.

I have reloaded the USB/RS232 drivers to no avail.

Cheers
Brian

Ioannis
- 11th July 2007, 06:23
OK. I don't know about MCSP. I just asked you to make sure about what your Device Manager states for the port.

Ioannis

andrewwaack
- 11th July 2007, 23:08
the usb to com converter dose not assign it self as a true comport it is a virtural com port i have this exact problem i use the velliman programer with picprog2 as the loader i first write the code in mcs+ then compile using pic basic pro then start picprog2 load hex file and every time i write or erase tothe pic i have to reselect the com port for it to work
check systems properties on the vaio to see what com port is assighed to the converter

Josuetas
- 21st July 2007, 16:37
OK here is how it works, first of all you can change the port number you want to use with your USB-RS232 conversor, for this go to Control Panel->System-> Hardware->Device Manager. In the ports section you might find your serial port with the port it is using between () . i.e. Serial Port(COM4).

By double clicking and going to Port Configuration (i have it on spanish so i dont know the exact words) -> Advanced. There you will find a combo-box to select the number of port you want to be used by the device. Choose one tha is not Used.

On the other hand. MCSP always shows the ports to be used in a combo box (i have MCS 3.0) if the port is in use when MCS is opened it will not be shown in the combo box. Try closing all previous used programs and then open MCS, most surely.. if the port is not an option it doesn´t exist or it is in use, not being possible to be used by MCS.

I have worked with my Vaio C140G/B with this conversors with no problems before, and you should have no problem since this devices are based on the same chip.

I hope you find my post useful.

DJC

BrianT
- 22nd July 2007, 23:27
Thanks Josuetas, I think I understand what you are saying.

What I found very confusing was that parts of MCS worked on the Sony Vaio but other parts of MCS did not work. For example, the MCS Serial Communicator worked as did TeraTerm which is my preferred serial terminal emulator program but the MCS Loader did not work at all.

I think I am right in saying that MCS Serial Communicator and TeraTerm do not check what ports are available, they just assume COM1 will always be available and mostly it is.

MCS Loader on the other hand uses a windows API call to access a COM port. Windows manages the VCP BUT not all USB to Serial adapters handle the com port assignment correctly.

I had an IT guy look at my Sony Vaio problem. A search through Registry showed only COM4 and COM5 had entries - not COM1 or COM2. He added a new registry key as follows.

In Hkey_local_machine\hardware\devicemap\serialcom was added a string "COM1"

The USB to Serial converter I have is by "Magic Communications Technology" - a dodgy name if nothing else.

It now works but only after a manual entry for COM1 was added to registry and one further gotcha is covered.

There appears to be another problem with the Sony Vaio. If there is any activity on the USB/Serial port during boot up, the Sony will interpret this as mouse activity and then assigns the mouse to the USB port. Any attempts to use the serial port sends the cursor scurrying all over the screen. What I must do at boot up is remove the USB connector, let the machine complete the boot, then attach the USB/Serial adapter, then start MCS.

Not quite plug and play but eventually workable.

Thanks to those that sent me suggestions.

Cheers
Brian

Ioannis
- 23rd July 2007, 20:16
If you change the COM1 manually entered in Registry to COM2, does it still interpret data on USB as mouse?

Ioannis