Thanks Charile,
In fact I can send data thru USB using the USB CDC demo I found on this forum.
On the other hand, isn't there any way to get serial data with Serin or Serin2 and send this data thru USB? This seems a very basic operation.
Thanks Charile,
In fact I can send data thru USB using the USB CDC demo I found on this forum.
On the other hand, isn't there any way to get serial data with Serin or Serin2 and send this data thru USB? This seems a very basic operation.
This may help you in setting up the USB.
http://www.picbasic.co.uk/forum/cont...USB-SD-LOGGING
Dave
Always wear safety glasses while programming.
The issue is that the USB is very time critical and really needs to be interrupt driven. SERIN does not use interrupts, so if you are in the middle of receiving something with SERIN, and the USB demands attention, you drop the packet, or worse, part of the packet on the floor. HSERIN can use interrupts, and so you can manage the 2 independent flows, by requesting a pause, or bouncing back and forth between the two workflows.
Still tricky to acomplish, but at least there's hope of success. A lot depends on your application. For example, you might be able to only have information sent by request, and only request when you are sure you'll have uninterrupted time to process, and thereby get away with SERIN. But a truly asynchronous SERIN or SERIN2 and an asynchronous USB is bound to be unreliable and error prone.
Last edited by Charlie; - 12th June 2012 at 19:16.
Bookmarks