08-18-2014 01:20 PM
hey ppl
i am trying to output a wave (sine, square etc) in U8 form (unsigned 8 bit), freq would be in Khz (1-10Khz) , i initially tried doing this using Ni DAQ USB 6009 , but since its software timed , i can not output a wave with freq above 6Hz, a detailed discussion can be seen in the following link.
http://forums.ni.com/t5/LabVIEW/output-a-wave-in-U8-using-NiDAQ-USB-6009/m-p/2951971#M851693
i wanted to ask if its possible using arduino and linx, i just want to replace the hardware and want to use arduino leonardo instead of Ni DAQ USB 6009, im attaching the Vi in which i have used Ni DAQ USB 6009 and it wrked but i must take the frequency in Khz which is not possible with DAQ.
08-18-2014 03:19 PM
What is U8 form?
hrh1818
08-18-2014 03:35 PM
U8 means unsigned 8 bit form like 2=0000 0010
08-18-2014 05:10 PM
In the VI, you are using digital output. You can't do a sine wave with a digital output. As far as I know, the Arduino would also be software timed with the exception of a PWM. To do a square wave you would use a 50% duty cycle. I'm not familiar with changing the PWM frequency so somebody else would have to describe that if you are unable to find it in any Arduino documentation or elsewhere.
08-18-2014 05:18 PM
But if u sample it like 10 times per cycle we get fairly close to a sine wave and thanks I need some device with hardware timed digital outputs do you know about any ??
08-18-2014 06:28 PM
For high speed serial output of U8 data I suggest using SPI. The following link has an example for using SPI to send serial data to an EPROM. This example could be modified for your application.
<http://arduino.cc/en/Tutorial/SPIEEPROM>
If your primary goal is to generate sine and square waves I suggest you use either Teensy 3.1 or an Arduino Due. They both have digital to analog converters. This links provides performance information when using a Teensy 3.1 to generate a sine wave.
<http://forum.pjrc.com/threads/26036-Fastest-DAC-speed-possible-for-Teensy-3-1-using-Arduino>
hrh1818