Quote:
Originally posted by Matir
At a minimum, a read would take 20 microseconds. This is based on a sampling rate in the hardware of 48kHz. That's roughly one sample every 20 microseconds. I may be wrong, but I still don't think a generic soundcard gives you the ADC resolution you're looking for.
|
Thanks for this suggestion. But in my opinion the sampling rate is not a problem, it only gives a restriction to the frequency of my real time application. But for controlling mechanical systems like robots the application should be executed in 1 millisecond intervals. That means at the end of one millisecond I want to measure a sensor value, calculate a new control value and send this at the same time out again. The time between getting the signal and sending it out again should be put to a minimum, because that increases the so called latency time. But the value that is sent out stayes then for 1 ms the same until the real time app. gets executed again after 1 ms.
Actually I am only looking for a command that enables me to write into the register where the DAC converter of the soundcard gets its values from and read from the register where the ADC converter puts its values. As already mentioned this process should last as short as possible. If I run my real time application synchron with the sampling rate of my soundcard this should be technically possible, the only problem is that I do not know on which registers I should read and write and how I can find out to achieve this.