06-17-2012 12:44 AM
I did it because that is how the author and NI did it, I didn't "choose" to do it that way. I'm assuming that you can only send single byte transmissions at a time on SPI but I don't know the protocol really at all.
What version of the library did you get from me? I posted an updated version (a few hours after the original) that should work with all three components listed on that datasheet. If you don't know how to check the version, you can just tell me if the "Send Command" VI has a "Bit Resolution" input.
06-17-2012 10:04 AM
Hi, Nathan,
There is no Bit Resolution input on Send Command VI.
06-17-2012 10:52 AM
Hi, Nathan, this morning ,I add one AnalogReadPin VI to your example. I connect the Analog Pin0 to the output of MCP4822. Try to read out the voltage. But it doesn't work. Here is my VI:
06-17-2012 12:11 PM
Does it still show the correct output voltage when you hook up the oscilloscope? Does the a0 pin work with some other voltage source?
Also, I would appreciate if you downloaded my most recent version which will require a resolution input (you would simply right click on that terminal and create a constant and choose 12 bit resolution). Just to make sure that it works correctly. Thanks.
06-17-2012 01:22 PM
Hi, Nathan,
Thanks let me know that. Could you give me a link? Thank you
06-17-2012 01:35 PM
It works perfectly with oscillopscope. I will test it in our PID control system to check whether its response time would be good or not.
06-17-2012 07:43 PM
It's posted above. I replaced the one that I posted.
06-17-2012 08:21 PM
Awesome! I got it. I want to know you write it long time ago or just after I posted my questions. Anyway, Thank you so much! This afternoon, I observed the output signal from oscilliscope. In the high resolution of voltage, there is noise around. I am not sure it is because the chip system or oscilliscope or thermal noise. So, I prefer to add a LCD to show the real time voltage output.
06-17-2012 08:40 PM
I wrote it when you asked about it. I didn't even know what it was at first. I've never used SPI personally either. I've used I2C a decent amount for Lunabotics Club at school.
06-17-2012 08:47 PM
You are so nice, man! Today, I also observed that when I changed from a small value to a large value, the response time is a little bit longer(around 0.5s). So I guess this is because the LIFA is high level language. But I still dont understand why Ananlog in Read VI doesn't work. I connect the MCP4822 output pin to the pin0. And the VI is like what I posted