11-02-2009 01:00 AM
Hi
You can check it by acquiring the data (Probably a Sine Waveform) from the Function generator by setting the sampling rate twice that of the generating rate, by starting from the low rate value. If you should get a perfect sine waveform, you can calculate the sampling rate by acquiring and comparing the acquired and generated signal frequency. and if the sampling rate is kept same as the generation rate then the card should acquire and display a perfect tringular waveform.
I don't know whether its a correct procedure or not but i used to check in the same way for a normal daq card for which sampling rate is already known.
Regards
Visuman
11-02-2009 02:28 PM
Is it possibe that when i received first byte from usb daq card on labview then i start the timer and as the second byte is received i stop the timer then by taking the reciprocal of the sampling period i will get the sampling frequency?
If yes then please tell me how to implement this on labview. I think that in this way i will get the approximate sampling frequency.
11-04-2009 12:46 PM
Hi
I have found the sampling speed of my usb DAQ card but i can not believe that it is only 12 samples per second . Since the controller pic18f4550 is capable of 12Mbits/sec. I found the sample rate on labview but i can not understand why the sampling rate is so low?
The device pic18f4550 has 16 bi directional endpoints but i am using end-point 1 only. Will it have some effect on sampling rate?
11-04-2009 01:48 PM
11-05-2009 06:00 AM
mhs100 wrote:Hi
I have found the sampling speed of my usb DAQ card but i can not believe that it is only 12 samples per second . Since the controller pic18f4550 is capable of 12Mbits/sec. I found the sample rate on labview but i can not understand why the sampling rate is so low?
The device pic18f4550 has 16 bi directional endpoints but i am using end-point 1 only. Will it have some effect on sampling rate?
Your question is very strange. First of all your max sampling speed will be limited by your ADC unit specification. Then you program your pic18f4550 to control the sample rate, and transfer data to the PC by USB. Your custom DAQ card and the PC will be two autonomous units communication with each other. I really do not hope you have made some application where your Labview program is controlling the sample rate in a software timed loop. Requesting one sample each time. Because this is a very awkward, and clumsy solution.
11-05-2009 02:29 PM
Hi
I can not understand what are you trying to tell me , please explain me in detail. I am not controlling sample rate in my labview program. How can i increase my sample rate?
11-05-2009 03:00 PM
11-08-2009 05:28 AM
Hi
Basically the device i am using is pic18f4550. You are right that it is programmed to use specific clock which i internally set and it is 48 MHz but the process is cyclic. for example ADC channel 1 reads the analog value and starts conversion.
After conversion ,my IC performs another tasks and the process is repeated until the time comes when the same ADC channel 1 acquires the analog voltage again. My Question is that how to calculate the time between the two consecutive samples which the ADC acquires.
Thanks.
11-08-2009 06:39 AM
mhs100 wrote:My Question is that how to calculate the time between the two consecutive samples which the ADC acquires.
That time depends totally on the program in the PIC.
Since we don't know the program in the PIC, we can't help you on this one
If it's like you wrote
mhs100 wrote:... ... but the process is cyclic. for example ADC channel 1 reads the analog value and starts conversion.
After conversion ,my IC performs another tasks and the process is repeated until the time comes when the same ADC channel 1 acquires the analog voltage again.
We definetly can't help you since the ADC conversion starts randomly.
Who says that all other tasks, processes and so on always takes the same amount of time?
If you're PIC code is setup that way, you're sampling rate vary all the time
You're ADC conversion should be interrupt driven by using a timer of the PIC or an external/internal trigger clock.
See 21.8 Use of the CCP2 Trigger in the PIC datasheet.
If you didn't write the PIC code yourself it may be hard to change... ...
11-08-2009 08:23 AM
mhs100 wrote:Hi
Basically the device i am using is pic18f4550. You are right that it is programmed to use specific clock which i internally set and it is 48 MHz but the process is cyclic. for example ADC channel 1 reads the analog value and starts conversion.
After conversion ,my IC performs another tasks and the process is repeated until the time comes when the same ADC channel 1 acquires the analog voltage again. My Question is that how to calculate the time between the two consecutive samples which the ADC acquires.
Thanks.
If you want precise sampling interval you must use the timers in your pic18f4550 to generate a interrupt for each sample. Then it is not sampling data it can do other things like handling the communication. It seams to me like you have turned the priority list upside down