PDA

View Full Version : MCSP with USB to RS-232 converter



BrianT
- 8th July 2008, 05:52
I cannot get the MCSP Boot Loader to work with an ASUS EeePC and a generic USB to RS-232 adapter. The code compiles and the boot loader asks me to reset the target micro. I press the reset and the dialog box immediately changes to say "programming" but then it hangs. Sometimes there might be one or two green progress squares in the programming window but mostly the progress bar is blank. The USB/RS-232 adapter works a treat as COM3 for TeraTerm and appears to have some communications with the target micro but it never completes the programming cycle.

I can program the same micro with the same code with a direct RS-232 cable from my desktop PC but the ASUS EeePC has no serial ports, only USB2.

Any suggestions?

MCSP 3.0.0.5, PBP 2.50B, PIC18F4620,

Cheers
BrianT

skimask
- 8th July 2008, 19:26
Any suggestions?
MCSP 3.0.0.5, PBP 2.50B, PIC18F4620,
Cheers
BrianT
Had similar problems awhile back with a Warp13a. Had CPU temperature, memory, etc. monitoring software running in the background that would interrupt the process every couple of seconds. Thing would work great for weeks on end, then die, only for me to have to trouble shoot it for days on end. Turns out, every once in awhile, the wife would reboot my laptop and re-start all that monitoring stuff, thereby causing me to lose my mind for a few days.
Another issue I've had in the past is hubs. Seems like my programmers have never liked to be on a hub, powered or unpowered. You might not have enough juice to push the programmer (i.e. USB port not completely 100% powered to 500mA like the spec says, somebody check my values here).
Maybe try a powered hub?
Something else that affects RS232...a continuous ground between everything. Some have it, some don't.

mackrackit
- 8th July 2008, 20:13
Could be the adapter.
A Belkin adapter will not work with my PICSTART+ but an adapter from Triplite will.

BrianT
- 9th July 2008, 04:04
I only have one USB to RS-232 converter so I will get another in the next day or two and try that. The one I have works fine at 19,200 bps but maybe it can't keep up at the bootloader speed which I think is 154,000 bps.

Thanks
BrianT

Dave
- 9th July 2008, 12:24
BrianT, Why not just select the bootloader baudrate box marked "Auto detect" in the Microcode loader window?

Dave Purola,
N8NTA

BrianT
- 27th July 2008, 23:48
Hi Dave,

Thanks for the tip. I have now tested the RS-232/USB converter as you suggested with Auto, 19,200 bps and 115,200 bps. About one attempt in 10 gets through in Auto or 115,200 bps. None has worked at 19,200 bps.

I get from 1 to 6 green 'progress' squares then MicroCode Loader hangs. After a Ctrl/Alt/Del the Task Manager shows MicroCode Loader is not responding.

I suspect that different USB/RS232 converters have different internal or end-to-end delays and although a converter may be able to sustain high speeds, long delays might run foul of some MCSP timing assumptions.

I still cannot get the ASUS or the Sony VAIO to program a PIC 18F4620 using PBP 2.50b and provided with MCSP 3.0.0.5.

Still hopeful.
BrianT

BrianT
- 29th July 2008, 06:36
I bought another USB to RS-232 converter. The first one cost $25, the later one cost $19.95 and it works! Seems you can pay too much for a USB to RS-232 converter.

I am firmly of the belief that MCS Loader is time sensitive and it is pot luck whether the converter you buy has a short or long internal delay. Both the converters I have tried claimed 1 Mbps throughput so raw speed is not the issue.

The one that worked came from Electus, part number XC4834. The package is labeled GUC-AD9.

HTH
BrianT