Good afternoon everybody, I need some asistance with a problem with a USB/Serial program.
I'm posting this in both the USB and SERIAL groups.

This is running on a 18f4550@48mhz using DT's "usb_asm_service".


the thing is if in my main loop I put:

baud485 con $4006

mainloop:


high en485
serout2 tx485,baud485,["!",s485(0),s485(1),s485(2),s485(3),s485(4),s485(5), _
s485(6),s485(7),s485(8),s485(9),s485(10),s485(11), _
s485(12),s485(13),s485(14)]
low en485

pause 1000
goto mainloop


end



if the usb cable is not connected, I get the sent bytes on my 485 bus, but as soon as I plug the usb cable, I start loosing some bytes(at least 1) of every cycle.

this is not the actual code, but it does the same thing basically.

It seems to me as if during the serout2 instruction the usbservice happens it kills the byte being transmited at the time.
Do I make any sense?

What I need is to be able to process serial comm using serout2 to other devices even when the device is connected to the usb host.

Hopefully this is clear enough so someone can share some tips.


Best regards

Eduardo Toscano
Seneca Sistemas