Real-time communication

Hi all,

I'm trying to use the Arduino UNO to act as an interface between a PC and a particle beam telescope (odd application, I know. Not the best option either, but we were looking for cheap.) What I need is the Arduino to send a short reset pulse to a gate generator when our data-acquisition software sends an "all-ok" flag to the Arduino.

I've found that I'm able to produce a 4us pulse from the Arduino on command (a bit long, but I'll take it). The problem is that serial communications between the PC and the Arduino are taking too long - without threading our test application we have a reset pulse frequency of about 1 kHz. When taking data using cosmic rays this isn't a problem, but we need to make the system as fast as possible for use in an accelerator beam test. There, the data rates will be much higher with limited access.

Ideally we'd like to hit a 1 MHz rate if possible, but 100 kHz would also be acceptable. Obviously we're limited by serial communication (113 kbaud, and low priority in windows) at this point, but is there anything we can do to squeeze some more juice out of the Arduino? Maybe bypass serial communication and go directly to USB?

I must note that we are constrained to using Windows XP as our OS (DAQ requirement), so no RTOS solutions are possible. Apologies if this topic was already covered, I've been googling for days, and haven't found any with a solution.

we are constrained to using Windows XP as our OS

I don't think the arduino is the bottle neck, windows XP probably is. You might need to find a board for the XP machine that can transfer data much quicker than the standard serial port.

The problem is largely that Arduino (and UBW from what I can tell) uses USB-serial, and therefore we're capped at 115 kbaud. It looks like cheap isn't going to happen.

I'll try threading the calls, maybe if I can find a way to prioritize communication with the Arduino I can find a way to make the baud rate our limiting factor... Then, well, I don't know. I was hoping I'd be able to use the full 12 Mbps rate of the USB port, but I guess that's not going to happen.

This will help...

Even with the thread that sends "go" set to real-time / critical priority there still may be too much latency for your application.

Thanks for the help. I'll check out the suggestions and let you know if anything works.