09-25-2006 10:23 PM
09-26-2006 07:02 PM
Hi Pubudu,
The reason the lights up is because there are some pull-up resistors on USB-6009. These pull-up resistors are connected to 5V. Depending on the way you are controlling your LED. This 5V connected to pull-up resistors will drive the voltage.
Attached manual for USB-6008 can help us look at the circuit for DIO line of 6009 closely on page 17:
http://www.ni.com/pdf/manuals/371303f.pdf
However, when it is connected to IC. If the IC drives it low ---> the value will be read as 0 (because in this scenario it is equivalent to shorting the digital line to ground). If the IC drives the digital line high -- the voltage on the line will be read as high (because the voltage drop across the pull-up resistor is zero).
Hope this helps.
Kalyan
10-15-2006 03:24 PM
10-15-2006 09:05 PM
10-16-2006 06:14 PM
Hi Pubudu,
I was wondering if you can post some more information about the chip you are trying to use? Is the chip communicating in I2C Mode?
Attached is an example which demonstrates how to perform simultaneous read and write on the same channel.
The example works for 8 lines, but you can tweak it to make it work for single line.
If you are looking for a card which can communicate easily with an I2C chip, you can look for further information here.
http://sine.ni.com/nips/cds/view/p/lang/en/nid/202368
Thanks,
Kalyan
10-16-2006 07:45 PM
10-16-2006 07:48 PM
10-16-2006 07:53 PM
10-17-2006 07:39 AM
Hi Pubudu,
Each element inside the array corresponds data for a line/channel.
If you want to do write only 4 lines,
modify configure lines to test as: <devicename>/port0/line0:3.
Then, modify the array to hold only 4 elements and delete rest of the elements inside the array. To delete an element from an array, right click on the element to delete and navigate to Data Operations >> Delete Element. Attached screenshot in zip file demonstrates it.
Please take a look at the attached modified example. I would recommend playing with regular digital write and read examples and then use this example.
Thanks,
Kalyan
10-17-2006 07:42 AM